Plans, customers, subscriptions and invoices, backed by idempotent payment recording and an append-only ledger. A REST API that records money movement — it never touches the money itself.
POST /api/v1/payments/record
Authorization: Bearer <jwt>
Idempotency-Key: 8f14e45f-ceea-4b2a-9c1e-2b6a1d9f7a02
{
"invoice_id": "inv_9f3a2c81",
"amount": "499.00",
"currency": "INR",
"status": "success",
"provider_reference": "razorpay_pay_Nk3xQ2"
}It orchestrates charges on your own payment gateway and records every attempt, success and failure. Money moves customer → your gateway → your bank. Subledger never holds, pools, escrows, routes, or settles a rupee of it.
GET /api/v1/ledger?invoice_id=inv_9f3a2c81
[
{ "entry_type": "invoice_created", "amount": "499.00", "currency": "INR" },
{ "entry_type": "payment_success", "amount": "499.00", "currency": "INR" },
{ "entry_type": "payment_failure", "amount": "499.00", "currency": "INR" }
]git clone https://github.com/utkarsh-vats/subledger_backend.git && cd subledger_backend cp .env.example .env.local docker compose --env-file .env.local up -d # api · postgres 18 · redis · celery docker compose exec web alembic upgrade head # open http://localhost:8001/docs # interactive OpenAPI schema
Early access — built in public. No signup, no waitlist. Clone it and run it.
View on GitHub