Mercado Pago icon

Mercado Pago

Integração com APIs do Mercado Pago para processamento de pagamentos

Actions5

Overview

This node integrates with the Mercado Pago payment platform, specifically providing functionality to refund a payment. The "Reembolsar" (Refund) operation under the "Pagamento" (Payment) resource allows users to issue refunds for payments previously processed via Mercado Pago.

Typical use cases include:

  • Automatically refunding customer payments in e-commerce workflows.
  • Managing refunds in financial automation processes.
  • Handling chargebacks or cancellations programmatically.

For example, after a customer requests a refund on an order, this node can be used to trigger the refund process by specifying the payment ID, automating the refund without manual intervention.

Properties

Name Meaning
ID do Pagamento The unique identifier of the payment to refund. This must be a numeric string representing the payment ID in Mercado Pago.

Output

The node outputs JSON data representing the response from the Mercado Pago API regarding the refund operation. This typically includes details about the refunded payment, such as status, refund confirmation, and any related metadata.

If the refund is successful, the output JSON will contain confirmation details; if there is an error, the node throws an error with descriptive messages.

No binary data output is involved in this operation.

Dependencies

  • Requires an API authentication token (access token) for Mercado Pago configured in n8n credentials.
  • The node makes HTTP requests to the Mercado Pago API endpoints.
  • Proper configuration of the access token environment (sandbox or production) is necessary.
  • The node expects the access token to be valid and have sufficient permissions to perform refund operations.

Troubleshooting

Common Issues

  • Missing or invalid payment ID: The payment ID must be provided and be numeric. Omitting it or providing a non-numeric value causes errors.
  • Invalid or expired access token: If the API key credential is missing, invalid, or expired, the node will throw configuration errors.
  • Incorrect environment setup: Using a production token in sandbox mode or vice versa may cause warnings or failures.
  • API endpoint issues: Network problems or incorrect URLs lead to request failures.

Error Messages and Resolutions

  • "ID do pagamento é obrigatório para obter um pagamento"
    Means the payment ID was not provided. Ensure the "ID do Pagamento" property is set.

  • "ID do pagamento deve ser numérico"
    The payment ID must only contain digits. Check the input format.

  • "Erro de configuração: URL inválida"
    Indicates an invalid API URL, often due to misconfiguration of credentials or environment.

  • "Access Token não pode estar vazio."
    The access token credential is missing or empty. Configure the API key properly.

  • Warnings about using a production token in sandbox environment or vice versa suggest checking the token prefix and environment setting.

Links and References


This summary is based on static analysis of the node's source code and provided property definitions. It focuses on the "Pagamento" resource and "Reembolsar" operation as requested.

Discussion