Introduction
Trile is a subscription billing and payment platform for Nepal. SaaS businesses integrate Trile’s APIs to charge recurring payments; their customers fund a Trile wallet that auto-deducts on each billing cycle.
The problem
Section titled “The problem”Nepal’s payment ecosystem (eSewa, Khalti, Fonepay) has no native support for recurring or scheduled charges, and Nepali banks do not offer Variable Recurring Payments (VRP). So building a subscription business in Nepal has meant manual monthly collection, pre-paid credits, or routing through international gateways that most local customers can’t use.
Trile fills that gap: a customer authorizes once, tops up a wallet, and Trile deducts each cycle automatically — within Nepal Rastra Bank’s (NRB) regulatory framework.
The wallet model in one paragraph
Section titled “The wallet model in one paragraph”Because there’s no card-on-file rail, Trile inverts the usual flow. Instead of pulling from a
card every month, the customer maintains a prepaid wallet balance. When a subscription
renews, Trile deducts the cycle amount from the wallet. If the wallet can’t cover a cycle, the
subscription goes past_due and the customer is prompted to top up. See
The wallet model for the full lifecycle.
What you can build
Section titled “What you can build”- Recurring subscriptions — monthly/annual plans with trials, billed from the wallet.
- Hosted checkout — a Trile-hosted page where a customer tops up and subscribes in one flow.
- Usage you reconcile yourself — an append-only event log and webhooks keep your system in sync.
Principles you’ll feel across the API
Section titled “Principles you’ll feel across the API”| Principle | What it means for you |
|---|---|
| Money is paisa | Every amount is integer paisa (NPR × 100) as a string. Never send floats. See Money & paisa. |
| Idempotency is mandatory | Every POST/PATCH/DELETE requires an Idempotency-Key. See Idempotency. |
| Everything is enveloped | Responses are { success, data, meta }. See the API envelope. |
| IDs are prefixed & sortable | cus_…, sub_…, price_… — ULID-based. See Object IDs. |
| Test before live | nep_test_ keys hit a sandbox; nep_live_ keys move real money. See Test mode. |
- New to Trile? Read How Trile works.
- Ready to build? Jump to the Quickstart.