AI resources

Mercado Pago integration for websites

This model lets you offer Apple Pay on your website without managing payment certificates or decrypting tokens on your server. You can integrate via SDK, using the Mercado Pago JavaScript SDK in the frontend to display the Apple Pay button, or via API, implementing the flow in your backend. In both cases, Mercado Pago handles validation with Apple and returns a token ready to create the payment.

sequenceDiagram
    title How it works
    participant C as Buyer
    participant V as Website (frontend)
    participant MP as Mercado Pago
    participant A as Apple

    V->>MP: Initialize Apple Pay
    MP->>A: Validate merchant and domain
    A-->>V: Apple Pay button available
    C->>V: Click Apple Pay
    V->>A: Payment request (Touch ID/Face ID)
    A-->>MP: Apple Pay token
    MP-->>V: Mercado Pago token (callback)
    V->>V: Send token to backend
    V->>MP: Create payment (token + data)
    MP-->>V: Payment response

In this integration you use the Mercado Pago JavaScript SDK in the frontend to display the Apple Pay button. Mercado Pago validates the session with Apple and returns a token ready to create the payment in your backend. Follow the steps below to integrate.

If you encounter an error in your Apple Pay integration, see Frequent errors.