Actions26
Overview
The node integrates with the Mercado Pago MCP Server to manage orders and their transactions. Specifically, the "Add Transaction" operation for the "Order" resource allows users to add a new payment transaction to an existing order in Mercado Pago.
This is useful in scenarios where an order requires multiple payment transactions or partial payments. For example, if a customer wants to pay an order in installments or via different payment methods, this operation can add each transaction separately to the same order record.
Practical examples:
- Adding a credit card payment transaction to an existing order.
- Recording a partial payment made by PIX or boleto bancário on an order.
- Tracking multiple payment attempts or adjustments on a single order.
Properties
| Name | Meaning |
|---|---|
| ID do Pedido | The unique identifier of the order to which the transaction will be added. |
| Valor da Transação | The amount of the transaction in Brazilian Reais (R$). |
| Descrição | Description of the transaction or order payment (e.g., "Pagamento do pedido"). |
| ID do Método de Pagamento | Identifier of the payment method used for the transaction (e.g., "visa", "pix"). |
| Email do Pagador | Email address of the payer making the transaction. |
Output
The output JSON contains the result of adding the transaction to the specified order. It includes:
type: A string indicating the type of response, here"transaction_added".order: An object representing the updated order data returned from Mercado Pago after adding the transaction.success: Boolean flag indicating whether the operation was successful (true).timestamp: ISO 8601 timestamp of when the operation was performed.
No binary data is output by this operation.
Example output structure (simplified):
{
"type": "transaction_added",
"order": {
// Mercado Pago order object with updated transactions
},
"success": true,
"timestamp": "2024-06-01T12:00:00.000Z"
}
Dependencies
- Requires an API key credential for Mercado Pago MCP with appropriate permissions.
- Uses the Mercado Pago REST API endpoint
https://api.mercadopago.com/v1/orders/{orderId}/transactionsto add transactions. - Requires n8n credentials configuration with access token and MCP endpoint URL.
- Uses Axios HTTP client internally for API requests.
Troubleshooting
- Missing or invalid order ID: If the provided order ID does not exist or is malformed, the API call will fail. Ensure the order ID is correct.
- Invalid payment method ID: The payment method ID must be valid and supported by Mercado Pago; otherwise, the request will be rejected.
- Insufficient permissions: The API key used must have permission to modify orders and add transactions.
- Network or API errors: Temporary network issues or Mercado Pago service downtime may cause failures. Retry later or check API status.
- Validation errors: Providing invalid amounts (e.g., negative values) or missing required fields will cause errors.
Common error messages come directly from the Mercado Pago API and typically indicate what field or parameter caused the issue. Review the error message and adjust input parameters accordingly.
Links and References
- Mercado Pago Orders API Documentation
- Mercado Pago Payment Methods
- Mercado Pago MCP Server Integration Guide
This summary focuses exclusively on the "Order" resource's "Add Transaction" operation as requested.