Test mode & going live
Trile separates test and live entirely at the API-key level.
How environments are separated
Section titled “How environments are separated”| Test | Live | |
|---|---|---|
| API key prefix | nep_test_ | nep_live_ |
| Real money | No | Yes |
| Data | Isolated sandbox | Production |
| Payment providers | Simulated / provider sandboxes | Real eSewa, Khalti, IME Pay, bank |
An API key carries its environment server-side. You never pass an environment flag — the key
is the environment. Test objects and live objects never mix; a prod_… created with a test
key is not visible to a live key.
Develop against test mode
Section titled “Develop against test mode”Use a nep_test_ key for everything in the Quickstart. You can
freely create products, prices, customers, and subscriptions, and drive the wallet/checkout
flows against provider sandboxes without moving real funds.
Going-live checklist
Section titled “Going-live checklist”- Business onboarding / KYC complete in the merchant dashboard (some
/v1calls returnonboarding_incompleteuntil this is done). - Webhook endpoint registered against your production URL, and you’ve verified the signature check against a real delivery.
- Your integration stores the
Idempotency-Keyyou send, so retries are safe. - You handle
insufficient_fundsandpast_due— the wallet model means a renewal can fail simply because the customer’s balance ran out. - You read amounts as string paisa and never coerce them to floats. See Money & paisa.
- Swap
nep_test_fornep_live_in your server config (env var, secret manager — never in source).
Switching keys
Section titled “Switching keys”Only the key changes. Same base URL, same endpoints, same payloads:
x-api-key: nep_test_...x-api-key: nep_live_...