Actions26
Overview
This node integrates with the Mercado Pago MCP Server to manage orders and their payment transactions. Specifically, for the Order - Cancel operation, it allows users to cancel an existing order by providing the order's ID. This is useful in scenarios where an order needs to be voided or stopped before completion, such as when a customer cancels a purchase or when an order was created by mistake.
Practical examples include:
- Automatically cancelling orders that have been pending for too long.
- Cancelling orders based on external business logic or user requests.
- Integrating order cancellation into larger workflows involving inventory management or customer notifications.
Properties
| Name | Meaning |
|---|---|
| ID do Pedido | The unique identifier of the order to cancel. This is required to specify which order should be cancelled. |
Output
The node outputs a JSON object containing the result of the cancellation request. The structure includes:
type: A string indicating the type of response, here"order_cancelled".order: An object with details about the cancelled order as returned by the Mercado Pago API.success: A boolean indicating if the operation was successful (true).timestamp: ISO 8601 timestamp of when the operation was performed.
Example output snippet (simplified):
{
"type": "order_cancelled",
"order": {
/* Mercado Pago order cancellation response data */
},
"success": true,
"timestamp": "2024-06-01T12:00:00.000Z"
}
No binary data output is produced by this operation.
Dependencies
- Requires an API key credential for Mercado Pago MCP with appropriate permissions.
- Uses the Mercado Pago REST API endpoint
https://api.mercadopago.com. - Requires network access to Mercado Pago services.
- The node uses HTTP POST to the
/v1/orders/{orderId}/cancelendpoint to perform the cancellation. - Proper configuration of the credential with a valid access token is necessary.
Troubleshooting
Common issues:
- Invalid or missing order ID will cause the API call to fail.
- Expired or invalid API credentials will result in authentication errors.
- Network connectivity problems can prevent reaching the Mercado Pago API.
- Attempting to cancel an order that is already cancelled or completed may return an error from the API.
Error messages:
- Errors thrown by the node will include the message from the Mercado Pago API or a generic error description.
- If the card token or issuer ID is missing for card payments (not relevant for cancel but for other operations), the node throws specific errors.
- To resolve errors, verify the order ID correctness, ensure the API credentials are valid and have sufficient permissions, and check network connectivity.
The node supports continuing on failure, allowing workflows to handle errors gracefully.
Links and References
- Mercado Pago Orders API Documentation
- Mercado Pago Developer Portal
- n8n Documentation on Credentials
This summary focuses exclusively on the Order - Cancel operation as requested.