Skip to main content
The OriginBills API is a fast, developer-friendly RESTful interface designed to integrate utility billing, mobile recharge operations, and wallet balance management directly into your application. Built on top of a highly responsive, modern architecture, the API allows you to programmatically perform operations such as:
  • Checking wallet balances
  • Fetching active recharge operators
  • Creating and initiating mobile recharge transactions
  • Querying live transaction and recharge statuses
  • Fetching BBPS bills
  • Pay BBPS Bills

Global API Configuration

Authentication

All API requests under the /v1 namespace must be authenticated. The API utilizes standard HTTP Basic Authentication using a public key and a secret key generated from your OriginBills account settings.

1. Generating Credentials

Your API credentials consist of a key pair:
  • Public Key (pb_live_...)
  • Secret Key (sk_live_...)

2. Format

Combine your Public Key and Secret Key separated by a colon (:), and encode the resulting string in Base64:

3. Request Header

Pass the Base64-encoded string in the standard HTTP Authorization header prefixed with Basic :

Curl Example:

4. Query Parameter Fallback (GET Requests only)

For simple GET requests, you can optionally pass your credentials as a query parameter named authorization:

Request & Response Format

  • Content-Type: For write operations (POST, PUT), request bodies must be sent as JSON (application/json).
  • Response Format: All response bodies are returned in JSON.
  • Timezone: All timestamps processed and returned by the API are in Indian Standard Time (IST - Asia/Kolkata / UTC+05:30).

Error Handling

OriginBills uses standard HTTP response codes to indicate the success or failure of an API request:
  • 2xx (Success): Indicates that the request was successfully received, understood, and accepted.
  • 4xx (Client Errors): Indicates that the request contains bad syntax or cannot be fulfilled (e.g., unauthorized access, invalid request payload, or missing query parameters).
  • 5xx (Server Errors): Indicates that the server failed to fulfill an apparently valid request.

Generic Error Response Schema

When an authentication or syntax error occurs, the API returns a response in the following format: