Yape

Integrate Yape payments in Peru with Bamboo. Learn how to send the customer’s phone number and authorization code (OTP) to process real-time approvals or rejections.

Yape is a mobile payment method in Peru that allows purchases to be authorized using a phone number and a one-time authorization code (OTP) generated by the payer in the Yape app. The transaction is processed immediately and returns an Approved or Rejected status in real time.


Payment flow

The following diagram illustrates the payment process for Yape.

  1. The customer selects Yape as the payment method.
  2. The merchant displays a form requesting the mobile phone number and authorization code.
  3. The customer opens the Yape app and generates an authorization code (OTP).
  4. The customer enters the phone number and OTP in the merchant’s checkout form.
  5. Bamboo processes the transaction and immediately returns an Approved or Rejected status.

Request parameters

The following parameters are required specifically for this payment method.
Refer to the Create a Purchase guide for authentication and global fields such as Amount, Currency, and Order.

PropertyTypeDescription
PaymentMethodstringMust be YAP. Refer to the Payment Methods table. Required.
TargetCountryISOstringMust be PE. Indicates the destination country. Required.
CustomerEmailstringCustomer’s email address. Required.
CustomerFirstNamestringCustomer’s first name. Recommended.
CustomerLastNamestringCustomer’s last name. Recommended.
CustomerDocumentTypestringUse a valid value from the Document types table. Optional.
CustomerDocumentNumberstringIdentification number according to the selected document type. Optional.
CustomerPhoneNumberstringCustomer’s registered phone number in Yape. Maximum 9 digits. Recommended.
CustomerAddressCountrystringCountry of residence. Optional.
CustomerAddressStatestringRegion or department. Optional.
CustomerAddressCitystringCity of residence. Optional.
CustomerAddressAddressDetailstringStreet and address details. Optional.
CustomerAddressPostalCodestringZIP or postal code. Optional.
MetaDataInphoneNumberstringMobile phone number associated with the Yape account. Required.
MetaDataInotpstringAuthorization code generated by the Yape app. Required.
MetaDataInPaymentExpirationInMinutesnumberValidity period of the payment request in minutes. Optional.

💡

The otp (authorization code) is generated by the customer in the Yape app and must be entered along with the phone number during checkout.
Bamboo validates both fields to authorize the transaction.


Request example

To test this endpoint, use the API Reference or the Postman Collection

{
  "PaymentMethod": "YAP",
  "Order": "PE-YAPE-0001",
  "Amount": 100,
  "Currency": "PEN",
  "Description": "Pago con Yape - prueba",
  "TargetCountryISO": "PE",
  "Customer": {
    "FirstName": "Lucía",
    "LastName": "Fernández",
    "Email": "[email protected]",
    "PhoneNumber": "987654321",
    "DocumentType": "DNI.PE",
    "DocumentNumber": "12345678",
    "ReferenceCode": "PE-REF-001",
    "Address": {
      "Country": "PE",
      "City": "Lima",
      "State": "Lima",
      "PostalCode": "15046",
      "AddressDetail": "Av. Arequipa 1234, Miraflores"
    }
  },
  "MetaDataIn": {
    "PaymentExpirationInMinutes": 1440,
    "phoneNumber": "987654321",
    "otp": "261116"
  }
}

Response parameters

The API response confirms whether the payment was approved or rejected.
The transaction result is returned immediately, similar to a card payment flow. For more details on the full response object, refer to the Response parameters section of the Purchase creation guide.

PropertyTypeDescription
TransactionIdstringUnique identifier for the transaction in Bamboo.
ResultstringResult of the operation (COMPLETED, REJECTED).
StatusstringFinal status of the payment (APPROVED, REJECTED).
AuthorizationCodestringCode returned by the acquirer confirming the authorization.
MetadataInphoneNumberstringMobile phone number used for the Yape payment.
MetadataInotpstringAuthorization code provided by the payer through the Yape app.

Response example

{
  "TransactionId": "79632697147789184",
  "Result": "COMPLETED",
  "Status": "APPROVED",
  "ErrorCode": null,
  "ErrorDescription": null,
  "Created": "2024-08-07T17:51:54.620",
  "AuthorizationDate": "2024-08-07T17:51:56.879",
  "AuthorizationCode": "839936",
  "Amount": 25000,
  "Currency": "PEN",
  "Installments": 1,
  "Url": "https://api.stage.bamboopayment.com/Purchase/79632697147789184",
  "MetadataIn": {
    "PaymentExpirationInMinutes": "1440",
    "phoneNumber": "987654321",
    "otp": "261116"
  },
  "Action": null,
  "PaymentMethod": {
    "Brand": "Yape",
    "CardOwner": null,
    "Bin": null,
    "IssuerBank": null,
    "Type": "BankTransfer",
    "Expiration": null,
    "Last4": null
  }
}



Discover the API