Actions26
Overview
This node integrates with the Mercado Pago MCP (Mercado Pago's API) to manage payments, orders, customers, preferences, webhooks, notifications, and documentation searches. Specifically for the Payment - Cancel operation, it allows users to cancel an existing payment by providing its payment ID.
Typical use cases include:
- Automatically cancelling a payment that was created but needs to be voided due to user cancellation or error.
- Integrating payment cancellation into workflows where order status changes require payment reversals.
- Managing payment lifecycle directly from n8n without manual intervention in the Mercado Pago dashboard.
Example: A workflow triggers when a customer cancels an order on your e-commerce platform, then uses this node to cancel the corresponding Mercado Pago payment by its ID.
Properties
| Name | Meaning |
|---|---|
| ID do Pagamento | The unique identifier of the payment to retrieve or cancel. Example: "1234567890". |
Output
The node outputs a JSON object containing the result of the cancellation request. The structure includes:
type: A string indicating the operation type, here"payment_cancelled".payment: An object with detailed information about the cancelled payment as returned by Mercado Pago's API.success: Boolean flag indicating if the operation succeeded (true).timestamp: ISO 8601 timestamp of when the operation was performed.
No binary data is output by this operation.
Example output snippet:
{
"type": "payment_cancelled",
"payment": {
"id": 1234567890,
"status": "cancelled",
...
},
"success": true,
"timestamp": "2024-06-01T12:00:00.000Z"
}
Dependencies
- Requires an API authentication token credential for Mercado Pago MCP API access.
- Uses the official Mercado Pago REST API endpoints (
https://api.mercadopago.com). - Requires proper configuration of the Mercado Pago API credentials in n8n.
- The node uses HTTP PUT requests to update payment status to "cancelled".
Troubleshooting
- Missing or invalid payment ID: The
paymentIdproperty is required. If omitted or incorrect, the API will return an error. Ensure the payment ID exists and is valid. - Authentication errors: If the API token is missing, expired, or invalid, the node will fail with authorization errors. Verify the Mercado Pago API credentials are correctly set up.
- Payment cannot be cancelled: Some payments may not be cancellable depending on their current status or Mercado Pago rules. The API response will indicate such issues.
- Network or API downtime: Temporary connectivity issues or Mercado Pago service outages can cause failures. Retry later or check Mercado Pago status.
- Idempotency key collisions: The node generates a unique idempotency key per request; conflicts are unlikely but possible if requests are retried too quickly.
If the node is configured to continue on failure, errors will be returned in the output JSON with success: false and an error message.
Links and References
- Mercado Pago Payments API Documentation
- Mercado Pago Developer Portal
- n8n Documentation on Credentials
This summary focuses exclusively on the Payment resource's Cancel operation as requested.