Home/Platform/Charging & OCS

SS-10 · Online charging · 34 operations

Charging & OCS

OCS multi-bucket prepaid wallets on the hot path, time-of-day rating, invoicing and dunning.

34
operations
3-bucket
OCS waterfall
time-of-day
rating bands
hot-path
authorize/debit

What it does

Charging & OCS — the depth.

The money plane, run as an online charging system. Prepaid wallets carry OCS-grade multi-bucket balances with a promotional → bonus → main deduction waterfall on the hot path: authorize reserves against the buckets, debit settles, terminate releases the reservation. A time-of-day price model resolves off-peak/peak/evening bands by the hour (rated via GET /rate/at). Above the wallet sit plans and entitlements, subscription, usage lines, invoice finalization, revenue recognition, proration, credits, dunning and tax — the same billing service that runs the rest of the platform, dogfooded.

Sub-capabilities · real endpoints

Every capability maps to a real method + path.

OCS multi-bucket prepaid wallet

Read a subscriber wallet; authorize (reserve) against the promotional/bonus/main waterfall; debit and terminate a charge token on the hot path; top up and expire buckets. This is the real-time balance behind every metered voice minute and USSD session.

  • GET/api/v1/wallet/{sub}
  • POST/api/v1/wallet/{sub}/authorize
  • POST/api/v1/wallet/{sub}/topup
  • POST/api/v1/wallet/{sub}/expire
  • POST/api/v1/wallet/charge/{token}/debit
  • POST/api/v1/wallet/charge/{token}/terminate

Time-of-day rating & plans

Rate the draft invoice at an explicit instant — time_of_day models resolve their band (off-peak/peak/evening) by hour. Plans map metered items to flat prices or graduated/volume/hybrid models; subscribe attaches a plan.

  • GET/api/v1/rate/at
  • POST/api/v1/plans
  • POST/api/v1/subscribe
  • GET/api/v1/entitlements/{item}

Usage, invoicing & recognition

Record metered usage and usage lines, finalize invoices, read invoices and settlement, prorate mid-cycle changes, and recognize revenue.

  • POST/api/v1/usage
  • POST/api/v1/usage/lines
  • POST/api/v1/invoices/finalize
  • GET/api/v1/invoices
  • GET/api/v1/invoice
  • POST/api/v1/proration
  • POST/api/v1/recognize

Credits, dunning & tax

Issue and expire credits, run the dunning ladder on an overdue invoice (start/advance/settle), and manage tax exemptions and MOSS reporting.

  • GET/api/v1/credits
  • POST/api/v1/credits
  • POST/api/v1/dunning/{invoice}/start
  • POST/api/v1/dunning/advance
  • POST/api/v1/dunning/{invoice}/settle
  • POST/api/v1/tax/exemptions
  • GET/api/v1/tax/moss/{quarter}

Worked example

Charging a voice minute against a live wallet

A call is authorized against the multi-bucket wallet, debited by the second, and terminated cleanly.

1BalanceGET/api/v1/wallet/{sub}Read the subscriber's promotional/bonus/main buckets before the call connects.
2RateGET/api/v1/rate/atResolve the time-of-day band for the call instant — peak vs off-peak per hour.
3AuthorizePOST/api/v1/wallet/{sub}/authorizeReserve against the waterfall; returns a charge token for the live call.
4DebitPOST/api/v1/wallet/charge/{token}/debitSettle the billed seconds; the waterfall spends promotional then bonus then main.
5TerminatePOST/api/v1/wallet/charge/{token}/terminateRelease the reservation at hangup; the unspent hold returns to the buckets.

Architecture placement

Where it sits in the platform.

SS-10 consumes rated facts from SS-36 and charges them against wallets on the hot path; SS-41 session charges and SS-18 sends debit here. A fraud freeze from SS-38 (via SS-50) can gate charging. Money writes are idempotent (ADR-0039), audit-chained (ADR-0014) and tenant-scoped (ADR-0019).

Depends on

SS-36 mediation (rated facts)SS-41 session chargeSS-60 finops (metering)

Feeds

SS-50 walletsSS-22 paycoreinvoice / dunning