To use the EBANX payment platform in Mavibot, you need to obtain your Integration Key from your EBANX account and enter it in the payment settings.

EBANX is an aggregator of local payment methods across Latin America. Payments are processed on a secure EBANX-hosted checkout page, where customers are shown the payment methods available in their country (such as PIX and boleto in Brazil, OXXO and SPEI in Mexico, PSE in Colombia, credit/debit cards, and more).

Getting the Integration Key

Sign an agreement with EBANX and obtain access to the EBANX Business Portal (your merchant dashboard).

During the onboarding process, select the countries where you want to accept payments. Customers will only be be able to pay from the countries enabled on your EBANX account.

In the integration settings, copy your Integration Key. You will need it to connect EBANX to Mavibot.

For testing purposes, EBANX provides a separate sandbox account with its own Integration Key. See Test Mode below.

Connecting EBANX

In the Payment Systems settings, select EBANX and enter the following:

  • Integration Key — your copied EBANX Integration Key.
  • Country — the default payment country (two-letter lowercase country code: br for Brazil, mx for Mexico, co for Colombia, cl for Chile, pe for Peru, ar for Argentina, etc.). This determines which payment methods customers will see on the checkout page. The selected country must be enabled on your EBANX account.
  • Test Mode — enable this option to test the integration using the EBANX sandbox environment. When Test Mode is enabled, use the Integration Key from your sandbox account. To accept real payments, disable Test Mode and use your live Integration Key.

The setup is now complete.

Calculator function:

get_ebanx_payment_url(amount, description, currency, customer_email, full_name, country)

Parameters

  • amount — payment amount. Required.

  • customer_email — customer’s email address. Required. EBANX cannot create a payment without it. The customer will also receive a payment confirmation at this email address.

  • full_name — customer’s full name. Required.

  • description — payment description. Optional.

  • currency — payment currency. You can use either:

    • the local currency of the payment country (such as BRL, MXN, COP, CLP, PEN, ARS, etc.), or
    • your EBANX account currency (typically USD), in which case EBANX will convert the amount using its exchange rate.

    Optional. The default value is USD.

  • country — payment country (two-letter lowercase country code). Optional. If omitted, the default country specified in the payment settings will be used.

The function returns a payment URL.

Note: The selected currency must be compatible with the payment country. It must be either the country’s local currency or your EBANX account currency. For example, for br (Brazil), BRL and USD are valid, while MXN is not.

To send a payment button, select the Payment Button type and choose EBANX as the payment system.

Enter:

  • product name;
  • payment amount;
  • currency;
  • variables containing the customer’s full name and email address.

Optionally, specify the payment country.

Example 1: Workflow Configuration

Step 1. Create a Start block.

The Start block is typically used to display the first welcome message in the workflow, along with any introductory information the user needs.

Step 2. Create the block shown below.

Step 3. Go to the Connection settings.

You will need the following regular expression to verify that the customer has entered a valid email address:

^[-\w.]+@([A-z0-9][-A-z0-9]+.)+[A-z]{2,4}$

Also, enable the User enters data option and enter customer_email.

Step 4. Enter the message in the second block.

Step 5. Create a third block and open the Connection settings between the second and third blocks.

Enable the timer to automatically proceed to the next block.

Step 6. In the third block, enter the function in the Calculator.

Example to copy:

amount = 1000
description = "Product1 is product of great reliability!"
currency = "BRL"
link = get_ebanx_payment_url(amount, description, currency, customer_email, full_name, country)

If you want to accept payments in a currency other than USD, specify the currency as shown below.

Example 2. Billing Button

This example is almost identical to Example 1.

However, instead of creating a third block with a function for generating the payment link, you can create a button in the second block.

In the window that opens:

  • Enter the button text.
  • Select the Billing function.
  • Select EBANX as the payment provider.

Then enter the following:

  • Product Name.
  • Payment Amount.
  • Currency (optional).
  • Client Full Name (optional). You can configure this the same way you configured the customer's email input.
  • Customer Email — enter the variable #{customer_email}.

Then click Add.

Notifications After Payment

After the customer opens the payment link and completes the payment, the following callback is sent to the conversation upon successful payment:

SDJ91MTKTT_success 100

Where:

  • SDJ91MTKTT is the first 10 characters of your Integration Key.
  • 100 is the payment amount.

If the payment is cancelled, the following callback is sent:

SDJ91MTKTT_fail 100

For offline payment methods (such as boleto, OXXO, etc.), payment confirmation is not immediate. EBANX sends the callback only after receiving the funds, which may take 1–3 business days. The callback will be delivered automatically once the payment has been confirmed.

How to Send a Response to a Successful or Failed Payment

Step 1. Create a Trigger block.

Step 2. In the condition field, enter the notification text SDJ91MTKTT_success — without the payment amount — if you want to react to every payment.

In this case, the Match Type should be set to By Keywords.

Alternatively, enter the entire callback text in the Trigger field if you want to react to a specific payment. In this case, the Match Type must be set to Exact Match.

If you want to continue the workflow after a successful payment, you can create a Start block instead of a Trigger block and continue building your bot flow from there.

Customer Variables After a Successful Payment

Переменная Значение
ebanx_callback_data Информация о платеже, полученная от платёжной системы
ebanx_payment_completed "True" — платёж обработан как успешный
ebanx_payment_hash Идентификатор платежа в EBANX (hash)