Supported workflows
Before you begin
Complete these steps before you send your first PagoEfectivo payment through Mercado Pago:- Set up a Mercado Pago integration in your workspace with your Mercado Pago access token and HMAC key. To add Mercado Pago to your Payrails Portal, contact your Payrails account team.
- Ask Mercado Pago to enable PagoEfectivo on your Mercado Pago account for Peru.
- In the Payrails Portal, go to Settings → Integrations, open your Mercado Pago integration, select Mercado Pago under Payment methods, and save.
- Add Mercado Pago as a payment option in your workflow.
Request fields for Mercado Pago
Send these fields in the authorize request, in addition to the standard authorize fields. Required fields must be present for the payment to succeed. Payrails sends Optional fields to the PSP when you include them.Authorize a PagoEfectivo payment
Call authorize a payment withmercadoPago as the paymentMethodCode and hpp as the integrationType. The response includes the redirect to the Mercado Pago hosted checkout, where the customer picks PagoEfectivo.
Authorize request
How Mercado Pago handles PagoEfectivo
- Payrails creates a Mercado Pago checkout session for each authorize request. The customer picks the payment method on the Mercado Pago page, and can pick PagoEfectivo when Mercado Pago offers it for the payment.
- After the customer picks PagoEfectivo, the Mercado Pago page shows the payment code. The customer can pay it online or note it and pay at a bank or agent.
- The payment stays pending until the customer pays the code. Treat the pending notification as a reserved order.
- When Mercado Pago reports the payment, Payrails updates its payment method from
mercadoPagotopagoEfectivo. - The checkout session stays open for the Session Expiration Hours set on your Mercado Pago integration, or 24 hours by default.
- Payrails captures Mercado Pago payments immediately, so a successful payment is final. To return funds, refund the payment. Mercado Pago returns the money to the PagoEfectivo account linked to the customer’s email.
- Payrails sends your
merchantReferenceto Mercado Pago as the external reference of the payment.