Skip to content
Ledger by RODMEN/A
Menu

Software products, subscriptions, rewards

Credits and loyalty

Prepaid credits, API allowances, points and gift cards as owned property: purchased, refundable and disputable, with the liability always derivable.

The problem

What goes wrong without a ledger

Credits are money by another name. Treat them as a counter and you cannot answer the questions that matter: what did this customer pay for, what did they use, what do we owe them, and what happened to the credits that expired?

How it works on Ledger

The shape of the books

Credits as an asset type

Define a credit unit with the precision you need. Sell packs by moving credits from an issuance account into the customer’s account.

Reserve for a job, commit what was used

Hold the estimated cost when a job starts; commit the actual cost when it finishes and release the rest. A failed job releases everything.

Refunds and expiry on the books

A refund is a transaction back to the issuance account. Expired points move to an expiry account, so the outstanding liability is the balance of the customer accounts.

Different from metering

A quota service counts consumption against a limit. A ledger records ownership. Use the ledger when the units were bought and can be refunded.

A worked transaction
POST /v1/transactions            # reserve 40 credits for a job
{
  "description": "job 91 estimate",
  "pending": true,
  "expires_at": "2026-09-06T00:00:00+00:00",
  "entries": [
    { "account_id": customer_credits, "direction": "debit",  "amount": "40" },
    { "account_id": consumed,         "direction": "credit", "amount": "40" }
  ]
}
# job used 31: commit for 31, the other 9 are released

What you get

Outcomes, and the guarantees behind them

  • Liability for unused credits is a balance, not an estimate.
  • A retried purchase cannot double-credit.
  • Expiry and refunds are visible entries, not silent adjustments.

Questions

Asked about this use case

Is a ledger overkill for API credits?

Not when customers pay for them. If credits are refundable, transferable or disputable, they are property and belong on a ledger. If they are only a cap that resets monthly, a metering service is simpler.

Free today. Access is provisioned personally by RODMENA.

Tell us what you keep books of and we will set up a tenant, mint your first key and walk you through the tour.