Actions26
Overview
This node integrates with the Mercado Pago MCP Server to manage orders and their payment transactions. Specifically, for the Order Refund operation, it allows users to refund a payment associated with an existing order by specifying the order ID and the amount to be refunded.
Common scenarios where this node is beneficial include:
- E-commerce platforms needing to automate refunds for customer orders.
- Customer service workflows that handle partial or full refunds.
- Financial reconciliation processes requiring programmatic control over order refunds.
Practical example:
- A merchant receives a return request from a customer and uses this node to refund the exact transaction amount back to the customer's payment method by providing the order ID and refund amount.
Properties
| Name | Meaning |
|---|---|
| ID do Pedido | The unique identifier of the order to perform the refund on. |
| Valor da Transação | The amount in Brazilian Reais (R$) to refund for the specified order. |
Output
The node outputs a JSON object containing details about the refund operation result. The structure includes:
type: A string indicating the operation type, here"order_refunded".order: An object with the updated order information after the refund.success: A boolean indicating if the operation was successful (true).timestamp: ISO 8601 timestamp of when the operation was performed.
Example output snippet:
{
"type": "order_refunded",
"order": {
/* detailed order data returned by Mercado Pago API */
},
"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's API.
- The node expects the environment configuration (e.g., production or sandbox) to be set within the credentials.
Troubleshooting
Common issues:
- Invalid or missing order ID: The refund will fail if the provided order ID does not exist or is malformed.
- Insufficient refund amount: The refund amount must be valid and not exceed the original transaction amount.
- Authentication errors: Ensure the API key credential is valid and has permission to perform refunds.
- Network or API downtime: Temporary failures may occur if Mercado Pago services are unavailable.
Error messages:
"Card token is required for card payments"— Not applicable for refund but appears in other operations; ensure correct parameters for other payment types.- HTTP 401 Unauthorized — Check API key validity and permissions.
- HTTP 404 Not Found — Verify the order ID exists.
- HTTP 400 Bad Request — Usually indicates invalid input parameters like negative refund amount.
Resolution tips:
- Double-check all input parameters before execution.
- Confirm API credentials and environment settings.
- Use the node’s error output to identify specific failure reasons.
- Enable "Continue On Fail" option in n8n to handle errors gracefully during batch processing.