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 (Mercado Pago's API) to manage payments and related resources. Specifically, for the Payment - Get operation, it retrieves detailed information about a specific payment by its ID.

Typical use cases include:

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

For example, you might use this node to get the current status of a payment identified by its unique payment ID to confirm if it was approved, pending, or cancelled.

Properties

Name Meaning
ID do Pagamento The unique identifier of the payment to retrieve information for. Example: "1234567890".

Output

The node outputs a JSON object containing the retrieved payment information from Mercado Pago's API. The structure includes all details returned by the /v1/payments/{paymentId} endpoint, such as:

  • Payment amount
  • Status (approved, pending, cancelled, etc.)
  • Payment method details
  • Payer information
  • Transaction timestamps
  • Additional metadata related to the payment

Additionally, the output JSON includes these fields:

  • type: A string indicating the type of response, here "payment_retrieved".
  • success: Boolean flag indicating the operation succeeded (true).
  • timestamp: ISO 8601 timestamp of when the data was fetched.

No binary data is output by this operation.

Example output snippet (simplified):

{
  "type": "payment_retrieved",
  "payment": {
    "id": "1234567890",
    "status": "approved",
    "transaction_amount": 100.5,
    "payment_method_id": "visa",
    "payer": {
      "email": "usuario@exemplo.com"
    },
    ...
  },
  "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/payments/{paymentId}.
  • Requires network access to Mercado Pago's API.
  • The node uses the Axios HTTP client internally to make requests.

Troubleshooting

  • Common issues:

    • Invalid or missing payment ID will cause the API call to fail.
    • Expired or incorrect API credentials will result in authentication errors.
    • Network connectivity problems can prevent reaching Mercado Pago's API.
  • Error messages:

    • "Card token is required for card payments" — not applicable for Get operation but relevant for create payment.
    • HTTP 401 Unauthorized — check API key validity and permissions.
    • HTTP 404 Not Found — payment ID does not exist or is incorrect.
    • Timeout or network errors — verify internet connection and API endpoint accessibility.
  • Resolution tips:

    • Ensure the payment ID is correct and corresponds to an existing payment.
    • Verify that the API key credential is configured properly in n8n.
    • Check Mercado Pago service status if persistent API errors occur.

Links and References

Discussion