Purchase Preview
Overview
When a buyer performs a purchase, the final amount may be modified for several reasons:
- Currency conversion (e.g. USD to the local currency of the destination country).
- Commissions to be paid by the customer.
- Taxes (for example, in Argentina several taxes affect the final amount).
As a consequence, the merchant cannot show the real amount that will be charged until the purchase is processed. Purchase Preview solves this: it returns the calculated amounts, taxes, charges, and exchange rate for a given payment without creating a transaction, so you can show the customer the real amount before they confirm.
The preview also returns a QuoteId that you can send in the Create Purchase request to honor the quoted exchange rate.

This guide documents the v3 Purchase Preview. The preview mirrors the Create Purchase request, so the same payment instrument and customer data produce an accurate quote.
Choose your flow
As with Create Purchase, the preview has two variants depending on your PCI compliance level. Use the option that matches your integration:
Only one payment instrument should be included in your request:
CardData(PCI only),TrxToken, orPaymentMethod.
Choose your environment
Use these endpoints when the payment is tokenized through Bamboo's Tokenization Form or processed via an alternative payment method.
| Environment | Endpoint |
|---|---|
| Staging | https://api.stage.bamboopayment.com/v3/api/Purchase/Preview |
| Production | https://api.bamboopayment.com/v3/api/Purchase/Preview |
PCI-Certified Merchants (raw card data)
Use these endpoints when sending card data directly (PAN, CVV, Expiration). Available only for merchants certified under PCI DSS.
| Environment | Endpoint |
|---|---|
| Staging | https://secure-api.stage.bamboopayment.com/v3/api/purchase/preview |
| Production | https://secure-api.bamboopayment.com/v3/api/purchase/preview |
Only PCI-certified merchants can access the secure
secure-apiendpoints.
Note
Remember to include your merchant's Private Key in the request headers.
Building the request
The preview accepts the same identifying fields as a purchase. The taxes and exchange rate depend on the amount, currency, destination country, payment instrument, and customer data, so provide as much of it as you can for an accurate quote.
Request parameters
| Parameter | Type | Mandatory? | Description |
|---|---|---|---|
CardData | object | No¹ (PCI) | Raw card details. Available only on the PCI endpoint. |
TrxToken | string | No¹ | Card token previously generated through the tokenization flow. |
PaymentMethod | string | No¹ | Payment method identifier (alternative methods such as cash or bank transfer). |
NetworkToken | object | No¹ | Network token information used in the transaction. |
Amount | integer (64bit) | Yes | Amount with two decimals, no separators (12.25 → 1225). |
Currency | string | Yes | ISO-4217 currency of Amount. |
TargetCountryISO | string | Yes | Country where the payment will be processed (ISO-3166-1). |
TaxableAmount | integer (64bit) | No | Taxable amount (two-decimal format). |
Tip | integer (64bit) | No | Tip amount (two-decimal format). |
Installments | integer | No | Number of installments. |
Order | string | No | Merchant order number. |
InvoiceNumber | string | No | Invoice number. |
UniqueID | string | No | Unique identifier to avoid duplicates. |
Customer | object | No² | Customer details. Required for some countries (e.g. Argentina) to compute taxes correctly. |
LoyaltyPlan | object | No | Loyalty plan information. Non-PCI endpoint only. |
CommerceKey | object | No | Commerce key information. PCI endpoint only. |
Language | string | No | Response language. PCI endpoint only. |
1 One of CardData (PCI), TrxToken, NetworkToken, or PaymentMethod identifies the payment instrument. 2 For countries such as Argentina, Customer (with DocumentType, DocumentNumber and Address.State) is required to calculate the applicable taxes.
CardData object (PCI merchants only)
| Parameter | Type | Description |
|---|---|---|
CardHolderName | string | Name as printed on the card. |
Pan | string | Card number (PAN). |
CVV | string | Card security code. |
Expiration | string | MM/YY. |
Email | string | Cardholder email. |
Document | string | Cardholder document number. |
For non-PCI merchants, card payments must be tokenized using the Tokenization Form; send the resulting
TrxTokeninstead ofCardData.
Customer object
| Parameter | Type | Description |
|---|---|---|
Customer → FirstName | string | Customer first name. |
Customer → LastName | string | Customer last name. |
Customer → DocumentNumber | string | Document number. Required for tax calculation in some countries. |
Customer → DocumentType | string | Type of identification document. |
Customer → PhoneNumber | string | Payer's phone number. |
Customer → Email | string | Payer's email address. |
Customer → Address | object | Billing address. Provides location data used for tax calculation. |
Address object
| Parameter | Type | Description |
|---|---|---|
Address → Country | string | Country of residence or billing. |
Address → City | string | City of residence. |
Address → State | string | State or region. Mandatory for Argentina to calculate taxes. |
Address → PostalCode | string | Postal or ZIP code. |
Address → AddressDetail | string | Street, number, and unit or apartment. |
Example with Token (Non-PCI)
To test this endpoint, use the API Reference or the Postman Collection
{
"TrxToken": "OT__6dHAgJo6qeg62qIroA7H7_f_NWZZ6IEx4jiYpVJ8SzQ_",
"Amount": 10000,
"Currency": "USD",
"TargetCountryISO": "AR",
"Installments": 1,
"Order": "AR-2025-0001",
"Customer": {
"FirstName": "Juan",
"LastName": "Pérez",
"Email": "[email protected]",
"DocumentType": "DNI.AR",
"DocumentNumber": "20222222223",
"Address": {
"Country": "AR",
"State": "Buenos Aires",
"PostalCode": "8512"
}
}
}Example with Card Data (PCI)
To test this endpoint, use the API Reference or the Postman Collection
{
"CardData": {
"CardHolderName": "Juan Pérez",
"Pan": "4507990000004905",
"CVV": "123",
"Expiration": "08/30",
"Email": "[email protected]",
"Document": "20222222223"
},
"Amount": 10000,
"Currency": "USD",
"TargetCountryISO": "AR",
"Installments": 1,
"Order": "AR-2025-0001",
"Customer": {
"FirstName": "Juan",
"LastName": "Pérez",
"Email": "[email protected]",
"DocumentType": "DNI.AR",
"DocumentNumber": "20222222223",
"Address": {
"Country": "AR",
"State": "Buenos Aires",
"PostalCode": "8512"
}
}
}Response
The preview returns the destination currency, the total amount the customer will be charged, the exchange rate applied, and the breakdown of charges and taxes.
| Parameter | Type | Description |
|---|---|---|
QuoteId | string | Quote identifier. Send it in the Create Purchase request to honor this quoted exchange rate. |
CurrencyCode | string | ISO code of the destination currency (the currency in which the customer will be charged). |
TotalAmount | number | Total final amount in the destination currency, after applying taxes, conversions, etc. |
ExchangeRate | object | Exchange rate applied to convert the origin currency into the destination currency. |
Charges | array | Breakdown of the amounts that make up the total (subtotals and taxes). |
ErrorCode | string | Error code, if the preview could not be calculated. |
ErrorDescription | string | Error description, if applicable. |
ExchangeRate object
| Field | Type | Description |
|---|---|---|
Value | number | Value the origin currency is equivalent to in the destination. |
Code | string | Identifier of the exchange rate applied. |
Charges object
| Field | Type | Description |
|---|---|---|
CurrencyCode | string | ISO code of the currency of the amount. |
AmountCategoryCode | string | Amount category (e.g. gross amount, tax). |
Amount | number | Value of the amount. |
Sign | string | Indicates if the amount is a Debit or Credit movement. |
ResponsibleType | string | Party responsible for the charge: Merchant or Buyer. |
ExchangeRate | object | Exchange rate applied to this charge, when relevant. |
Tax | object | Tax detail (Code, Name, Percentage) when the charge corresponds to a tax. |
Response Example
{
"ErrorCode": null,
"ErrorDescription": null,
"QuoteId": "b3f1c2a4-9d6e-4f02-8a1b-7c2e5d4f6a90",
"CurrencyCode": "ARS",
"TotalAmount": 58865.98,
"ExchangeRate": {
"Value": 402.09,
"Code": "USD/ARS"
},
"Charges": [
{
"CurrencyCode": "ARS",
"AmountCategoryCode": "Gross",
"Amount": 40209.00,
"Sign": "Debit",
"ResponsibleType": "Buyer",
"ExchangeRate": {
"Value": 402.09,
"Code": "USD/ARS"
},
"Tax": null
},
{
"CurrencyCode": "ARS",
"AmountCategoryCode": "Tax",
"Amount": 9650.16,
"Sign": "Debit",
"ResponsibleType": "Merchant",
"ExchangeRate": null,
"Tax": {
"Code": "AR-VAT-DIGITAL",
"Name": "VAT",
"Percentage": 20.0
}
},
{
"CurrencyCode": "ARS",
"AmountCategoryCode": "Tax",
"Amount": 965.02,
"Sign": "Debit",
"ResponsibleType": "Merchant",
"ExchangeRate": null,
"Tax": {
"Code": "AR-INGR-BRUTOS",
"Name": "II.BB",
"Percentage": 2.0
}
}
]
}Test the API
Test your preview integration in the API Reference:
