Skip to main content
This guide walks you through the full invoice lifecycle: create a draft, revise it, mark it as paid, void it, and inspect its revision history.
You need an API key and a merchant and customer already set up. See Set Up Your API Keys and Manage Customers.
1

Create a draft invoice

Send POST /invoices with the merchant and customer references and a list of line items. Line items can be product_charge items pulled from your catalog, manual_adjustment items for things like tax or shipping, or a mix of both.
Save the returned invoice id (inv_...) for use in later steps.
2

Revise the draft

Draft invoices can be updated with PUT /invoices/{id}. Each successful update appends an entry to the invoice’s revision history. Send the full line item snapshot you want on the invoice, not just the changes.
3

Mark the invoice as paid

Once the customer has paid outside of PayGood (for example, by ACH or check), transition the invoice to paid with POST /invoices/{id}/mark-paid.
4

Void an invoice

To cancel a draft or issued invoice, call POST /invoices/{id}/void. Void is a terminal state.
5

View revision history

Every update creates a new revision. Retrieve the append-only history (newest first) with GET /invoices/{id}/revisions.
Always pass a unique idempotencyKey on every write. Retrying the same key returns the original result instead of creating a duplicate invoice, revision, or state transition.
For the full request and response schemas, see the Invoices API reference.