Base URL
Content-Type: application/json) over
HTTPS.
Environments
There are no separate sandbox hosts. The environment is determined by the key you authenticate with:| Environment | Secret key prefix | Behavior |
|---|---|---|
| Test | sf_test_sk_ | Routes against sandbox gateways; test cards control outcomes |
| Live | sf_live_sk_ | Real captures on your live gateway accounts |
Idempotency
POST /payment-sessions accepts an optional Idempotency-Key header (any
unique string; a UUID is conventional). Retrying a request with the same key
returns the original session instead of creating a duplicate. Strongly
recommended — network timeouts on payment calls are exactly when you need
safe retries.
Money
Amounts are integer minor units (amountMinor): 4900 means USD 49.00,
INR 49.00, etc. Currency is an ISO 4217 alpha-3 code ("USD").
Health
GET https://api.switchflows.net/api/v1/meta is an unauthenticated liveness
probe returning the service name and server time — useful for your monitoring.