Format the amount value
Last updated: April 23, 2025
When you specify an amount in an API request, you must format the value based on the currency you specify to ensure we process the correct amount. For example, when you request a payment or request an authentication session.
Depending on the currency, you may need to provide:
Additionally, the value you provide in the payment request's amount field must:
- Be greater than zero
- Not contain decimals
- Not contain more than 9 digits
For the following currencies, the amount you specify determines the final amount, without any additional calculations. For example, the following payment request with amount set to 100 results in a charge of 100 Japanese Yen:
1{2"source": {3"type": "card",4"number": "4242424242424242",5"expiry_month": 12,6"expiry_year": 20307},8"amount": 100,9"currency": "JPY"10}
| Currency code | Currency name |
|---|---|
BIF | Burundian Franc |
DJF | Djiboutian Franc |
GNF | Guinean Franc |
ISK | Icelandic Krona |
JPY | Japanese Yen |
KMF | Comoran Franc |
KRW | South Korean Won |
PYG | Paraguayan Guarani |
RWF | Rwandan Franc |
UGX | Ugandan Shilling |
VUV | Vanuatu Vatu |
VND | Vietnamese Dong |
XAF | Central African Franc |
XOF | West African CFA franc |
XPF | Comptoirs Français du Pacifique |
For the following currencies, the amount you specify is divided by 1000 to determine the final amount. For example, the following payment request with amount set to 100000 results in a charge of 100 Bahraini Dinar:
1{2"source": {3"type": "card",4"number": "4242424242424242",5"expiry_month": 12,6"expiry_year": 20307},8"amount": 100000,9"currency": "BHD"10}
Information
If you request a payment with one of these currencies, the last digit must always be a 0. For example, an amount value of 1001 is invalid.
| Currency code | Currency name |
|---|---|
BHD | Bahraini Dinar |
IQD | Iraqi Dinar |
JOD | Jordanian Dinar |
KWD | Kuwaiti Dinar |
LYD | Libyan Dinar |
OMR | Omani Rial |
TND | Tunisian Dinar |
For all other currencies, the amount you specify is divided by 100 to determine the final amount. For example, the following payment request with amount set to 10000 results in a charge of 100 US Dollars:
1{2"source": {3"type": "card",4"number": "4242424242424242",5"expiry_month": 12,6"expiry_year": 20307},8"amount": 10000,9"currency": "USD"10}
Note
If you request a payment with currency set to CLP (Chilean Peso), the last two digits of the amount must be 00. For example, an amount value of 100010 is invalid.