Credit cards
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 |
---|---|---|---|
TrxToken | string | Yes | The token that identifies the customer’s card. For more information about how to create the token, refer to Customers. |
TargetCountryISO | string | Yes | Indicate the destination country. |
Description | string | Yes | As acquirer requirement, send the purchase description using the following format. MerchantName+OrderId+ [merchantUrl] .Example: TestCommerce #order2572023, [testcommerce.com.br] . |
Customer → Email | string | Yes | Customer’s email. |
Customer → FirstName | string | Yes | Customer’s first name. |
Customer → LastName | string | Yes | Customer’s last name. |
Customer → DocumentType | string | Yes | Customer’s document type. Refer to the Document types table to see the possible values. |
Customer → DocumentNumber | string | Yes | Customer’s Document Number. |
Customer → PhoneNumber | string | Yes | Customer’s phone number. |
Customer → Address → Country | string | No | Customer’s Country. |
Customer → Address → State | string | Yes | Customer’s State. Refer to states of residence to know its possible values. |
Customer → Address → City | string | Yes | Customer’s City. |
Customer → Address → AddressDetail | string | Yes | Customer’s Address Detail. |
Customer → Address → PostalCode | string | Yes | Customer’s Postal Code. Do not include hyphens. |
Info
Remember that for the Anti-fraud system’s correct functioning, we suggest sending additional data described in the section Anti-fraud.
Request example
{
"TrxToken": "OT__6dHAgJo6qeg62qIroA7H7_f_NWZZ6IEx4jiYpVJ8SzQ_",
"UniqueID": "paymentID3022",
"Capture": true,
"TargetCountryISO": "BR",
"Currency": "BRL",
"Amount": 25000,
"Installments": 1,
"Order": "CH2023-001",
"Description": "Compra de teste",
"Customer": {
"FirstName": "João",
"LastName": "Silva",
"ReferenceCode": "JS-001",
"PhoneNumber": "11987654321",
"DocumentNumber": "12345678901",
"DocumentType": "CPF.BR",
"Email": "joao.silva@example.com",
"Address": {
"Country": "BR",
"City": "São Paulo",
"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": "BRL",
"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.
Brand | PAN | CVV | Expiration Date |
---|---|---|---|
Mastercard | 5555666677778884 | 123 | 12/29 |
Visa | 4984123412341234 | 123 | 12/29 |
Info
To ensure successful testing, please use the following specific details: docNumber: “13394559358” and docType: “24” (CPF). Failure to use these details may result in unsuccessful transactions.