UdhaarBill data API: GST invoices and udhaar
Khatabook Credit Account Book is Collibet India's digital khata and GST billing app for Indian kirana shops, garment traders and other MSMEs who still keep customer udhaar on paper. Listed on Play under package com.udhaarbill and branded inside the client as Billy, it replaces the bahi-khata with a customer and supplier ledger, GST or non-GST invoices, a product catalogue with HSN codes and unit types, WhatsApp payment reminders, a UPI QR on the bill, and Bluetooth thermal-printer receipts. Books live first in an encrypted on-device database so creating parties and invoices works offline; Google Sign-In unlocks cloud backup, multi-device sync, analytics (top debtors, collection efficiency, GST summary, payment-mode mix) and reminder templates as a Razorpay-billed Premium plan. The shop-profile screen stores logo, signature, GSTIN and invoice prefix so every PDF is ready to share, and the UI ships in English plus ten Indian languages (Hindi, Bengali, Gujarati, Kannada, Malayalam, Marathi, Odia, Punjabi, Tamil, Telugu). It sits in the same MSME billing niche as Khatabook, OkCredit, Vyapar and myBillBook, aimed at owners who want a phone-sized credit book rather than a desktop Tally setup.
Party outstanding on the khata stamps balance_due and outstanding_amount against customer_gstin, while GST bills carry invoice_number, gst_total and line-level hsn_code. Cloud sync copies those ledger rows between devices; Razorpay Checkout then flips is_premium and premium_expiry so backup, analytics and reminder templates stay on. Collection dashboards, GSTR-1 workbooks and a second billing counter all read the same party and invoice fields. openData Studio turns that surface into callable open data.
Screenshots
API surface
The endpoints and request/response examples below are reconstructed from the app's interface — illustrative, not a live capture.
Sign in with Google id_token
POST
/v1/sessions/exchangeosintExchanges a Google Sign-In id_token for the merchant session used by profile, device, sync and Razorpay calls. The returned auth_token is the Bearer value on every later request.
Auth: Unauthenticated bootstrap. Body carries the Google Sign-In id_token; the response auth_token is sent as Authorization: Bearer on later calls, with X-App-Version.
- id_token
- device_id
- auth_token
- refreshToken
- uid
- displayName
- is_premium
- premium_expiry
POST /v1/sessions/exchange HTTP/1.1 Content-Type: application/json X-App-Version: 1.1.2 { "id_token": "eyJhbGciOiJSUzI1NiIsImtpZCI6Imdvb2dsZS1leCJ9.example", "device_id": "a1b2c3d4e5f6" }{ "auth_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.example", "refreshToken": "rt_7c11ab", "uid": "usr_9f2a", "email": "[email protected]", "displayName": "Ramesh Kirana", "is_premium": false, "premium_expiry": null }Read signed-in merchant profile
GET
/v1/merchant/shop-profileosintReturns the signed-in merchant card shown on Settings: shop identity, GSTIN, UPI id, premium flag and last successful cloud sync.
Auth: Authorization: Bearer <auth_token> from POST /v1/sessions/exchange, plus X-App-Version.
- uid
- displayName
- shop_name
- shop_phone
- shop_address
- gstin
- upi_id
- is_premium
- premium_expiry
- last_sync_at
GET /v1/merchant/shop-profile HTTP/1.1 Authorization: Bearer <auth_token> X-App-Version: 1.1.2{ "uid": "usr_9f2a", "email": "[email protected]", "displayName": "Ramesh Kirana", "shop_name": "Ramesh Kirana Store", "shop_phone": "9876543210", "shop_address": "12 MG Road, Pune", "gstin": "27AABCU9603R1ZX", "upi_id": "ramesh@okaxis", "is_premium": true, "premium_expiry": "2027-03-14T00:00:00Z", "last_sync_at": "2026-10-17T08:12:00Z" }Register device, FCM token and Play Integrity
POST
/v1/account/devicesosintBinds the phone that holds the on-device books: FCM for reminder and sync-alert pushes, Play Integrity attestation, and the device_id used on later sync calls.
Auth: Authorization: Bearer <auth_token>. A Play Integrity attestation token and the device's FCM push token ride in the body.
- device_id
- device_name
- device_model
- fcm_token
- integrityToken
- status
- syncDeviceTelemetry
POST /v1/account/devices HTTP/1.1 Authorization: Bearer <auth_token> Content-Type: application/json X-App-Version: 1.1.2 { "device_id": "a1b2c3d4e5f6", "device_name": "Pixel 7", "device_model": "GP4BC", "fcm_token": "fcm-ex-44120", "integrityToken": "PI_TOKEN_EXAMPLE" }{ "device_id": "a1b2c3d4e5f6", "status": "REGISTERED", "syncDeviceTelemetry": true }Sign out merchant session
POST
/v1/sessions/revokeosintEnds the Google session from the Settings log-out tile and drops the device binding so FCM reminder pushes stop.
Auth: Authorization: Bearer <auth_token> from POST /v1/sessions/exchange.
- device_id
- status
- uid
POST /v1/sessions/revoke HTTP/1.1 Authorization: Bearer <auth_token> X-App-Version: 1.1.2 Content-Type: application/json { "device_id": "a1b2c3d4e5f6" }{ "status": "SIGNED_OUT", "uid": "usr_9f2a" }Push local khata, invoices and catalogue
POST
/v1/ledger/changesopenfinanceUploads unsynced on-device ledger rows — customers, invoices, line items, products and payments — so Premium cloud backup can restore them on another device.
Auth: Authorization: Bearer <auth_token>. Premium cloud-sync entitlement (is_premium) is required; free mode keeps rows on-device only.
- device_id
- customer_id
- customer_name
- customer_phone
- customer_gstin
- is_supplier
- outstanding_amount
- invoice_number
- due_date
- subtotal
- gst_percent
- gst_amount
- gst_total
- total_amount
- paid_amount
- balance_due
- hsn_code
- qty
- rate
- is_synced
- last_sync_at
- hasUnsyncedChanges
POST /v1/ledger/changes HTTP/1.1 Authorization: Bearer <auth_token> Content-Type: application/json X-App-Version: 1.1.2 { "device_id": "a1b2c3d4e5f6", "customers": [ { "customer_id": "c-88a1", "customer_name": "Mona Traders", "customer_phone": "9876501234", "customer_gstin": "27AAPCM1234F1Z5", "customer_address": "Lane 4, Camp, Pune", "is_supplier": false, "outstanding_amount": 12500.0, "is_synced": false, "updated_at": "2026-10-17T07:40:00Z" } ], "invoices": [ { "invoice_id": "inv-441", "invoice_number": "KB-2026-0441", "invoice_date": "2026-10-16", "due_date": "2026-10-30", "customer_id": "c-88a1", "subtotal": 11800.0, "discount_percent": 0, "discount_amount": 0, "gst_percent": 18, "gst_amount": 2124.0, "gst_total": 2124.0, "total_amount": 13924.0, "paid_amount": 1424.0, "balance_due": 12500.0, "is_gst": true, "status": "pending", "payment_method": "upi", "is_synced": false } ], "invoice_items": [ { "invoice_id": "inv-441", "product_id": "p-ata-1", "product_name": "Ashirvaad Atta 10kg", "hsn_code": "1101", "qty": 4, "rate": 2950.0, "gst_percent": 18, "gst_amount": 2124.0 } ], "products": [], "payments": [] }{ "status": "ACCEPTED", "hasUnsyncedChanges": false, "last_sync_at": "2026-10-17T08:12:00Z", "synced": { "customers": 1, "invoices": 1, "invoice_items": 1, "products": 0, "payments": 0 } }Pull cloud khata snapshot
GET
/v1/ledger/snapshotopenfinanceDownloads the cloud books after Google Sign-In or Restore from cloud, including shop GST settings and the customer / invoice / product rows that fill the home, Customers and Invoices tabs.
Auth: Authorization: Bearer <auth_token>. Same Premium cloud-sync gate as /v1/ledger/changes.
- last_sync_at
- shop_name
- gstin
- invoice_prefix
- invoice_counter
- default_gst_rate
- customers
- outstanding_amount
- invoices
- invoice_number
- balance_due
- gst_total
- products
- hsn_code
- rate
- payments
GET /v1/ledger/snapshot?device_id=a1b2c3d4e5f6&last_sync_at=2026-10-16T18:00:00Z HTTP/1.1 Authorization: Bearer <auth_token> X-App-Version: 1.1.2{ "last_sync_at": "2026-10-17T08:12:00Z", "shop_name": "Ramesh Kirana Store", "gstin": "27AABCU9603R1ZX", "invoice_prefix": "KB", "invoice_counter": 441, "default_gst_rate": 18, "customers": [ { "customer_id": "c-88a1", "customer_name": "Mona Traders", "customer_phone": "9876501234", "customer_gstin": "27AAPCM1234F1Z5", "is_supplier": false, "outstanding_amount": 12500.0, "is_synced": true } ], "invoices": [ { "invoice_id": "inv-441", "invoice_number": "KB-2026-0441", "balance_due": 12500.0, "gst_total": 2124.0, "status": "pending", "is_gst": true } ], "products": [ { "product_id": "p-ata-1", "product_name": "Ashirvaad Atta 10kg", "hsn_code": "1101", "rate": 2950.0, "gst_percent": 18 } ], "payments": [] }Read Razorpay checkout config
GET
/v1/premium/checkout-configopenbankingReturns the Razorpay key and Premium plan amounts that the upgrade screen feeds into Checkout before creating an order.
Auth: Authorization: Bearer <auth_token>. Used before the Premium upgrade sheet opens Razorpay Checkout.
- key_id
- currency
- name
- description
- theme_color
- plan_id
- amount
- period
GET /v1/premium/checkout-config HTTP/1.1 Authorization: Bearer <auth_token> X-App-Version: 1.1.2{ "key_id": "rzp_test_<key_id>", "currency": "INR", "name": "UdhaarBill Premium", "description": "Cloud backup, analytics, reminder templates", "theme_color": "#0783B4", "plans": [ { "plan_id": "premium_annual", "amount": 99900, "currency": "INR", "period": "yearly" } ] }Create Razorpay Premium order
POST
/v1/premium/ordersopenbankingCreates the Razorpay order the Checkout sheet charges; order_id is posted back on the verify call after payment.
Auth: Authorization: Bearer <auth_token> from POST /v1/sessions/exchange.
- plan_id
- order_id
- amount
- currency
- receipt
- status
POST /v1/premium/orders HTTP/1.1 Authorization: Bearer <auth_token> Content-Type: application/json X-App-Version: 1.1.2 { "plan_id": "premium_annual", "amount": 99900, "currency": "INR" }{ "order_id": "order_N7example", "amount": 99900, "currency": "INR", "receipt": "ub-prem-usr_9f2a", "status": "created" }Verify Razorpay payment and unlock Premium
POST
/v1/premium/confirmationsopenbankingConfirms the Checkout signature on the server and flips is_premium so cloud sync, analytics and reminder templates unlock. A failed verification surfaces as a payment error on the upgrade screen.
Auth: Authorization: Bearer <auth_token>. Body is the Checkout success payload (razorpay_order_id, razorpay_payment_id, razorpay_signature).
- razorpay_order_id
- razorpay_payment_id
- razorpay_signature
- status
- is_premium
- premium_expiry
- subscriptionActiveUntil
POST /v1/premium/confirmations HTTP/1.1 Authorization: Bearer <auth_token> Content-Type: application/json X-App-Version: 1.1.2 { "razorpay_order_id": "order_N7example", "razorpay_payment_id": "pay_N8example", "razorpay_signature": "a1b2c3d4e5f6signature" }{ "status": "VERIFIED", "is_premium": true, "premium_expiry": "2027-10-17T00:00:00Z", "subscriptionActiveUntil": "2027-10-17T00:00:00Z" }
Data categories
- parties
- invoices
- gst
- inventory
- payments
- sync
Where teams use this data
AR collection queue from the khata
A collections bot reads outstanding_amount, balance_due, due_date and customer_phone from the synced party rows, then opens the same WhatsApp reminder the shopkeeper sends from the customer-detail screen — without re-keying the ledger.
GST return prep from invoice lines
A CA workbook joins invoice_number, customer_gstin, hsn_code, gst_percent, gst_amount and gst_total on is_gst invoices so GSTR-1 line items match the PDFs the shop already shared.
Catalogue rate card across counters
A second billing counter pulls product_name, hsn_code, rate and gst_percent from the cloud catalogue after a sync pull, so HSN and GST% stay identical to the owner's phone.
Premium entitlement after Razorpay
Billing ops matches razorpay_payment_id and razorpay_order_id against is_premium and premium_expiry to confirm cloud-sync seats without opening the upgrade screen.
Frequently asked questions
How does the app authenticate merchants?
Google Sign-In mints an id_token that POST /v1/sessions/exchange swaps for auth_token and refreshToken. Later calls send Authorization: Bearer plus X-App-Version. POST /v1/account/devices then binds device_id, fcm_token and a Play Integrity token.
Which fields describe a customer's udhaar balance?
Synced party rows expose customer_name, customer_phone, customer_gstin, is_supplier, outstanding_amount and, on each invoice, balance_due, paid_amount, due_date and status (pending, paid, overdue).
How are GST invoices represented?
Each invoice has invoice_number, is_gst, gst_percent, gst_amount, gst_total, subtotal and total_amount. Line items add hsn_code, qty, rate and product_name. Shop defaults live as gstin, default_gst_rate, invoice_prefix and invoice_counter.
What does Razorpay unlock?
GET /v1/premium/checkout-config and POST /v1/premium/orders start Checkout; POST /v1/premium/confirmations returns is_premium and premium_expiry, which gate POST /v1/ledger/changes and GET /v1/ledger/snapshot cloud backup.
Apps similar to Khatabook Credit Account Book
- Khatabook — Khatabook is a digital ledger for Indian micro and small merchants that records debit and credit, takes UPI and QR payments, and sends automatic payment reminders with a payment link.
- OkCredit — OkCredit is a paperless udhar bahi-khata for Indian shopkeepers that logs customer credit and payments on the phone and sends collection reminders over WhatsApp and SMS.
- Vyapar Invoice GST Billing App — Vyapar is an Indian GST billing, accounting and inventory app for MSMEs that creates tax invoices, tracks stock and payments, and syncs books between a phone and a desktop client.
- myBillBook Invoice Billing App — myBillBook is GST billing software for Indian small businesses that creates GST and non-GST invoices with HSN/SAC codes, tracks inventory, and sends WhatsApp or SMS payment reminders with UPI links.
- TallyPrime — TallyPrime is Tally Solutions' business-management software for Indian firms, covering books, GST invoices and returns, inventory and connected banking in a desktop-first setup.
- Zoho Books — Zoho Books is Zoho's GST-compliant cloud accounting product for Indian businesses, covering invoicing, e-invoicing, inventory, banking and GST filing from web and mobile apps.
- Swipe — Swipe is GST invoicing, POS and inventory software for Indian SMEs that creates invoices and quotations, shares bills on WhatsApp, and records stock-in and stock-out.
- BUSY — BUSY is accounting and GST billing software for Indian MSMEs, with invoicing, inventory, e-invoicing, e-way bills and a mobile app for quotations, orders and invoices.
Topics
- udhaarbill api
- billy khata
- gst invoice fields
- balance_due
- customer_gstin
- hsn_code
- razorpay premium
- india msmes billing
Need this app's data API integrated?
We deliver scoped integrations for any named app — from USD 500 with source-code handoff, or hosted access billed per call. Tell us the data you need.
- NDA + SOW on every engagement
- Delivery in 3–7 days
- Payment only after acceptance
- Work scoped to authorized use