Credit and Debit cards

Learn how to integrate your solution to process credit or debit card payments.

You can create the purchase using API or Redirection flow.

Considerations

  • Debit cards using the API flow is available for full capture (Purchase operation).
  • The CVV is mandatory for debit cards.
  • The maximum time to confirm a transaction is seven calendar days.
  • Chile does not support decimal amounts, so all received amount values will be rounded.

Card payments using API flow

Using this flow, you can offer the possibility to receive payments using cards without the intervention of the payer.

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.

PropertyTypeMandatory?Description
TrxTokenstringYesThe token that identifies the customer’s card.
For more information about how to create the token, refer to Customers.
TargetCountryISOstringYesIndicate the destination country.
CustomerEmailstringYesCustomer’s email.
CustomerFirstNamestringNoCustomer’s first name.
CustomerLastNamestringNoCustomer’s last name.
CustomerDocumentTypestringNoCustomer’s document type.
Refer to the Document types table to see the possible values.
CustomerDocumentNumberstringNoCustomer’s Document Number.
CustomerPhoneNumberstringNoCustomer’s phone number.
CustomerAddressCountrystringNoCustomer’s Country.
CustomerAddressStatestringNoCustomer’s State.
CustomerAddressCitystringNoCustomer’s City.
CustomerAddressAddressDetailstringNoCustomer’s Address Detail.
CustomerAddressPostalCodestringNoCustomer’s Postal Code.

Request example

{
    "TrxToken": "OT__6dHAgJo6qeg62qIroA7H7_f_NWZZ6IEx4jiYpVJ8SzQ_",
    "UniqueID": "paymentID3022",
    "Capture": true,
    "TargetCountryISO": "CL",
    "Currency": "CLP",
    "Amount": 25000,
    "Installments": 1,
    "Order": "CH2023-001",
    "Description": "Purchase Test",
    "Customer": {
        "FirstName": "Joao",
        "LastName": "Silva",
        "ReferenceCode": "JS-001",
        "PhoneNumber": "11987654321",
        "DocumentNumber": "12345678901",
        "DocumentType": "RUT.CL",
        "Email": "joao.silva@example.com",
        "Address": {
            "Country": "CL",
            "City": "Santiago de Chile",
            "State": "SP",
            "PostalCode": "01310-200",
            "AddressDetail": "Avenida Paulista 1000"
        }
    }
}

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": "CLP",
    "Installments": 1,
    "TaxableAmount": null,
    "Tip": null,
    "Url": "https://api.stage.bamboopayment.com/Purchase/79632697147789184",
    "MetadataOut": null,
    "Action": null,
    "PaymentMethod": {
        "Brand": "Visa",
        "CardOwner": "Joao Silva",
        "Bin": "450799",
        "IssuerBank": "Santander",
        "Type": "CreditCard",
        "Expiration": "203008",
        "Last4": "4905"
    }
}

Testing cards

Use the following cards to simulate the different status of the purchase. These cards apply for both API and redirection flow.

For approved purchases

BrandPANCVVExpiration DateType
Amex370000000002032123410/29Credit
Visa405188560044662312310/29Credit
Visa405188600005659012310/29Prepaid

For rejected purchases

BrandPANCVVExpiration DateType
MasterCard518605955959056812310/29Credit
MasterCard518617411062948012310/29Prepaid
footer
Last modified December 20, 2024

© Bamboo | All rights reserved 2024