Order to cash
The revenue path runs through five resources: an order is placed, an invoice bills it, a payment settles it, a payment application connects the two, and the general ledger records all of it. Each step is one or two calls; the value of this guide is the order they go in and what breaks when you skip one. All paths are underhttps://api.stateset.com/api/v1. Send an Idempotency-Key on every POST.
1 — Take the order
2 — Invoice it
draft → sent → viewed → paid, with overdue when the terms lapse — and overdue is computed from
the send, which is why an unsent invoice can never be chased.
3 — Record the payment
4 — Apply it
This is the step naive integrations skip. A completed payment and a sent invoice are not connected until you apply one to the other:5 — Check the ledger
Every step above posted journal entries automatically. Verify rather than assume:Partial payments and short-pays
Apply the amount actually received. The invoice stays open for the balance, and the remainder shows in aging at its true age. A deliberate short-pay you agree to forgive is a credit memo (POST /api/v1/ar/credit-memos, then /{id}/apply) — not an edit to
the invoice, which would erase the history of what was billed.
When it goes backwards
Write-offs are reversible (
/{id}/reverse) — a customer who pays after all is a reversal plus an
application, and the audit trail shows both.
Related
- AR and collections — what happens when step 3 doesn’t come
- Period close — locking the months these entries land in
- Commerce API reference