CreditBook - Digital Khata API integration services

Authorized protocol analysis and production-ready API implementations for Pakistan’s leading digital khata, cashbook and merchant-wallet app

From $300 · Pay-per-call available
OpenData · OpenFinance · OpenBanking · Protocol analysis

Connect CreditBook ledgers, cashbook, stock and wallet data to your stack — under authorization

CreditBook - Digital Khata is used by more than one million micro, small and medium businesses across roughly 400 localities in Pakistan. Inside the app sit structured records most back-office systems can't see: customer udhaar ledgers, CashBook cash flow, StockBook inventory, BillBook invoices and CreditBook Wallet balances. We deliver CreditBook API integration, statement export and account-login flows that follow OpenBanking patterns and rely only on authorized, documented access — with runnable Python and Node.js source you can host yourself.

Why this app’s data is valuable — the merchant ledger holds every credit sale, repayment, due date and contact, which is exactly the data a lending, scoring or accounting product needs but rarely gets in clean digital form.
Cash and stock together — CashBook entries and StockBook quantities give a near-real-time picture of working capital and turnover per shop, suitable for inventory financing and demand analytics.
Wallet and airtime activity — CreditBook Wallet mobile-load sales and commission records add a transactional signal you can use for activity-based limits and reconciliation.

What CreditBook actually does

Launched in 2020 by Karachi-based CreditBook Financial Services (SECP license number SECP/LRD/86/CBFSPL/2022-103), CreditBook started as a free digital replacement for the paper bahi khata and grew into a small-business operating layer. Shopkeepers record credit (udhaar) sales against a customer or supplier contact, send free SMS and WhatsApp payment reminders, and — per the company — collect roughly three times faster. The app ships in English and Urdu plus Sindhi, Pashto and Punjabi, so the contact and transaction fields you integrate against are multilingual by design.

Beyond the ledger, CreditBook bundles CashBook for recording cash in and out of the business, StockBook for managing inventory items and adjusting quantities as bills are raised, BillBook for issuing invoices and receipts, and CreditBook Wallet for reselling mobile load and earning commission. Business owners can run multiple businesses, share access across phones, and download business reports that summarise financial health. On Google Play the app has passed one million downloads with a rating near 4.75 from about twenty-five thousand reviews.

This breadth is what makes CreditBook interesting from an OpenData and OpenFinance angle: a single mobile account can expose receivables, payables, cash position, stock levels, issued invoices and wallet activity. When a third party — a lender, an ERP, a tax adviser, a supplier portal — needs that picture, the practical question is how to read it reliably and lawfully. That is what the integration work on this page covers.

What we deliver

Deliverables checklist

  • API specification (OpenAPI / Swagger) for every endpoint we expose
  • Protocol and auth-flow report (OTP login, token refresh, request signing, cookie chain)
  • Runnable source for login, ledger, statement and stock endpoints (Python / Node.js)
  • Automated test suite and Postman / curl examples
  • Compliance notes: consent capture, retention windows, data-minimization checklist for SECP / SBP context
  • Optional hosted endpoint with per-call metering if you prefer usage-based billing

Engagement models

  • Source-code delivery from $300 — you receive runnable API source and full documentation; you pay after delivery once it works for you.
  • Pay-per-call API — you call our hosted CreditBook integration endpoints and pay only for the calls you make, no upfront fee; useful for teams that want to skip hosting and ops.
  • Both models include a protocol-analysis report so your team understands exactly how the integration behaves.

Feature modules

Customer ledger / statement API

Read a customer or supplier udhaar khata: opening balance, every credit and repayment line with amount, timestamp, note and attached image reference, running balance and due dates. Used for receivables reconciliation, ageing reports and feeding a credit-scoring model with real repayment behaviour.

CashBook cash-flow API

Export CashBook cash-in and cash-out entries by date range and category. Used to build a daily cash position per shop, reconcile till counts, and supply working-capital signals to an inventory-financing engine.

StockBook inventory API

List inventory items with quantity on hand, cost and sale price, and read the quantity adjustments triggered when a bill is created. Used for stock valuation, low-stock alerts in an ERP, and turnover analytics by SKU.

BillBook invoice API

Pull issued invoices and receipts with line items, taxes if entered, customer reference and PDF link. Used to mirror sales into accounting software and to attach proof-of-sale to a financing application.

CreditBook Wallet API

Read wallet balance, top-ups, mobile-load sales and commission earned. Used for activity-based limit decisions, settlement reporting, and reconciling airtime distribution against telco statements.

Reminder & webhook events

Subscribe to events such as “reminder sent”, “payment recorded” or “new ledger entry” so downstream systems update without polling. Used for real-time collections dashboards and to trigger follow-up workflows in a CRM.

Data available for integration

The table below maps the data we can surface to the screen or feature it comes from, its typical granularity, and a realistic downstream use. It is derived from the published app description and from public reporting on CreditBook; exact field availability is confirmed during scoping.

Data typeSource (screen / feature)GranularityTypical use
Customer / supplier ledger entriesKhata / customer detail screenPer transaction (amount, type, timestamp, note, image ref, running balance)Receivables & payables reconciliation, repayment-behaviour scoring
Contact directoryAdd customer / supplierPer contact (name, phone, business link, language)KYC pre-fill, CRM sync, duplicate detection
CashBook entriesCashBookPer cash-in / cash-out line with category & dateDaily cash position, working-capital analytics
StockBook inventoryStockBookPer item (quantity, cost, sale price) + adjustment eventsStock valuation, low-stock alerts, turnover analysis
BillBook invoices / receiptsBillBookPer invoice with line items and PDF linkAccounting mirror, proof-of-sale for financing
Wallet & mobile-load activityCreditBook WalletPer top-up / sale / commission event with balanceActivity-based limits, airtime settlement reconciliation
Business reportsReports / financial healthAggregated per business per periodDashboards, lender underwriting summaries
Reminder / collection eventsSMS & WhatsApp remindersPer reminder dispatched & outcomeCollections KPIs, follow-up automation

Typical integration scenarios

1. MSME lender pulls a borrower’s ledger for underwriting

Context: a digital lender wants to extend a working-capital line to a CreditBook shopkeeper. Data / API: customer-ledger statement endpoint plus CashBook export, scoped by a consent token. OpenFinance mapping: the borrower authorizes read-only access (an account-information-style consent), the lender receives a normalised transaction list and ageing summary, and a webhook keeps it fresh until the consent expires.

2. Accounting / ERP sync for a multi-business owner

Context: an owner runs three shops in CreditBook and wants the numbers in their accounting package. Data / API: BillBook invoices, CashBook entries and StockBook valuation, paged by business id. OpenData mapping: a scheduled export job writes journal entries and stock balances into the ERP, replacing manual re-keying.

3. Supplier / distributor portal reads downstream sell-through

Context: an FMCG distributor wants visibility into how fast its goods move at retail. Data / API: StockBook adjustment events and BillBook line items filtered to the distributor’s SKUs, with the retailer’s consent. OpenData mapping: aggregated sell-through feeds demand planning without exposing the shop’s full ledger.

4. Collections dashboard for a micro-finance partner

Context: a partner offering buy-now-pay-later to end customers wants live collection status. Data / API: reminder events plus ledger repayment entries via webhook. OpenFinance mapping: each “payment recorded” event updates the partner’s ledger and recalculates exposure in near real time.

5. Tax / regulatory reporting export

Context: an adviser prepares periodic filings for a cohort of shops. Data / API: BillBook invoices and business-report summaries exported to Excel and PDF on a fixed schedule. OpenData mapping: a documented, consent-backed export keeps the audit trail intact and avoids screenshot-based bookkeeping.

Technical implementation

The snippets below are illustrative pseudo-code showing the shape of the integration — OTP-based login, a paged statement read, and a webhook payload. Field names and the exact auth handshake are confirmed during protocol analysis; nothing here bypasses CreditBook’s own controls.

A. Account login (mobile + OTP)

