Mercado Pago MCP icon

Mercado Pago MCP

Integração com MCP Server do Mercado Pago

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 operations on (e.g., refund).
Valor da Transação The amount in Brazilian Reais (R$) to refund for the specified order.

Output

The node outputs a JSON object containing the result of the refund operation. The structure includes:

  • type: A string indicating the type of response, here "order_refunded".
  • order: An object with detailed information about the refunded 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:

{
  "type": "order_refunded",
  "order": {
    /* Detailed order refund response data from Mercado Pago */
  },
  "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.
  • The node makes HTTP POST requests to the Mercado Pago API endpoint https://api.mercadopago.com/v1/orders/{orderId}/refund.
  • Proper configuration of the credential with a valid access token is necessary.
  • The node uses the Axios HTTP client internally to communicate with the API.

Troubleshooting

  • Common issues:

    • Invalid or expired API credentials will cause authentication failures.
    • Providing an incorrect or non-existent order ID will result in errors from the Mercado Pago API.
    • Attempting to refund an amount greater than the original transaction may cause the API to reject the request.
  • Error messages:

    • Errors thrown by the node typically contain the message from the Mercado Pago API.
    • If required parameters like orderId or transactionAmount are missing or invalid, the node will throw validation errors before making the API call.
  • Resolution tips:

    • Verify that the API credentials are correctly set up and have not expired.
    • Double-check the order ID and ensure it exists in Mercado Pago.
    • Confirm the refund amount does not exceed the original transaction amount.
    • Enable "Continue On Fail" in the node settings to handle errors gracefully in workflows.

Links and References

Discussion