Format amounts
Format a numeric amount as a localized currency string:Intl.NumberFormat for locale-aware formatting. The Python helper uses a built-in currency symbol map and is thread-safe.
Supported currencies
The Python helper includes built-in formatting for: USD, EUR, GBP, JPY, CAD, AUD, MXN, BRL, CNY, INR, KRW, and CHF. The TypeScript helper supports any currency code recognized byIntl.NumberFormat.
Generate idempotency keys
Generate a unique key for POST requests to prevent duplicate operations:idk_ followed by 32 random hex characters. Pass the key in the Idempotency-Key header or the idempotency_key field on supported endpoints like POST /actions:
409 Conflict response.
Convert between cents and dollars
dollarsToCents / dollars_to_cents rounds the result to avoid floating-point precision issues.