// Step 1: request OTP
POST /api/v1/creditbook/auth/otp/request
Content-Type: application/json
{ "msisdn": "+923001234567" }

// Step 2: verify OTP -> access + refresh token
POST /api/v1/creditbook/auth/otp/verify
{ "msisdn": "+923001234567", "otp": "482915", "device_id": "d-7f3a" }

200 OK
{
  "access_token": "eyJhbGc...",
  "refresh_token": "rt_9b21...",
  "expires_in": 3600,
  "businesses": [ { "id": "biz_01", "name": "Ali Kiryana Store" } ]
}

B. Customer ledger / statement query

GET /api/v1/creditbook/businesses/biz_01/contacts/cust_88/ledger
  ?from=2026-04-01&to=2026-04-30&page=1&page_size=100
Authorization: Bearer <ACCESS_TOKEN>
X-Consent-Id: cns_4421

200 OK
{
  "contact": { "id": "cust_88", "name": "Bilal", "type": "customer" },
  "opening_balance": 12500.00,
  "currency": "PKR",
  "entries": [
    { "id":"e1","ts":"2026-04-03T10:12:00+05:00","type":"credit","amount":3200.00,"note":"flour 2 bags","balance_after":15700.00 },
    { "id":"e2","ts":"2026-04-11T17:40:00+05:00","type":"payment","amount":5000.00,"note":"cash","balance_after":10700.00 }
  ],
  "closing_balance": 10700.00,
  "page": 1, "page_size": 100, "has_more": false
}

C. Webhook: payment recorded

POST https://your-app.example/webhooks/creditbook
X-CreditBook-Signature: sha256=...

{
  "event": "ledger.payment_recorded",
  "business_id": "biz_01",
  "contact_id": "cust_88",
  "entry": { "id":"e2","amount":5000.00,"currency":"PKR","ts":"2026-04-11T17:40:00+05:00" },
  "new_balance": 10700.00,
  "consent_id": "cns_4421"
}

// Recommended handling:
// 1) verify HMAC signature  2) idempotency on entry.id
// 3) on 4xx from your endpoint we retry with backoff (max 24h)
// 4) reconcile nightly via the statement endpoint as a safety net

D. Error handling & limits

401 invalid_token        -> refresh via /auth/token/refresh
403 consent_revoked      -> stop polling, ask user to re-authorize
409 idempotency_conflict -> treat as already processed
429 rate_limited         -> honour Retry-After header
5xx upstream_unavailable -> exponential backoff, then alert

Defaults: page_size ≤ 200, ~5 req/s soft cap per token,
consent TTL configurable (commonly 90 days), all times ISO-8601 with offset.

Compliance & privacy

Regulatory context

CreditBook’s financial activities sit under the Securities and Exchange Commission of Pakistan (SECP), which licenses NBFCs, while payment rails and digital-banking rules fall to the State Bank of Pakistan (SBP). Pakistan’s instant-payment system, Raast, has been moving toward open-API integration and a Person-to-Merchant tier, and the SBP runs a regulatory sandbox for new payment products. Personal-data handling should also be planned against Pakistan’s draft Personal Data Protection Bill, and clients serving Gulf or UK customers may additionally need to satisfy GDPR-style and PSD2-style expectations.

How we keep integrations clean

  • Authorized or documented APIs only — no scraping that breaches terms, no credential sharing in the clear.
  • Explicit, revocable consent per data scope, with consent ids carried on every request.
  • Data minimization: we expose the narrowest field set a use case needs (e.g. ageing summary instead of raw notes where possible).
  • Access and consent logs retained for audit; configurable retention and deletion.
  • NDAs and security review on request; PII encrypted in transit and at rest in any hosted component.

Data flow / architecture

A typical pipeline is short and auditable: CreditBook app / account (the user authorizes a scope) → Integration API layer (OTP login, token refresh, request signing, rate limiting, consent checks) → Normalisation & storage (ledger, cash, stock and wallet records mapped to a stable schema; raw payloads kept for reconciliation) → Delivery (your REST/GraphQL endpoint, scheduled Excel/JSON/PDF exports, or webhook push to your CRM, ERP or scoring engine). Each hop logs who accessed what under which consent, so the data lineage is reproducible end to end.

