Actions26
Overview
This node integrates with the Mercado Pago MCP (Mercado Pago's API) to manage orders and related payment operations. Specifically, for the Order - Capture operation, it captures a previously authorized order payment. This is useful in scenarios where an order was authorized but not yet charged, allowing you to finalize the payment capture when ready.
Practical examples include:
- Capturing payment after confirming stock availability.
- Finalizing payment capture once the order is packed and ready to ship.
- Managing delayed payment captures in marketplaces or e-commerce platforms.
Properties
| Name | Meaning |
|---|---|
| ID do Pedido | The unique identifier of the order to perform operations on, such as capturing the order. |
Output
The node outputs a JSON object containing the result of the capture operation. The structure includes:
type: A string indicating the type of response, here"order_captured".order: An object with detailed information about the captured order returned by 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:
{
"type": "order_captured",
"order": {
/* Mercado Pago order details */
},
"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 API with appropriate permissions.
- The node makes HTTP POST requests to the Mercado Pago API endpoint
/v1/orders/{orderId}/capture. - Requires n8n credentials configuration with access token and endpoint URL for Mercado Pago MCP.
Troubleshooting
Common issues:
- Invalid or expired API token: Ensure the API key credential is valid and has not expired.
- Incorrect Order ID: Verify that the provided order ID exists and is authorized for capture.
- Network or connectivity problems: Check network access to Mercado Pago API endpoints.
- Attempting to capture an order that is already captured or canceled may cause errors.
Error messages:
"Card token is required for card payments"— Not applicable for capture but common in payment creation; ensure correct parameters for other operations.- HTTP 401 Unauthorized — Check API credentials.
- HTTP 404 Not Found — The order ID does not exist.
- HTTP 400 Bad Request — The order cannot be captured due to its current state.
To resolve errors, verify input parameters, credentials, and order status before capture.