Ledger & Payments

Atomic FIFO allocation

Every payment recorded against a member is allocated to their oldest open installment first, across every scheme they hold. Allocation is atomic — either the full ledger transaction commits, or none of it does, so partial writes can never corrupt a member's balance.

POST /v1/collections200 OK
{
  "member_id": "mem_8842019",
  "amount": 500000,
  "currency": "INR",
  "route_id": "rt_north_a",
  "allocation": "fifo_auto"
}

Allocation order

When allocation is set to fifo_auto, the ledger walks a member's open installments oldest-first:

  1. 1Overdue installments across all held schemes, oldest due date first
  2. 2The current cycle's installment, if not yet fully paid
  3. 3Any remainder is held as a credited advance against the next cycle