Payment ServicesMercadoPago

MercadoPago

Sana Commerce 9.3
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.

Set up 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 code Enter the currency code of the given public and private keys. It is very important to enter the correct currency code. Contact MercadoPago to get further details regarding the currency type of the related account.

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

Example of a wrong currency setup: As a shop administrator, you created the MercadoPago payment method for Mexico. The currency of Mexico is Mexican Peso (MXN). You accidentally entered "USD" (US Dollar) in the "Currency code" field. The currency of a customer is Euro (EUR). The customer is creating the order with the total amount 100 EUR.

The order amount (in our example 100 EUR) will be converted to US Dollar and the customer will be redirected to the MercadoPago hosted payment page. On the MercadoPago hosted payment page the order amount in US Dollar will be converted again to Mexican Peso and the customer will be charged the wrong amount.

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

Country

Currency Code

Argentina
Brazil
Chile
Colombia
Mexico
Peru
Uruguay

ARS
BRL
CLP
COP
MXN
PEN
UYU

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

Possible values:

  • Round: Value will be round up or down to the nearest decimal place.
  • Up: Value will always round up.
  • Down: Value will always round 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. If you leave this field empty, all available payment categories will be shown to the customers. Example: CARD, CASH, BDEP, BTFR.
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.

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.

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.

Update status via task service If this is option is enabled, the scheduled task "Sync payment statuses between Sana and PSP" will synchronize and update the payment status for Pending / InProgress payments.
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.

Enable paying with installments If this option is enabled, a customer can pay the order in installments.
Sponsor id This value is required for MercadoPago partners. Please contact MercadoPago to get this id.

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

Payment ServicesMercadoPago