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. 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 implement the Apple Pay flow in your backend. Your backend validates the session with Apple and obtains the token through Mercado Pago APIs to create the payment. Follow the steps below to integrate.