Mercado Pago

Integração com APIs do Mercado Pago

Actions6

Overview

This node integrates with the Mercado Pago API to manage payments and payment preferences. Specifically, for the Payment - Get operation, it retrieves detailed information about a specific payment using its unique Payment ID.

Common scenarios where this node is beneficial include:

  • Fetching the status and details of a payment after it has been created.
  • Verifying payment information before processing orders or updating records.
  • Auditing or reporting on individual payment transactions.

For example, after a customer completes a payment, you can use this node to get the payment details such as amount, status, payer info, and more, enabling your workflow to make decisions based on the payment state.

Properties

Name Meaning
Payment ID The unique identifier of the payment to retrieve. This is required to fetch the payment details from Mercado Pago.

Output

The output is a JSON object containing all the details of the requested payment as returned by the Mercado Pago API. This typically includes fields such as:

  • Payment ID
  • Status (approved, pending, rejected, etc.)
  • Transaction amount
  • Payment method details
  • Payer information (name, email)
  • External reference
  • Date and time of payment
  • Additional metadata related to the payment

No binary data is output by this operation.

Dependencies

  • Requires an active Mercado Pago API credential configured in n8n for authentication.
  • The node makes HTTP requests to the Mercado Pago API endpoint https://api.mercadopago.com/v1/payments/{paymentId}.
  • Proper network connectivity to Mercado Pago's API is necessary.

Troubleshooting

  • Missing or empty Payment ID: The node will throw an error if the Payment ID is not provided or is empty. Ensure that the Payment ID parameter is correctly set.
  • Invalid Payment ID: If the Payment ID does not exist or is invalid, the Mercado Pago API may return an error which will be propagated by the node.
  • Authentication errors: If the API credentials are incorrect or expired, the node will fail to authenticate. Verify that the API key or token is valid and properly configured.
  • Network issues: Connectivity problems to Mercado Pago's API will cause request failures. Check your internet connection and firewall settings.
  • API rate limits: Excessive requests might lead to rate limiting by Mercado Pago. Implement retries or delays if needed.

Links and References

Discussion