To use the Mercado Pago payment system, complete the settings below in your Mercado Pago Developers dashboard and then enter the details in the integration settings.
Application and Access Token
- Sign in to Mercado Pago and open the Developers section (Developers / Suas integrações).
- Create an application (Your integrations → Create application) if you don’t have one yet.
- Copy your Production Access Token or Test Access Token — this token will be used as the main API token.

For information about token types and where to find them, see: Credentials.
Webhooks (payment notifications)
- In the integration settings, open the Webhooks / уведомления section (see: Webhooks).
- Set the notification URL:
https://chatter.mavibot.ai/mercado_pago_callback/result
- Subscribe to Payments events so you can receive notifications about payment creation and status updates.
- Save the Webhook secret — it must be entered in the integration settings.

Connecting to Mavibot
In the Acquiring section, select Mercado Pago.

Then enter:
- Access Token — the token you copied.
- Webhook secret — the secret used to verify webhooks.

Payment link generation
Calculator function:
get_mercado_pago_payment_url(amount, description, currency, customer_email, product_name)
The function returns a payment link.

Payment via button
To send a payment button via Mercado Pago, select a button type with payment support in the button builder and choose Mercado Pago as the payment system. Enter the amount, description, and currency if needed.

Callbacks in the dialog after payment
Successful payment
After the client follows the link and completes a successful payment, a callback may be sent to the dialog in the following format:
<first_10_characters_of_Webhook_secret>_success <amount>

Example:
gltubgnDle_success 100 — where the prefix is the first 10 characters of your Webhook secret, and 100 is the payment amount.
How to add a reaction to a successful payment
To send a message to your client after a successful payment (for example, “Payment completed successfully” or any other message), you need to set up a reaction using a block with a trigger and a callback.
Step 1
Create a block with a condition (Start block or Trigger block).


Step 2
Specify part of the callback (if you need to react to all payments, e.g. when you have multiple different products), or the full callback (if you want to set up a reaction only for a specific product sale).

Step 3
Write the response message for a successful payment and save the block.Шаг 3. Пропишите сообщение-реакцию на успешную оплату и сохраните блок.

Failed payment
If the payment is not successful (declined, canceled, etc., depending on the status in the API), a callback may be sent in the following format:
<first_10_characters_of_Webhook_secret>_fail <amount>

Example:
gltubgnDle_fail 100 — where the prefix is the first 10 characters of your Webhook secret, and 100 is the amount.
How to add a reaction to a failed payment
To send a message to your client after an unsuccessful payment (for example, “Payment failed” or any other message), you need to set up a reaction using a block with a trigger and a callback.
A failed payment reaction is configured in the same way as a successful one.
Step 1
Create a block with a condition (Start block or Trigger block).
Step 2
Specify part of the callback (if you need to react to all payments, e.g. when you have multiple different products), or the full callback (if you want to set up a reaction only for a specific product sale).
Step 3
Write the response message for a failed payment and save the block.
Client variables after successful payment
| Variables | Description |
|---|---|
| mercado_pago_callback_data | Payment information received from the payment system. |
| mercado_pago_payment_completed | “True” — the payment has been processed as successful. |
| mercado_pago_payment_id | Mercado Pago payment ID |


