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.

PropertyTypeDescription
CustomerFirstNamestringCustomer’s name. Required for anti-fraud validation.
CustomerLastNamestringCustomer’s last name. Required for anti-fraud validation.
CustomerDocumentTypestringMust use one of the valid values listed in the Document types table.
CustomerDocumentNumberstringIdentification number according to the selected document type.
CustomerPhoneNumberstringRecommended for antifraud validation.
CustomerAddressCountrystringMust be "PE".
CustomerAddressStatestringRegion or department of residence.
CustomerAddressCitystringCity of residence.
CustomerAddressAddressDetailstringStreet, number, and complement.
CustomerAddressPostalCodestringPostal code (ZIP).

💳

Fields not marked as mandatory are strongly recommended to improve approval rates and antifraud accuracy.


Considerations

Refunds 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




Testing cards

Use the following test PANs to simulate approved and rejected card purchases in the staging environment.

BrandPANCVVExpiration
Visa447411835563224011103/28
Visa400000000000000411103/28
MasterCard547411835563000111103/28



Discover the API

Once you’re familiar with how to create a purchase, you can test your integration using our API Reference: