Payment ServicesMercadoPago

MercadoPago

Sana Commerce 9.2
Your connector

Configure Payment Methods

When the MercadoPago payment provider is configured in Sana Admin, you need to set up the necessary payment methods supported by MercadoPago.

To configure payment methods:

Step 1: In Sana Admin click: Setup > Ordering & checkout > Payment methods.

Step 2: On the Payment methods tab set up the necessary payment methods.

For more information about how to create and configure payment methods in Sana Admin, see 'Payment Methods' on the Sana help web site.

MercadoPago keys

Each MercadoPago application has two pairs of keys (Public and Private/Access token) to connect with the MercadoPago API. These keys represent the currency for the payment, for example MXN for Mexican Peso, ARS for Argentine Peso, BRL for Brazilian Real, etc.

The sandbox environment keys allow to make test payments and the production keys are used for real payments. One of the keys is public and the other one is private (ACCESS_TOKEN). Make sure to enter the correct keys and do not enter the private key elsewhere other than the "Payment provider: Access token" field in the Sana payment method settings. You can find these keys in the credentials section of your MercadoPago account.

The table below provides the description of the MercadoPago payment provider specific fields:

Fields Description
Public key Enter the public key which identifies your MercadoPago account for Custom Checkout. You can find it in the credentials section of your MercadoPago account.
Access token Enter the access token (private key). You can find it in the Custom Checkout credentials section of your MercadoPago account. It must be kept confidential in your backend servers and must never be published.

     Please, copy the access token carefully, and make sure that there are no trailing and leading spaces. The wrong access token can lead to some runtime issues which might be difficult to diagnose by looking at the payment log.

Client id Enter the client ID which identifies your MercadoPago account for Basic Checkout. You can find it in the credentials section of your MercadoPago account.
Client secret Enter the client secret. You can find it in the Basic Checkout credentials section of your MercadoPago account. It must be kept confidential in your backend servers and must never be published.
Currency id Enter the currency ID of the given public and private keys. It is very important to enter the correct currency ID. Contact MercadoPago to get further details regarding the currency type of the related account. It must correspond to the currency of the customers in your ERP system. Otherwise, a customer will not be able to pay through MercadoPago.

    Important: Entering the wrong currency id may lead to the wrong payment transactions.

Example: As a shop administrator, you created the MercadoPago payment method for Mexico. The currency of Mexico is Mexican Peso (MXN). You entered "USD" (US Dollar) in the "Currency id" field. The currency of the customer is also USD.

  • If Basic Checkout is used, the amount will be converted to the currency of the country "MXN", and the customer will be able to pay the order.
  • If Custom Checkout is used, the amount will not be converted to the currency of the country "MXN", and it will lead to the wrong payment transaction. For example, a customer tries to pay 500 US dollars (USD), but MercadoPago receives 500 Mexican Peso (MXN) because of the wrong currency id.

Below you can see the list of countries and currencies supported by MercadoPago:

Country

Currency Code

Argentina
Brazil
Chile
Colombia
Mexico
Peru
Uruguay
Venezuela

ARS
BRL
CLP
COP
MXN
PEN
UYU
VEF

Amount round option Use this option to round up/down prices according to the allowed decimal places by MercadoPago.

Possible values:

  • UP
  • DOWN

Most of the Latin American countries do not allow decimal places. For more information about the allowed number of decimal points, refer to: https://api.mercadopago.com/currencies/

Allowed payment categories Use this field to show only specific payment categories to the customers in the checkout process. Multiple payment categories should be separated with comma. Example: CARD, CASH, BDEP, BTFR.

If you leave this field empty, all available categories of the MercadoPago keys will be shown to the customers.

Available payment categories:

CARD - Credit Card
CASH - Cash
BDEP -  Bank Deposit
BTFR - Bank Transfer (available only in Chile)

Allowed payment methods Use this field to show only specific payment methods to the customers in the checkout process. Multiple payment methods should be separated with comma.

If you leave this field empty, all available payment methods will be shown to the customers.

Example: visa, master, mercadopagocard, oxxo, bancomer, serfin.

Blocked payment methods Use this field to hide specific payment methods. Payment methods entered in this field will not be shown to the customers in the checkout process. Multiple payment methods should be separated with comma.

Example: visa, master, mercadopagocard, oxxo, bancomer, serfin.

If a certain payment method is present in both fields, "Allowed payment methods" and "Blocked payment methods", it will be marked as allowed, because allowed payment methods have higher priority.

Validate Currency Code Use this field to validate the customer's currency against the operating currency of MercadoPago.
  • true - If this option is set to "true", when a customer creates an order in a Sana web store, the correct currency code will be retrieved from MercadoPago by checking the previous transactions. Then, the currency code will be validated against the customer's currency.
  • false - The currency is not validated with MercadoPago.

    The currency code of a customer is validated anyway against the currency code entered in the "Currency id" field. This is an extra security measure. Since this validation relies upon the old transactions, the very first transaction will not be validated.

Test the payment flow, to see if everything works fine using the created payment methods.

Payment ServicesMercadoPago