Mercado Pago
Mercado Pago is a processor that provides services in the Latin American region and it offers support for a wide range of acquirers and alternative payment methods. Mercado Pago Checkout is one of the payment options for Mercado Pago. This integration allows you to charge your customers through a web form on any device. The gateway has support for Mercado Pago Checkout, through which payers are redirected to a page that Mercado Pago has provided. Mercado Pago checkout is the payment method that is offered to you when MSO provides the Mercado Pago merchant-acquirer link to you. Once <<paymentServiceProvider>> creates and approves the merchant-acquirer link, you can offer this payment method through their ecommerce solution.
Prerequisites
To use the Mercado Pago payment method through the <<paymentGateway>>:
- You must be registered with your browser payments service provider.
- Your merchant profile on the <<paymentGateway>> must be configured using the details of your account with the browser payments service provider.
- You must have a bank account in one of the supported currencies that is registered against your merchant account at your browser payments service provider.
- You must get your access token details from Mercado Pago to get it configured on the gateway before you start offering Mercado Pago as a payment method.
Mercado Pago transactions
Mercado Pago supports transactions originating from multiple countries with their corresponding currencies.
Country | Currency |
---|---|
Argentina | ARS |
Brazil | BRL |
Mexico | MXN |
Mercado Pago integration
<<checkout>> integration allows you to collect payment details from your payer through an interaction that the <<paymentGateway>> hosts and displays.
From the API version 63 onwards, Mercado Pago is automatically available as a payment method once <<paymentServiceProvider>> enables and configures you for this payment method. The Mercado Pago payment method on Modern Hosted Checkout supports the following payment flow.
- Payers can select Mercado Pago as the payment method on the hosted checkout screen.
- Once payers select the Mercado Pago payment method, the payer's browser is redirected to the Mercado Pago website for payment initiation.
- After the payment process is complete on the Mercado Pago website, payers are redirected to your website.
The order confirmation receipt displays to payers.
<<directPayment>> integration allows you to offer the Mercado Pago payment method on your own checkout page.
You must submit the WS API INITIATE_BROWSER_PAYMENT
operation with
sourceOfFunds.type
=MERCADO_PAGO_CHECKOUTbrowserPayment.operation
=PAY
{ "apiOperation":"INITIATE_BROWSER_PAYMENT", "browserPayment":{ "operation":"PAY", "returnUrl":"<your_merchant_URL>" }, "customer":{ "email":"john.smith@example.com" }, "order":{ "amount":"200", "currency":"BRL" }, "sourceOfFunds":{ "type":"MERCADO_PAGO_CHECKOUT", "provided":{ "Mercado Pago":{ "bankAccountHolder":"John Smith" } } } }
How to Interpret the Transaction Result
The table specifies the transaction response codes for the possible scenarios that you may encounter after initiating the Mercado Pago payment.
Initiate Browser Payment Response | What This Means... |
---|---|
response.gatewayCode=SUBMITTED result=SUCCESS |
Redirect the payer using the URL provided in the response. |
Retrieve Transaction/Retrieve Order Response | What This Means... |
response.gatewayCode=APPROVED result=SUCCESS |
The payment is successful. |
response.gatewayCode=PENDING result=PENDING |
The <<paymentGateway>> is waiting for a notification from the acquirer about the payment result. Try RETRIEVE_TRANSACTION again later or listen to notifications from the <<paymentGateway>>. |
response.gatewayCode=CANCELLED result=FAILURE |
The payer has canceled the interaction for this payment. Offer the payer the option to try another payment method. |
response.gatewayCode=DECLINED or ACQUIRER_SYSTEM_ERROR result=FAILURE |
The payment was declined. Offer the payer the option to try another payment method. In case of an
ACQUIRER_SYSTEM_ERROR , you may want to inquire with the acquirer about the reason for the payment
failure, or you can try RETRIEVE_TRANSACTION again. |
response.gatewayCode=TIMED_OUT result=FAILURE |
Treat this as a declined payment. The <<paymentGateway>> will make an attempt to ensure the transaction is not successful or will revert the transaction. |
Void
You can cancel the Mercado Pago payment only in the following conditions:
- If the payer is not redirected to Mercado Pago, then the gateway updates the order status to CANCELLED.
- If a payment is created and is in the Pending or in progress state, then the payment by default gets updated to the cancelled state and the gateway updates the order status to CANCELLED.
Refunds
You can refund the Mercado Pago payments in installments or in full. Ensure that you are configured for refunds on the <<paymentGateway>> on your merchant account at your browser payments service provider. Partial refunds are allowed on the Mercado Pago payments.
Test your integration with the sandbox
The <<paymentGateway>> provides a browser payments emulator that allows you to test your integration with the Mercado Pago sandbox.
Mercado Pago
You can use test cards of the local payment methods and simulate different payment responses, without using a real card. Use any one card that is provided in the link for ARS, BRL, and MXN. Ensure to use these details with the non-test merchants until Mercado Pago sandbox.
The following table describes the payment results status that you can use to fill against the cardholder's name:
Payment Status | Description | Transaction response gateway code |
---|---|---|
APRO | Approved payment | APPROVED |
OTHE | Declined for general error | TIMED_OUT |
CONT | Pending payment | PENDING |
The Test Card details might change as Mercado Pago hosts the URL. Use your Mercado Pago Sandbox credentials to test with sandbox.