Supported workflows
Before you begin
Complete these steps before you send your first Yape 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 Yape 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 Yape 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 Yape.
Authorize request
success or error URL. Confirm the result through webhook notifications or the execution status before you fulfill the order.
How Mercado Pago handles Yape
- 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 Yape when Mercado Pago offers it for the payment.
- On the Yape screen, the customer enters the phone number of their Yape account and the approval code from the Yape app.
- When Mercado Pago reports the payment, Payrails updates its payment method from
mercadoPagotoyape. - 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 customer’s Yape account.
- Payrails sends your
merchantReferenceto Mercado Pago as the external reference of the payment.