Yape
Info
- The purchase status for Yape will be approved or rejected as soon as you send the transaction.
Yape
Yape, a widely embraced mobile payment system in Peru, offers a convenient way for individuals to conduct smartphone transactions. By seamlessly linking their bank accounts to the Yape app, customers can pay for products and services effortlessly.
Unlike other APMs in Peru, the Yape flow operates similarly to card transactions. However, instead of sharing card information, you need only provide the phone number and the authorization code generated by the customer in the Yape app.
Payment flow
The following diagram presents the payment flow used to pay with Yape.
- The customer selects Yape as payment method.
- You must show the form to capture the mobile phone number and the authorization code.
- The customer opens Yape app and generates a new authorization code.
- The customer enters their mobile phone number and the authorization code previously generated.
- Bamboo process the transaction and returns a approved or rejected status.
Request parameters
You need to include specific fields for this payment method to work correctly. Check the Purchase operation article for details on authentication, languages of the response, and basic purchase parameters such as amount and currency.
Property | Type | Mandatory? | Description |
---|---|---|---|
PaymentMethod | string | Yes | Find the value in the table Payment Method. |
TargetCountryISO | string | Yes | Indicate the destination country. |
Customer → Email | string | Yes | Customer’s email. |
Customer → FirstName | string | No | Customer’s first name. |
Customer → LastName | string | No | Customer’s last name. |
Customer → DocumentType | string | No | Customer’s document type. Refer to the Document types table to see the possible values. |
Customer → DocumentNumber | string | No | Customer’s Document Number. |
Customer → PhoneNumber | string | No | Customer’s phone number. Max 9 characters. |
Customer → Address → Country | string | No | Customer’s Country. |
Customer → Address → State | string | No | Customer’s State. |
Customer → Address → City | string | No | Customer’s City. |
Customer → Address → AddressDetail | string | No | Customer’s Address Detail. |
Customer → Address → PostalCode | string | No | Customer’s Postal Code. |
MetaDataIn → PaymentExpirationInMinutes | numeric | No | Configure the expiration time for the payment using this field, specifying the duration in minutes. The API applies a default value if you don’t provide this information. |
MetaDataIn → phoneNumber | numeric | Yes | Mobile phone number of the Yape user. |
MetaDataIn → otp | numeric | Yes | Authorization code generated by the Yape user. |
Request example
{
"PaymentMethod": "YAP",
"Order": "CH2023-001",
"Amount": 100,
"Currency": "PEN",
"TargetCountryISO": "PE",
"Customer": {
"FirstName": "Joao",
"LastName": "Silva",
"ReferenceCode": "JS-001",
"PhoneNumber":"936023105"
"DocumentNumber": "12345678901",
"DocumentType": "DNI.PE",
"Email": "joao.silva@example.com",
"Address": {
"Country": "PE",
"City": "Lima",
"State": "SP",
"PostalCode": "01310-200",
"AddressDetail": "Avenida Paulista 1000"
}
},
"MetaDataIn": {
"PaymentExpirationInMinutes": "1440",
"PhoneNumber": "936023105",
"otp": "123456"
}
}
Response parameters
For more information on the response parameters, please refer to the Response parameters section of the Purchase creation.
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,
"TaxableAmount": null,
"Tip": null,
"Url": "https://api.stage.bamboopayment.com/Purchase/79632697147789184",
"MetadataIn": {
"PaymentExpirationInMinutes": "1440",
"phoneNumber": "969929157",
"otp": "557454"
},
"Action": null,
"PaymentMethod": {
"Brand": "Yape",
"CardOwner": null,
"Bin": null,
"IssuerBank": null,
"Type": "BankTransfer",
"Expiration": null,
"Last4": null
}
}