Configuration
Configure the FloPay SDK environment for staging or production.
Configuration
The FloPay SDK needs to know which environment to use — staging or production. This determines which billing API URL is used for all operations.
Programmatic Configuration (Recommended)
Call configureFlopay() once at app startup:
Use 'staging' during development and 'production' in live environments.
Per-Component Override
For advanced use cases, you can override the billing API URL on individual components:
Resolution Priority
The SDK resolves the billing API URL in this order:
- Explicit
billingApiUrlprop — highest priority, per-component override configureFlopay()setting — global programmatic config- Fallback — staging (
https://api.stage.flopay.com)
URL Mapping
| Environment | Billing API URL |
|---|---|
staging | https://api.stage.flopay.com |
production | https://api.flopay.com |
Server-Side Usage
For server-side code (API routes, Node.js), use resolveBillingApiUrl():
This reads the configured global environment or falls back to the staging billing API when none is set.