Credit and Debit Cards
Process credit and debit card payments in Peru with Bamboo’s API. Learn local requirements, refund rules, and testing cards for Visa, Mastercard, Amex, and more.
This page describes Peru-specific requirements for the Create a Purchase operation.
Refer to the Create a Purchase guide for the full parameter list and base definitions.
Request parameters
The following table lists all relevant fields for processing a purchase in Peru.
Only fields that differ from the global Create a Purchase operation are included.
| Property | Type | Description |
|---|---|---|
Customer → FirstName | string | Customer’s name. Required for anti-fraud validation. |
Customer → LastName | string | Customer’s last name. Required for anti-fraud validation. |
Customer → DocumentType | string | Must use one of the valid values listed in the Document types table. |
Customer → DocumentNumber | string | Identification number according to the selected document type. |
Customer → PhoneNumber | string | Recommended for antifraud validation. |
Customer → Address → Country | string | Must be "PE". |
Customer → Address → State | string | Region or department of residence. |
Customer → Address → City | string | City of residence. |
Customer → Address → AddressDetail | string | Street, number, and complement. |
Customer → Address → PostalCode | string | Postal code (ZIP). |
Fields not marked as mandatory are strongly recommended to improve approval rates and antifraud accuracy.
ConsiderationsRefunds for Visa and MasterCard are processed as voids when requested on the same day before 00:00. After settlement, refunds can only be issued for transactions older than 48 hours.
Zero-amount authorizations can be used to validate or register Visa and MasterCard cards before charging.
Refunds for UnionPay, Diners Club, and American Express are not processed online and must be requested through Bamboo Support.
American Express refunds are available for transactions up to six months old.
Diners Club refunds are available for transactions up to three months old.
Request example using Token
To test this endpoint, use the API Reference or the Postman Collection
{
"TrxToken": "OT__pe_7R1tL0pV2yW4xN9z3mA5b7kC1d6v",
"UniqueID": "pe-order-10001",
"Capture": true,
"TargetCountryISO": "PE",
"Currency": "PEN",
"Amount": 15000,
"Installments": 1,
"Order": "PE-INV-10001",
"Description": "Compra en línea - Pedido 10001",
"Customer": {
"FirstName": "Lucía",
"LastName": "Fernández",
"ReferenceCode": "CLI-PE-0001",
"PhoneNumber": "987654321",
"DocumentNumber": "12345678",
"DocumentType": "DNI.PE",
"Email": "[email protected]",
"Address": {
"Country": "PE",
"City": "Lima",
"State": "Lima",
"PostalCode": "15046",
"AddressDetail": "Av. Arequipa 1234, Miraflores"
}
},
"CustomerIP": "190.10.224.231",
"AntifraudData": {
"AntifraudFingerprintId": "0046f17b-197a-4d63-8b6b-6082cdd557ff"
}
}Request example using Card Data
To test this endpoint, use the API Reference or the Postman Collection
{
"CardData": {
"CardHolderName": "Lucía Fernández",
"Pan": "4507990000004905",
"CVV": "123",
"Expiration": "08/30",
"Email": "[email protected]",
"Document": "12345678"
},
"UniqueID": "pe-order-10002",
"Capture": true,
"TargetCountryISO": "PE",
"Currency": "PEN",
"Amount": 15000,
"Installments": 1,
"Order": "PE-INV-10002",
"Description": "Compra en línea - Tarjeta de prueba",
"Customer": {
"FirstName": "Lucía",
"LastName": "Fernández",
"ReferenceCode": "CLI-PE-0002",
"PhoneNumber": "987654321",
"DocumentNumber": "12345678",
"DocumentType": "DNI.PE",
"Email": "[email protected]",
"Address": {
"Country": "PE",
"City": "Lima",
"State": "Lima",
"PostalCode": "15046",
"AddressDetail": "Av. Arequipa 1234, Miraflores"
}
},
"CustomerIP": "190.10.224.231",
"AntifraudData": {
"AntifraudFingerprintId": "0046f17b-197a-4d63-8b6b-6082cdd557ff"
}
}Response parameters
Review Create Purchase Guide
Check the global request and response rules before building your request.
Try it in API Reference
Test the endpoint directly and explore real request/response examples.
Testing cards
Use the following test PANs to simulate approved and rejected card purchases in the staging environment.
| Brand | PAN | CVV | Expiration |
|---|---|---|---|
| Visa | 4474118355632240 | 111 | 03/28 |
| Visa | 4000000000000004 | 111 | 03/28 |
| MasterCard | 5474118355630001 | 111 | 03/28 |
Discover the API
Once you’re familiar with how to create a purchase, you can test your integration using our API Reference:
Updated about 17 hours ago
