Skip to main content

Peru. Yape payments

You can make local Yape payments in Peru in Peruvian Soles (PEN).

Please contact your Account Manager to learn whether recurring payments are available.

Making a payment

  1. Create a session using the session/create method.

    Alternatively, you can use the session/init/payment method. In this case, specify all the payment parameters right away and skip the next step.

  2. Send a session/start/payment request. Specify the following parameters:

    • country_ewallet_yape in internet_banking.type
    • country_iso2 = PE in internet_banking.country_ewallet
    • the payer's full name, email, and 8-digit DNI or 11-digit RUC in document in participant_details.sender
    • the payer's device type in payment_options.platform_details: mobile or desktop if device type is desktop:
      • the payer's phone in customer.contacts
      • the payer’s os and browser in payment_options.platform_details
        Optionally, you can add a return URL to redirect the customer back after the payment (payment_options.return_url).
    Request example
    curl -X POST \
    https://demo.smart-glocal.com/api/v1/session/start/payment \
    -H 'content-type: application/json' \
    -H 'X-PARTNER-PROJECT: your_project_name' \
    -H 'X-PARTNER-SIGN: signature' \
    -d '{
    "session_id": "ps_12345",
    "payment_details": {
    "type": "internet_banking",
    "internet_banking": {
    "type": "country_ewallet_yape",
    "country_ewallet": {
    "country_iso2": "PE"
    }
    }
    },
    "amount_details": {
    "amount": 1000,
    "currency": "PEN"
    },
    "customer": {
    "reference": "qwiqwi",
    "contacts": {
    "phone": "12345678901"
    }
    },
    "participant_details": {
    "sender": {
    "full_name": "Name Surname",
    "email": "email@example.com",
    "document": "12345678901"
    }
    },
    "payment_options": {
    "return_url": "https://smart-glocal.com/",
    "platform_details": {
    "type": "desktop",
    "os": "windows",
    "browser": "chrome"
    },
    "recurrent": false
    }
    }'
    Response example
    curl -X POST \
    https://partner.com \
    -H 'content-type: application/json' \
    -H 'X-PARTNER-SIGN: signature' \
    -d '{
    "status": "ok",
    "session": {
    "id": "ps_12345",
    "status": "in_progress",
    "created_at": "2025-12-04T19:28:58.077701Z",
    "updated_at": "2025-12-04T19:29:23.216667Z",
    "acquiring_payments": [{
    "id": "pm_12354",
    "status": "in_progress",
    "created_at": "2025-12-04T19:29:23.217101Z",
    "customer": {
    "reference": "qwiqwi",
    "contacts": {
    "phone": "12345678901"
    }
    },
    "payment_details": {
    "type": "internet_banking",
    "internet_banking": {
    "type": "country_ewallet_yape",
    "country_ewallet": {
    "country_iso2": "PE"
    }
    }
    },
    "amount_details": {
    "amount": 1000,
    "currency": "PEN"
    },
    "participant_details": {
    "sender": {
    "full_name": "Name Surname",
    "email": "email@example.com",
    "document": "12345678901"
    }
    },
    "payment_options": {
    "return_url": "https://smart-glocal.com/",
    "platform_details": {
    "type": "desktop",
    "os": "windows",
    "browser": "chrome"
    },
    "recurrent": false
    }
    }]
    }
    }'
  3. Wait for a ready_to_confirm webhook. When you receive it, it means that Smart Glocal is ready to make the payment and is waiting for your confirmation.

    Webhook example
    curl -X POST \
    https://partner.com \
    -H 'content-type: application/json' \
    -H 'X-PARTNER-SIGN: signature' \
    -d '{
    "type": "ready_to_confirm",
    "status": "ok",
    "session": {
    "id": "ps_12345",
    "status": "pending",
    "created_at": "2025-12-04T19:28:58.077701Z",
    "updated_at": "2025-12-04T19:29:23.216667Z",
    "acquiring_payments": [{
    "id": "pm_12354",
    "status": "pending",
    "created_at": "2025-12-04T19:29:23.217101Z",
    "customer": {
    "reference": "qwiqwi",
    "contacts": {
    "phone": "12345678901"
    },
    "payment_details": {
    "type": "internet_banking",
    "internet_banking": {
    "type": "country_ewallet_yape",
    "country_ewallet": {
    "country_iso2": "PE"
    }
    }
    },
    "amount_details": {
    "amount": 1000,
    "currency": "PEN"
    },
    "participant_details": {
    "sender": {
    "full_name": "Name Surname",
    "email": "email@example.com",
    "document": "12345678901"
    }
    },
    "payment_options": {
    "return_url": "https://smart-glocal.com/",
    "platform_details": {
    "type": "desktop",
    "os": "windows",
    "browser": "chrome"
    },
    "recurrent": false
    }
    }],
    "actions": {
    "confirm": "2025-12-04T07:48:28.275964Z"
    }
    }
    }'
  4. Send a session/confirm request to confirm the operation or a session/cancel request to cancel it.

    Request example
    curl -X POST \
    https://demo.smart-glocal.com/api/v1/session/confirm \
    -H 'content-type: application/json' \
    -H 'X-PARTNER-PROJECT: your_project_name' \
    -H 'X-PARTNER-SIGN: signature' \
    -d '{
    "session_id":"ps_12345"
    }'
  5. Wait for an action_required webhook. The customer_interaction.redirect.url parameter contains a link to the local payment method page.

    Webhook example
    curl -X POST \
    https://partner.com \
    -H 'content-type: application/json' \
    -H 'X-PARTNER-SIGN: signature' \
    -d '{
    "type": "action_required",
    "status": "ok",
    "session": {
    "id": "ps_12345",
    "status": "in_progress",
    "created_at": "2025-12-04T07:48:28.296138Z",
    "updated_at": "2025-12-04T07:48:28.958891Z",
    "acquiring_payments": [{
    "id": "pm_12354",
    "status": "pending",
    "created_at": "2025-12-04T07:48:28.296138Z",
    "customer": {
    "reference": "qwiqwi",
    "contacts": {
    "phone": "12345678901"
    },
    },
    "participant_details": {
    "sender": {
    "full_name": "Name Surname",
    "email": "email@example.com",
    "document": "1234567890123"
    }
    },
    "payment_details": {
    "type": "internet_banking",
    "internet_banking": {
    "type": "country_ewallet_yape",
    "country_ewallet": {
    "country_iso2": "PE"
    }
    }
    },
    "amount_details": {
    "amount": 1000,
    "currency": "PEN"
    },
    "customer_interaction": {
    "type": "redirect",
    "redirect": {
    "url": "https://redirect-url-example.com/12345",
    "base_url": "https://redirect-url-example.com/12345",
    "method": "GET",
    "params": {}
    }
    },
    "metadata": {
    "key": "value"
    },
    "payment_options": {
    "return_url": "https://smart-glocal.com/",
    "platform_details": {
    "type": "desktop",
    "os": "windows",
    "browser": "chrome"
    },
    "recurrent": false
    }
    }],
    "actions": {
    "confirm": "2025-12-04T07:48:28.327146Z"
    }
    }
    }'

    5.1 If the user's device type is mobile, redirect the user to the app via a deep link. If the device type is desktop, Yape will send a confirmation request to the account associated with the specified phone number.

    5.2 The user sees the transaction details.

    5.3 The user confirms the payment with an OPT code.

  6. After the user makes the payment, you will receive a payment_finished webhook containing the payment result from Smart Glocal. The succeeded status indicates a successful payment.

    Webhook example
    curl -X POST \
    https://partner.com \
    -H 'content-type: application/json' \
    -H 'X-PARTNER-SIGN: signature' \
    -d '{
    "type": "payment_finished",
    "status": "ok",
    "session": {
    "id": "ps_12345",
    "status": "accepted",
    "created_at": "2025-12-04T07:48:28.275964Z",
    "updated_at": "2025-12-04T07:49:43.022068Z",
    "acquiring_payments": [{
    "id": "pm_12354",
    "status": "succeeded",
    "created_at": "2025-12-04T07:48:28.296138Z",
    "finished_at": "2025-12-04T07:49:43.002789Z",
    "customer": {
    "reference": "qwiqwi",
    "contacts": {
    "phone": "12345678901"
    },
    },
    "participant_details": {
    "sender": {
    "full_name": "Name Surname",
    "email": "email@example.com",
    "document": "12345678901"
    }
    },
    "payment_details": {
    "type": "internet_banking",
    "internet_banking": {
    "type": "country_ewallet_yape",
    "country_ewallet": {
    "country_iso2": "PE"
    }
    }
    },
    "amount_details": {
    "amount": 1000,
    "currency": "PEN"
    },
    "metadata": {
    "key": "value"
    },
    "payment_options": {
    "return_url": "https://smart-glocal.com",
    "platform_details": {
    "type": "desktop",
    "os": "windows",
    "browser": "chrome"
    },
    "recurrent": false
    }
    }],
    "actions": {
    "confirm": "2025-12-04T07:48:28.327146Z",
    "capture": "2025-12-04T07:49:42.965552Z"
    }
    }
    }'

Sequence diagram