Market positioning & user profile

CreditBook is primarily a B2B tool for Pakistan’s MSME segment — kiryana and general stores, wholesale distributors and suppliers, mobile-recharge and electronics shops, paan and chai stalls, tailors and garment shops, jewellers, medical stores and pharmacies, bakeries and juice corners — plus personal udhaar and salary-advance tracking. Adoption is concentrated in Pakistan (the company cites over a million MSMEs across about 400 localities), with Urdu, Sindhi, Pashto and Punjabi alongside English. The product is mobile-first on Android with iOS available, backed by ~$12.5M raised including Tiger Global’s first Pakistan investment in the 2021 pre-Series A. In August 2024 CreditBook leaned further into being an “OpenFinance” layer: it announced a partnership with People, Pakistan’s largest HR-services firm, to use its open-API framework to power a PerfectPay mobile wallet and a co-branded Mastercard for roughly 150,000 employees — alongside white-label UI components, customizable SDKs/APIs and a lending operating system with credit decisioning. That direction is exactly why API-level integration with CreditBook data is increasingly in demand.

Screenshots

App screens from CreditBook - Digital Khata. Tap any thumbnail to view it larger.

CreditBook - Digital Khata screenshot 1 CreditBook - Digital Khata screenshot 2 CreditBook - Digital Khata screenshot 3 CreditBook - Digital Khata screenshot 4 CreditBook - Digital Khata screenshot 5 CreditBook - Digital Khata screenshot 6 CreditBook - Digital Khata screenshot 7

Similar apps & integration landscape

CreditBook sits in a busy category of digital-khata, cashbook and small-business bookkeeping apps across South Asia. The names below come up repeatedly as alternatives or neighbours; we list them only to map the ecosystem — not to rank them — because teams integrating one of these often need consistent exports across several.

  • Khatabook — a large Indian digital-ledger and SaaS accounting platform holding credit transactions, billing and inventory data; teams that work with both often want a unified transaction export across Khatabook and CreditBook.
  • OkCredit — a digital ledger for small shopkeepers with multi-language support and SMS/WhatsApp reminders; its ledger and statement data maps closely to CreditBook’s, so a shared normalisation schema is useful.
  • Vyapar App — billing, accounting and inventory software for SMEs with strong invoice and tax features; integrators frequently reconcile Vyapar invoices against ledger balances elsewhere.
  • Udhaar Book — a Pakistan-focused khata, cashbook, salary book, invoice maker and stock manager; overlapping feature set means many merchants run it alongside or instead of CreditBook.
  • DigiKhata (Digi Khata) — positioned as Pakistan’s number-one digital khata with bookkeeping, expense management, attendance and stock tracking; comparable data surfaces make cross-app sync a common request.
  • CashBook — focused on cash-flow record keeping for small and medium businesses; its cash-in/cash-out structure is a natural counterpart to CreditBook’s CashBook module.
  • CreditLog — a digital ledger that replaces paper udhaar notes for maintaining customer accounts; relevant when consolidating receivables from multiple ledger apps.
  • Easy Khata — a digital khata and udhaar cashbook app in the same family of lightweight ledger tools; included here for completeness of the integration landscape.

If your roadmap touches any of these — Khatabook API integration, OkCredit data export, Vyapar invoice sync, Udhaar Book or DigiKhata ledger consolidation — the same protocol-analysis and normalisation approach applies; CreditBook - Digital Khata is simply the one detailed on this page.

About us

We are an independent technical studio specialising in App interface integration and authorized API integration. The team has years of hands-on work in mobile apps and fintech — engineers who have built for banks, payment gateways and cloud platforms — and we ship one-stop services from protocol analysis and interface refactoring to OpenData integration, third-party interface integration, automated data scripting and delivery of API documentation.

  • Financial and banking apps: transaction records, statement queries, transaction integration
  • E-commerce, food-delivery and retail apps: order interfaces, payment integration, data sync
  • Hotel, travel and mobility apps: booking interfaces, itinerary queries, payment verification
  • Social, OTT media and dating apps: authentication/login, messaging interfaces, profile management
  • Full pipeline: protocol analysis → build → validation → compliance handover

