Overview
Trile API (v1)
Section titled “Trile API (v1)”Recurring subscription billing for Nepal. This is a curated snapshot of the public /v1 API. Regenerate the full spec from a running backend with npm run sync:openapi (pulls /docs-json).
All successful responses are wrapped in an envelope: { "success": true, "data": <result>, "meta": { "requestId": "req_..." } }. Errors use { "success": false, "error": { "code", "message" }, "meta": {...} }. The schemas below describe the data payload.
- OpenAPI version: 3.1.0
Authentication
Section titled “ Authentication ”ApiKeyAuth
Section titled “ApiKeyAuth ”Secret API key. Test keys are prefixed nep_test_, live keys nep_live_. Send it as x-api-key: nep_live_.... Never expose it in client-side code.
Security scheme type: apiKey
Header parameter name: x-api-key
SessionAuth
Section titled “SessionAuth ”Better Auth session cookie. Used by end-user (phone-OTP) and merchant-dashboard endpoints, not the public integration API.
Security scheme type: apiKey
Cookie parameter name: trile.session_token