Appearance
4. Billing
Your invoices, and the per-order billing feed you reconcile your own accounting against.
Read first: Billing feed and reconciliation.
Base URL https://api.axiomscript.com. Every request is signed; see Authentication and signing.
GET
/billing/ordersPer-order money and billing state, for reconciling your accountingGET/billing/orders/{partnerOrderId}One order's money and billing stateGET/invoicesYour invoices, with what is still owed on eachGET/invoices/{invoiceNumber}One of your invoices by its invoice numberPer-order money and billing state, for reconciling your accounting
GET/api/inbound/{partnerSlug}/billing/orders
Your own production orders with what each charged, its coupon, the shipping billed for it, your platform fee, its billing state (billed on which invoice, voided, held, cancelled, or not billed yet) and every credit against it. Give at most one filter: an order-date window (from/to, Eastern calendar days, at most 92 days, default the last 30), changedSince (sorted by billingChangedAt, paged with afterId), or invoiceNumber. To poll for changes, page with changedSince = the last row's billingChangedAt and afterId = its axiomOrderId, store the largest billingChangedAt you saw, and start the next poll a few minutes before it, accepting re-seen rows. Split legs are never rows; their lines are on the order you placed. No patient, ship-to or free-text reason is ever included. Sandbox keys always receive an empty list.
Parameters
partnerSlugstringpathrequiredThe partner's Axiom-issued slug (e.g. acme-health).
fromstring (date)queryoptional
tostring (date)queryoptional
changedSincestring (date-time)queryoptional
afterIdintegerqueryoptionalOnly with changedSince. The axiomOrderId of the last row of the previous page. At least 1.
invoiceNumberstringqueryoptionalUp to 32 characters.
limitintegerqueryoptionalFrom 1 to 200. Default 100.
offsetintegerqueryoptionalNot allowed with changedSince. At least 0. Default 0.
Responses
| Status | Meaning |
|---|---|
200 | One page of your orders |
400 | invalid_query: an unknown or malformed parameter, more than one filter, a window over 92 days, from after to, afterId without changedSince, or offset with changedSince. |
401 | Missing, expired, or invalid HMAC signature / timestamp |
423 | partner_inactive or tenant_suspended. Your partner account is deactivated or suspended, so no request will be served until it is reinstated. |
429 | Per-partner rate limit exceeded |
Response fields (200)
oktruerequired
totalintegerrequired
ordersarray of objectrequired
orders[].axiomOrderIdintegerrequired
orders[].partnerOrderIdstringrequired
orders[].orderedAtstring (date-time)required
orders[].statusstringrequired
orders[].replacesPartnerOrderIdstring | nulloptionalFor a re-ship
orders[].itemsarray of objectrequired
orders[].items[].productIdintegerrequiredThe stable key. sku is its current SKU.
orders[].items[].skustringrequired
orders[].items[].quantityintegerrequired
orders[].items[].unitPriceCentsinteger | nullrequiredNull on orders created before unit prices were stamped
orders[].chargeCentsinteger | nullrequiredGoods charge stamped at creation
orders[].couponCentsintegerrequired
orders[].shippingCentsinteger | nullrequiredShipping billed for this order; null unless billing.state is billed
orders[].platformFeeCentsinteger | nullrequiredYour platform fee. Null means not recorded; 0 means computed as zero.
orders[].billingobjectrequired
orders[].billing.statestringrequiredOne of: billed, voided, held, cancelled, not_billed_yet.
orders[].billing.invoiceNumberstring | nullrequired
orders[].billing.invoicedAtstring (date-time) | nullrequired
orders[].billing.voidedAtstring (date-time) | nullrequired
orders[].billing.invoiceWideCreditsarray of objectrequiredCredit memos on this order's invoice that apply to the whole invoice rather than to any order. The same entries appear on every order billed on that invoice: book them once per invoiceNumber. Empty when no invoice is shown, and when that invoice also carries orders that are not yours.
orders[].billing.invoiceWideCredits[].amountCentsintegerrequiredPositive is a credit
orders[].billing.invoiceWideCredits[].createdAtstring (date-time)required
orders[].creditsarray of objectrequiredPre-invoice money credits on the order
orders[].credits[].amountCentsintegerrequired
orders[].credits[].productIdinteger | nullrequired
orders[].credits[].skustring | nullrequired
orders[].credits[].quantityinteger | nullrequired
orders[].credits[].appliedbooleanrequiredTrue once an invoice took it
orders[].credits[].createdAtstring (date-time)required
orders[].invoiceCreditsarray of objectrequiredCredit memos against an invoice attributed to this order. Positive is a credit, negative a reversal of one.
orders[].invoiceCredits[].amountCentsintegerrequired
orders[].invoiceCredits[].invoiceNumberstring | nullrequired
orders[].invoiceCredits[].createdAtstring (date-time)required
orders[].billingChangedAtstring (date-time)requiredThe latest moment anything recorded about this order's billing moved
Request
http
GET /api/inbound/acme-health/billing/orders
Host: api.axiomscript.com
X-Axiom-Timestamp: 1767225600
X-Axiom-Signature: sha256=<hex>Response 200
json
{
"ok": true,
"orders": [
{
"axiomOrderId": 184019,
"partnerOrderId": "ACME-0001",
"orderedAt": "2026-10-20T15:04:05.000Z",
"status": "delivered",
"replacesPartnerOrderId": null,
"items": [
{
"productId": 41,
"sku": "EXAMPLE-SKU-1",
"quantity": 2,
"unitPriceCents": 17000
}
],
"chargeCents": 34000,
"couponCents": 0,
"shippingCents": 1000,
"platformFeeCents": 3500,
"billing": {
"state": "billed",
"invoiceNumber": "AXM-INV-1001",
"invoicedAt": "2026-10-26T14:00:00.000Z",
"voidedAt": null,
"invoiceWideCredits": []
},
"credits": [],
"invoiceCredits": [],
"billingChangedAt": "2026-10-26T14:00:00.123Z"
}
],
"total": 1
}One order's money and billing state
GET/api/inbound/{partnerSlug}/billing/orders/{partnerOrderId}
The same row as the list, for one order by your reference. A reference with several attempts resolves as GET /orders/{partnerOrderId} does. 404 when it does not exist, is not yours, is a sandbox order, or is a split leg; the cases are indistinguishable. Sandbox keys always receive 404.
Parameters
partnerSlugstringpathrequiredThe partner's Axiom-issued slug (e.g. acme-health).
partnerOrderIdstringpathrequired
Responses
| Status | Meaning |
|---|---|
200 | The order |
401 | Missing, expired, or invalid HMAC signature / timestamp |
404 | No such resource for your account in this environment. On order endpoints error is not_found on GET and order_not_found on PATCH and cancel. On the ticket endpoints not_found also means support tickets are not enabled for your account. |
423 | partner_inactive or tenant_suspended. Your partner account is deactivated or suspended, so no request will be served until it is reinstated. |
429 | Per-partner rate limit exceeded |
Response fields (200)
oktruerequired
orderobjectrequired
order.axiomOrderIdintegerrequired
order.partnerOrderIdstringrequired
order.orderedAtstring (date-time)required
order.statusstringrequired
order.replacesPartnerOrderIdstring | nulloptionalFor a re-ship
order.itemsarray of objectrequired
order.items[].productIdintegerrequiredThe stable key. sku is its current SKU.
order.items[].skustringrequired
order.items[].quantityintegerrequired
order.items[].unitPriceCentsinteger | nullrequiredNull on orders created before unit prices were stamped
order.chargeCentsinteger | nullrequiredGoods charge stamped at creation
order.couponCentsintegerrequired
order.shippingCentsinteger | nullrequiredShipping billed for this order; null unless billing.state is billed
order.platformFeeCentsinteger | nullrequiredYour platform fee. Null means not recorded; 0 means computed as zero.
order.billingobjectrequired
order.billing.statestringrequiredOne of: billed, voided, held, cancelled, not_billed_yet.
order.billing.invoiceNumberstring | nullrequired
order.billing.invoicedAtstring (date-time) | nullrequired
order.billing.voidedAtstring (date-time) | nullrequired
order.billing.invoiceWideCreditsarray of objectrequiredCredit memos on this order's invoice that apply to the whole invoice rather than to any order. The same entries appear on every order billed on that invoice: book them once per invoiceNumber. Empty when no invoice is shown, and when that invoice also carries orders that are not yours.
order.billing.invoiceWideCredits[].amountCentsintegerrequiredPositive is a credit
order.billing.invoiceWideCredits[].createdAtstring (date-time)required
order.creditsarray of objectrequiredPre-invoice money credits on the order
order.credits[].amountCentsintegerrequired
order.credits[].productIdinteger | nullrequired
order.credits[].skustring | nullrequired
order.credits[].quantityinteger | nullrequired
order.credits[].appliedbooleanrequiredTrue once an invoice took it
order.credits[].createdAtstring (date-time)required
order.invoiceCreditsarray of objectrequiredCredit memos against an invoice attributed to this order. Positive is a credit, negative a reversal of one.
order.invoiceCredits[].amountCentsintegerrequired
order.invoiceCredits[].invoiceNumberstring | nullrequired
order.invoiceCredits[].createdAtstring (date-time)required
order.billingChangedAtstring (date-time)requiredThe latest moment anything recorded about this order's billing moved
Request
http
GET /api/inbound/acme-health/billing/orders/{partnerOrderId}
Host: api.axiomscript.com
X-Axiom-Timestamp: 1767225600
X-Axiom-Signature: sha256=<hex>Response 200
json
{
"ok": true,
"order": {
"axiomOrderId": 184019,
"partnerOrderId": "ACME-0001",
"orderedAt": "2026-10-20T15:04:05.000Z",
"status": "delivered",
"replacesPartnerOrderId": null,
"items": [
{
"productId": 41,
"sku": "EXAMPLE-SKU-1",
"quantity": 2,
"unitPriceCents": 17000
}
],
"chargeCents": 34000,
"couponCents": 0,
"shippingCents": 1000,
"platformFeeCents": 3500,
"billing": {
"state": "billed",
"invoiceNumber": "AXM-INV-1001",
"invoicedAt": "2026-10-26T14:00:00.000Z",
"voidedAt": null,
"invoiceWideCredits": []
},
"credits": [],
"invoiceCredits": [],
"billingChangedAt": "2026-10-26T14:00:00.123Z"
}
}Your invoices, with what is still owed on each
GET/api/inbound/{partnerSlug}/invoices
The invoices billed to YOUR partner account (partner-payer billing), newest first. Drafts are excluded; every listed invoice was actually issued. Each carries the total, cash received, credits applied, the residual still owed (zero on paid and void invoices), and paymentUrl, the hosted payment link when the invoice has one. Line items are deliberately not included. Sandbox keys always receive an empty list, because sandbox activity never bills.
Parameters
partnerSlugstringpathrequiredThe partner's Axiom-issued slug (e.g. acme-health).
statusstringqueryoptionalOne of: issued, pending, partial, paid, dispute, late, void.
limitintegerqueryoptionalFrom 1 to 100. Default 50.
offsetintegerqueryoptionalAt least 0. Default 0.
Responses
| Status | Meaning |
|---|---|
200 | The partner's invoices |
401 | Missing, expired, or invalid HMAC signature / timestamp |
423 | partner_inactive or tenant_suspended. Your partner account is deactivated or suspended, so no request will be served until it is reinstated. |
429 | Per-partner rate limit exceeded |
Response fields (200)
oktruerequired
totalintegerrequired
invoicesarray of objectrequired
invoices[].invoiceNumberstringrequired
invoices[].statusstringrequiredOne of: issued, pending, partial, paid, dispute, late, void.
invoices[].issuedAtstring (date-time) | nulloptional
invoices[].dueAtstring (date-time) | nulloptional
invoices[].paidAtstring (date-time) | nulloptional
invoices[].totalCentsintegerrequiredInvoice total in cents
invoices[].paidCentsintegerrequiredCash received in cents
invoices[].creditCentsintegerrequiredCredit memos applied in cents
invoices[].residualCentsintegerrequiredStill owed in cents; 0 on paid and void invoices
invoices[].currencystringrequired
invoices[].paymentUrlstring | nulloptionalHosted payment link, when the invoice has been published for online payment
Request
http
GET /api/inbound/acme-health/invoices
Host: api.axiomscript.com
X-Axiom-Timestamp: 1767225600
X-Axiom-Signature: sha256=<hex>Response 200
json
{
"ok": true,
"invoices": [
{
"invoiceNumber": "AXM-INV-1001",
"status": "issued",
"issuedAt": "2026-10-26T14:00:00.000Z",
"dueAt": "2026-10-26T14:00:00.000Z",
"paidAt": null,
"totalCents": 35000,
"paidCents": 0,
"creditCents": 0,
"residualCents": 35000,
"currency": "USD",
"paymentUrl": "https://payments.example.com/invoice/AXM-INV-1001"
}
],
"total": 1
}One of your invoices by its invoice number
GET/api/inbound/{partnerSlug}/invoices/{invoiceNumber}
One invoice by the invoiceNumber shown on the invoice itself (for example INV-000013). 404 when the number does not exist or does not belong to your account; the two cases are deliberately indistinguishable. Sandbox keys always receive 404.
Parameters
partnerSlugstringpathrequiredThe partner's Axiom-issued slug (e.g. acme-health).
invoiceNumberstringpathrequired
Responses
| Status | Meaning |
|---|---|
200 | The invoice |
401 | Missing, expired, or invalid HMAC signature / timestamp |
404 | No such resource for your account in this environment. On order endpoints error is not_found on GET and order_not_found on PATCH and cancel. On the ticket endpoints not_found also means support tickets are not enabled for your account. |
423 | partner_inactive or tenant_suspended. Your partner account is deactivated or suspended, so no request will be served until it is reinstated. |
429 | Per-partner rate limit exceeded |
Response fields (200)
oktruerequired
invoiceobjectrequired
invoice.invoiceNumberstringrequired
invoice.statusstringrequiredOne of: issued, pending, partial, paid, dispute, late, void.
invoice.issuedAtstring (date-time) | nulloptional
invoice.dueAtstring (date-time) | nulloptional
invoice.paidAtstring (date-time) | nulloptional
invoice.totalCentsintegerrequiredInvoice total in cents
invoice.paidCentsintegerrequiredCash received in cents
invoice.creditCentsintegerrequiredCredit memos applied in cents
invoice.residualCentsintegerrequiredStill owed in cents; 0 on paid and void invoices
invoice.currencystringrequired
invoice.paymentUrlstring | nulloptionalHosted payment link, when the invoice has been published for online payment
Request
http
GET /api/inbound/acme-health/invoices/{invoiceNumber}
Host: api.axiomscript.com
X-Axiom-Timestamp: 1767225600
X-Axiom-Signature: sha256=<hex>Response 200
json
{
"ok": true,
"invoice": {
"invoiceNumber": "AXM-INV-1001",
"status": "issued",
"issuedAt": "2026-10-26T14:00:00.000Z",
"dueAt": "2026-10-26T14:00:00.000Z",
"paidAt": null,
"totalCents": 35000,
"paidCents": 0,
"creditCents": 0,
"residualCents": 35000,
"currency": "USD",
"paymentUrl": "https://payments.example.com/invoice/AXM-INV-1001"
}
}
