Skip to content

Test mode & going live

Trile separates test and live entirely at the API-key level.

TestLive
API key prefixnep_test_nep_live_
Real moneyNoYes
DataIsolated sandboxProduction
Payment providersSimulated / provider sandboxesReal 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.

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.


  • Business onboarding / KYC complete in the merchant dashboard (some /v1 calls return onboarding_incomplete until 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-Key you send, so retries are safe.
  • You handle insufficient_funds and past_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_ for nep_live_ in your server config (env var, secret manager — never in source).

Only the key changes. Same base URL, same endpoints, same payloads:

x-api-key: nep_test_...
x-api-key: nep_live_...