Get started
Money and currencies
Every amount the API takes or returns: its unit, its currency, its USD cents and its rate.
Smallest-unit integers
Every amount is an integer in the currency's smallest unit: cents for USD and EUR, paise for INR. There are no decimal amounts anywhere in the API. 150000 in INR is INR 1,500.00; 2990 in USD is USD 29.90. Currencies without a minor unit count whole units, and a few count thousandths:
Zero-decimal currencies
| Code | Currency | Smallest unit | Example |
|---|---|---|---|
| BIF | Burundian Franc | 1 = 1 unit | BIF 1,500 is 1500 |
| CLP | Chilean Peso | 1 = 1 unit | CLP 1,500 is 1500 |
| DJF | Djiboutian Franc | 1 = 1 unit | DJF 1,500 is 1500 |
| GNF | Guinean Franc | 1 = 1 unit | GNF 1,500 is 1500 |
| ISK | Icelandic Króna | 1 = 1 unit | ISK 1,500 is 1500 |
| JPY | Japanese Yen | 1 = 1 unit | JPY 1,500 is 1500 |
| KMF | Comorian Franc | 1 = 1 unit | KMF 1,500 is 1500 |
| KRW | South Korean Won | 1 = 1 unit | KRW 1,500 is 1500 |
| PYG | Paraguayan Guarani | 1 = 1 unit | PYG 1,500 is 1500 |
| RWF | Rwandan Franc | 1 = 1 unit | RWF 1,500 is 1500 |
| UGX | Ugandan Shilling | 1 = 1 unit | UGX 1,500 is 1500 |
| VND | Vietnamese Dong | 1 = 1 unit | VND 1,500 is 1500 |
| VUV | Vanuatu Vatu | 1 = 1 unit | VUV 1,500 is 1500 |
| XAF | Central African CFA Franc | 1 = 1 unit | XAF 1,500 is 1500 |
| XOF | West African CFA Franc | 1 = 1 unit | XOF 1,500 is 1500 |
| XPF | CFP Franc | 1 = 1 unit | XPF 1,500 is 1500 |
Three-decimal currencies
| Code | Currency | Smallest unit | Example |
|---|---|---|---|
| BHD | Bahraini Dinar | 1,000 = 1 unit | BHD 1.500 is 1500 |
| IQD | Iraqi Dinar | 1,000 = 1 unit | IQD 1.500 is 1500 |
| JOD | Jordanian Dinar | 1,000 = 1 unit | JOD 1.500 is 1500 |
| KWD | Kuwaiti Dinar | 1,000 = 1 unit | KWD 1.500 is 1500 |
| LYD | Libyan Dinar | 1,000 = 1 unit | LYD 1.500 is 1500 |
| OMR | Omani Rial | 1,000 = 1 unit | OMR 1.500 is 1500 |
| TND | Tunisian Dinar | 1,000 = 1 unit | TND 1.500 is 1500 |
Item and transaction fields
A field name says what the money belongs to, what it is and its unit. Items are anything priced or billed: prices, payment links, coupons, subscriptions, checkout sessions, invoices, quotes and credit notes. Transactions are money that actually moved: payments, refunds, disputes, payouts, external transactions and Connect charges. Each amount is stored once in its local currency and once in USD cents, with the rate.
| Field | Kind | Holds | Example |
|---|---|---|---|
| itemLocalCurrency | item | ISO 4217 code the merchant priced the item in | INR |
| itemLocalCurrencyAmount | item | The price in itemLocalCurrency, smallest unit | 150000 (INR 1,500.00) |
| itemAmountUsdCents | item | The same price in USD cents | 1575 (USD 15.75) |
| itemUsdToLocalCurrencyRate | item | 1 USD = X itemLocalCurrency, fixed when priced | 95.2253 |
| transactionLocalCurrency | transaction | Currency the money actually moved in (what the gateway charged or refunded) | INR |
| transactionLocalCurrencyAmount | transaction | Amount in transactionLocalCurrency, as the gateway reported it | 150000 |
| transactionAmountUsdCents | transaction | The same amount in USD cents | 1575 |
| transactionUsdToLocalCurrencyRate | transaction | 1 USD = X transactionLocalCurrency, the rate used for this transaction | 95.2253 |
Records with several amounts repeat the pair for each part, sharing one currency and one rate:
| Record | Fields |
|---|---|
| Checkout session, invoice, quote, credit note | itemSubtotal…, itemTax…, itemDiscount… (and itemConvenienceFee… on sessions), each as …LocalCurrencyAmount / …AmountUsdCents; the total is itemLocalCurrencyAmount / itemAmountUsdCents |
| Payment | transactionFee…, transactionNet…, transactionRefunded… as …LocalCurrencyAmount / …AmountUsdCents |
| Customer | totalSpendAmountUsdCents only: a customer has no currency of its own |
Worked example (INR)
A price of INR 1,500.00 when 1 USD = 95.2253 INR is stored as itemLocalCurrency: "INR", itemLocalCurrencyAmount: 150000, itemAmountUsdCents: 1575 (150000 / 95.2253, rounded) and itemUsdToLocalCurrencyRate: 95.2253. An Indian customer who pays it on a gateway that charges INR produces this payment:
{
"data": {
"id": "ph_pay_0c1d2e3f4a5b6c7d8e9f0a1b2c3d4e5f",
"transactionLocalCurrency": "INR",
"transactionLocalCurrencyAmount": 150000,
"transactionAmountUsdCents": 1575,
"transactionUsdToLocalCurrencyRate": 95.2253,
"transactionFeeAmountUsdCents": 46,
"transactionNetAmountUsdCents": 1529
},
"error": null
}Show people the local amount with its currency (INR 1,500.00). Never recompute it from USD cents times the rate: the exact local amount is stored.
USD cents for totals
Records of different currencies can only be added through their …AmountUsdCents fields. Never add …LocalCurrencyAmount fields across records: they mix currencies. Analytics, reports, balances and customer spend (totalSpendAmountUsdCents) are all USD cents. Refunds and captures take transactionAmountUsdCents; the gateway is refunded in the payment's own transactionLocalCurrency, scaled pro rata.
Rate direction
Every rate is 1 USD = X local currency: 95.2253 for INR, 0.92 for EUR, 1 for USD. Local amount = USD cents x rate x (smallest units per unit / 100). Item rates are fixed when the item is priced; transaction rates are the rate used for that transaction. Live rates come from a public feed and every rate fetched is kept in the rate history.
When itemLocalCurrency is required
There is no default currency. A request that names only your own prices takes their currency; any amount you send inline needs itemLocalCurrency, because nothing else says what currency it is in.
| Endpoint | itemLocalCurrency required | Taken from your prices when |
|---|---|---|
| POST /v1/checkout-sessions | Required with any inline line (unitPrice without priceId) | Every line item, and priceId / metadata.priceId, names one of your prices |
| POST /v1/invoices | Required with any item without priceId, or a bare itemLocalCurrencyAmount | Every item has a priceId |
| POST /v1/quotes | Required with any line without priceId | Every line has a priceId |
| POST /v1/payment-links | Required without priceId | priceId is set (the link also takes the price's amount when itemLocalCurrencyAmount is omitted) |
| POST /v1/coupons (fixed amount) | Required without appliesTo | Every appliesTo price shares one currency |
| POST /v1/prices | Always required: a price states its own currency | Never |
| POST /v1/subscriptions | Not sent: billed in its prices' currency (priceData takes itemLocalCurrency) | Always from the prices |
| POST /v1/credit-notes | Not needed: the credited invoice's or payment's currency | Always from the credited document |
POST /api/v1/checkout-sessions
{
"mode": "payment",
"lineItems": [{ "priceId": "ph_pri_c20ad4d76fe97759aa27a0c99bff6710", "quantity": 1 }],
"successUrl": "https://yoursite.com/success"
}{
"data": {
"id": "ph_cks_9f2c4e1a7b3d5f6081a2b3c4d5e6f708",
"itemLocalCurrency": "INR",
"itemUsdToLocalCurrencyRate": 95.2253,
"itemLocalCurrencyAmount": 150000,
"itemAmountUsdCents": 1575,
"lineItems": [
{ "priceId": "ph_pri_c20ad4d76fe97759aa27a0c99bff6710", "description": "Pro plan", "quantity": 1, "unitPrice": 150000, "total": 150000 }
]
},
"error": null
}Prices in different currencies cannot share one session, invoice, quote or link: the request is refused with 400 CURRENCY_MISMATCH, naming each price. When you send itemLocalCurrency, every price must be in it (the same error otherwise). Prices are never converted silently.
{
"data": null,
"error": {
"code": "CURRENCY_MISMATCH",
"message": "The prices are in different currencies: lineItems[0].priceId ph_pri_c20a... (INR), lineItems[1].priceId ph_pri_6512... (USD). One session has one currency; send prices in one currency",
"fields": { "lineItems[0].priceId": "Priced in INR", "lineItems[1].priceId": "Priced in USD" }
}
}Charge currency at checkout
The hosted checkout shows the price in the currency the selected gateway will actually charge, in this order:
- The customer's regional currency, if the gateway and the connection's currency list support it. The region is the customer country you provide (
customerCountryon the session, or the country of thecustomerIdyou pass); without one, the country the customer is browsing from (their IP address); without that, the browser's language and timezone. - Otherwise USD, if the gateway supports it. A customer who chooses "Show in USD" is charged in USD.
- Otherwise the item's own
itemLocalCurrency(for example an INR-only gateway). - Otherwise the payment is refused with 422
UNSUPPORTED_CURRENCY.
A converted price uses the live rate. The server recomputes the amount the customer was shown and refuses with 409 PRICE_CHANGEDif it moved by more than 1%. What was charged is stored as the payment's transactionLocalCurrency and transactionLocalCurrencyAmount.
Webhook amounts
Webhooks keep Stripe's object shapes so existing handlers work: amount, amount_total, amount_refunded and unit_amount are the local amount in currency (lowercase ISO). Every money object also carries amount_usd_cents and usd_to_local_currency_rate. This is a wire format only; the REST API uses the field names above.
{
"type": "checkout.session.completed",
"data": {
"object": {
"object": "checkout.session",
"amount_total": 150000,
"currency": "inr",
"amount_usd_cents": 1575,
"usd_to_local_currency_rate": 95.2253
}
}
}