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 webhooks among other resources. Specifically, for the Webhook - Create operation, it allows users to create a new webhook endpoint on Mercado Pago's platform. This webhook will listen for specified events such as payments, plans, subscriptions, or invoices.

Common scenarios where this node is beneficial include:

  • Automatically receiving notifications about payment status changes.
  • Tracking subscription or plan updates in real-time.
  • Integrating invoice events into your workflow for automated processing.

For example, you can use this node to create a webhook that listens for payment events and triggers downstream automation whenever a payment is completed or updated.

Properties

Name Meaning
URL The webhook URL endpoint where Mercado Pago will send event notifications.
Events The types of events to listen for. Options: Payment, Plan, Subscription, Invoice.

Output

The output JSON contains details about the created webhook under the webhook property, along with metadata:

  • type: Always "webhook_created" for this operation.
  • webhook: Object containing the webhook details returned by Mercado Pago API, including its ID, URL, subscribed events, and status.
  • success: Boolean indicating if the operation was successful.
  • timestamp: ISO string timestamp of when the operation was performed.

Example output structure:

{
  "type": "webhook_created",
  "webhook": {
    "id": "123456",
    "url": "https://your-webhook-url.com/endpoint",
    "events": [
      { "topic": "payment" },
      { "topic": "plan" }
    ],
    "status": "active"
  },
  "success": true,
  "timestamp": "2024-06-01T12:00:00.000Z"
}

No binary data output is involved in this operation.

Dependencies

  • Requires an active Mercado Pago API authentication token (provided via credentials).
  • Uses Mercado Pago's REST API endpoint https://api.mercadopago.com/v1/webhooks.
  • Requires proper configuration of the API key credential in n8n to authorize requests.
  • The node uses the Axios HTTP client internally to make API calls.

Troubleshooting

  • Missing or invalid URL: The webhook URL must be a valid, reachable HTTPS endpoint. Invalid URLs will cause API errors.
  • Invalid events array: Ensure that the events selected are among the supported options (payment, plan, subscription, invoice). Passing unsupported event names may result in API rejection.
  • Authentication errors: If the API token is missing, expired, or incorrect, the node will fail with authorization errors. Verify the API key credential setup.
  • API rate limits or network issues: Temporary failures contacting Mercado Pago API may occur; retrying or checking network connectivity can help.
  • Error messages from the node: They typically include the error message from Mercado Pago API. Review the message for clues (e.g., "Invalid webhook URL", "Unauthorized", etc.).

To resolve common errors:

  • Double-check the webhook URL format and availability.
  • Confirm the API credentials are correctly configured and have necessary permissions.
  • Validate the selected events against the allowed list.
  • Check Mercado Pago API status if persistent errors occur.

Links and References

Discussion