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.
- The customer selects Yape as the payment method.
- The merchant displays a form requesting the mobile phone number and authorization code.
- The customer opens the Yape app and generates an authorization code (OTP).
- The customer enters the phone number and OTP in the merchant’s checkout form.
- 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.
| Property | Type | Description |
|---|---|---|
PaymentMethod | string | Must be YAP. Refer to the Payment Methods table. Required. |
TargetCountryISO | string | Must be PE. Indicates the destination country. Required. |
Customer → Email | string | Customer’s email address. Required. |
Customer → FirstName | string | Customer’s first name. Recommended. |
Customer → LastName | string | Customer’s last name. Recommended. |
Customer → DocumentType | string | Use a valid value from the Document types table. Optional. |
Customer → DocumentNumber | string | Identification number according to the selected document type. Optional. |
Customer → PhoneNumber | string | Customer’s registered phone number in Yape. Maximum 9 digits. Recommended. |
Customer → Address → Country | string | Country of residence. Optional. |
Customer → Address → State | string | Region or department. Optional. |
Customer → Address → City | string | City of residence. Optional. |
Customer → Address → AddressDetail | string | Street and address details. Optional. |
Customer → Address → PostalCode | string | ZIP or postal code. Optional. |
MetaDataIn → phoneNumber | string | Mobile phone number associated with the Yape account. Required. |
MetaDataIn → otp | string | Authorization code generated by the Yape app. Required. |
MetaDataIn → PaymentExpirationInMinutes | number | Validity 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.
| Property | Type | Description |
|---|---|---|
TransactionId | string | Unique identifier for the transaction in Bamboo. |
Result | string | Result of the operation (COMPLETED, REJECTED). |
Status | string | Final status of the payment (APPROVED, REJECTED). |
AuthorizationCode | string | Code returned by the acquirer confirming the authorization. |
MetadataIn → phoneNumber | string | Mobile phone number used for the Yape payment. |
MetadataIn → otp | string | Authorization 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
Updated about 20 hours ago