Contact

Tell us the target app and what you need — the data, the flows, the volume. We’ll come back with scope, timeline and a quote. Source-code delivery starts at $300 (pay after delivery on satisfaction); pay-per-call hosted API is also available.

Contact page

Engagement workflow

  1. Scope confirmation — which CreditBook data and flows (login, ledgers, cashbook, stock, wallet, webhooks) and your delivery format.
  2. Protocol analysis & API design — 2–5 business days depending on complexity.
  3. Build & internal validation — 3–8 business days.
  4. Docs, samples & test cases — 1–2 business days.
  5. First delivery — typically 5–15 business days; third-party approvals can extend timelines.

FAQ

What CreditBook data can you integrate?

Customer and supplier credit ledgers (udhaar khata), CashBook cash-in and cash-out entries, StockBook inventory items and bill lines, BillBook invoices and receipts, CreditBook Wallet balances and mobile-load commissions, and downloadable business reports — exposed through authorized REST endpoints with paging and date filters.

How long does delivery take?

A first API drop with login plus ledger and statement endpoints and documentation usually takes 5 to 12 business days; wallet, stock-sync or webhook-driven stacks may take longer.

How do you handle compliance in Pakistan?

We use authorized or documented APIs only, keep consent and access logs, apply data minimization, and align work with SECP NBFC rules, State Bank of Pakistan digital-payment guidance, and the draft Personal Data Protection Bill of Pakistan.

What do I need to provide to start?

The target app name (CreditBook - Digital Khata), the data and flows you need such as transaction history, stock levels or wallet balance, and any sandbox or backend credentials you already hold. We return runnable source plus an OpenAPI specification.
📱 Original app overview (appendix) — CreditBook - Digital Khata

CreditBook - Digital Khata (package com.creditbookpk.creditbook) is a free business companion app for shopkeepers and small businesses in Pakistan, built by CreditBook Financial Services. It positions itself not just as a digital khata but as a “digital dost” that helps owners control their accounts and improve the financial health of the business — record receivables and payables digitally, keep customer ledgers, and send automatic SMS/WhatsApp reminders for roughly three-times-faster collection.

  • CashBook — record cash coming into and going out of the business.
  • StockBook — add inventory items and increase or decrease quantities as bills are made.
  • BillBook — create invoices/receipts and send them to customers.
  • CreditBook Wallet — sell mobile load to friends and customers from your phone, earn commission, and top up your wallet; occasional package deals and discounts.
  • Reminders — free SMS/WhatsApp payment reminders; enter due dates so payments land on time.
  • Reports — download business reports to understand the financial health of the business.
  • Multi-business & multi-device — manage more than one business account; use CreditBook from more than one phone.
  • Languages — English and Urdu plus Sindhi, Pashto and Punjabi.
  • Customer support — a support team to hear and resolve complaints.

Who uses it: kiryana / general / grocery stores; wholesale distributors and suppliers; mobile-recharge and electronics shops; paan, chai and cigarette stalls; garments, tailors and clothing stores; jewellery and gold sellers; medical stores and local pharmacies; bakeries, snack and juice shops; salary payments/advances; and personal udhaar tracking.

How to use it: download from Google Play; enter your mobile number and the OTP; add a customer or supplier contact; record an udhaar or cash transaction; send a free SMS/WhatsApp payment reminder.

Entity name: CreditBook Financial Services · License number: SECP/LRD/86/CBFSPL/2022-103. App support per the listing: call +92 318 0110801 or email support@creditbook.pk. (This appendix paraphrases the public store description for context; OpenFinance Lab is an independent integration studio and is not affiliated with CreditBook Financial Services.)

Last updated: 2026-05-12