Currencies
Format multi-currency amounts as minor-unit integers and lowercase ISO 4217 codes in the Pay.com API.
Pay.com supports transactions in over 100 currencies. Pass every API amount as an integer in the currency's minor unit (the smallest denomination) to avoid floating-point rounding errors. Passing a decimal amount returns a validation error.
Minor units
Every currency belongs to one of three minor-unit categories.
Most currencies divide into 100 minor units. Multiply the display amount by 100.
| Currency | Display amount | API value |
|---|---|---|
| USD | $10.00 | 1000 |
| GBP | £5.50 | 550 |
| EUR | €100.00 | 10000 |
Currency codes
Specify currencies using the three-letter ISO 4217 code in lowercase. Responses always return lowercase currency codes.
| Currency | ISO 4217 code | Minor unit |
|---|---|---|
| US Dollar | usd | 2 decimal places |
| Euro | eur | 2 decimal places |
| British Pound | gbp | 2 decimal places |
| Japanese Yen | jpy | Zero-decimal |
| South Korean Won | krw | Zero-decimal |
| Kuwaiti Dinar | kwd | 3 decimal places |
This request charges $10.00 USD:
{
"amount": 1000,
"currency": "usd",
"source": "pm_card_685125127054035968"
}Verifying amounts
Every API response includes amount_human_readable, formatted in the
currency's major unit. Use it during development to confirm your minor-unit
conversion.
{
"amount": 1000,
"currency": "usd",
"amount_human_readable": "10.00"
}To convert amounts between currencies before sending a request, use the exchange rates API.