Skip to main content
Both SDKs include convenience helpers for common tasks. These are custom modules that ship alongside the generated SDK code.

Format amounts

Format a numeric amount as a localized currency string:
The TypeScript helper uses 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 by Intl.NumberFormat.

Generate idempotency keys

Generate a unique key for POST requests to prevent duplicate operations:
Keys are prefixed with 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:
If a duplicate key is detected for the same user, the API returns a 409 Conflict response.

Convert between cents and dollars

dollarsToCents / dollars_to_cents rounds the result to avoid floating-point precision issues.
Last modified on April 17, 2026