Skip to content

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.

Per-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 ​

partnerSlugstringpathrequired

The partner's Axiom-issued slug (e.g. acme-health).

fromstring (date)queryoptional

 

tostring (date)queryoptional

 

changedSincestring (date-time)queryoptional

 

afterIdintegerqueryoptional

Only with changedSince. The axiomOrderId of the last row of the previous page. At least 1.

invoiceNumberstringqueryoptional

Up to 32 characters.

limitintegerqueryoptional

From 1 to 200. Default 100.

offsetintegerqueryoptional

Not allowed with changedSince. At least 0. Default 0.

Responses ​

StatusMeaning
200One page of your orders
400invalid_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.
401Missing, expired, or invalid HMAC signature / timestamp
423partner_inactive or tenant_suspended. Your partner account is deactivated or suspended, so no request will be served until it is reinstated.
429Per-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 | nulloptional

For a re-ship

orders[].itemsarray of objectrequired

 

orders[].items[].productIdintegerrequired

The stable key. sku is its current SKU.

orders[].items[].skustringrequired

 

orders[].items[].quantityintegerrequired

 

orders[].items[].unitPriceCentsinteger | nullrequired

Null on orders created before unit prices were stamped

orders[].chargeCentsinteger | nullrequired

Goods charge stamped at creation

orders[].couponCentsintegerrequired

 

orders[].shippingCentsinteger | nullrequired

Shipping billed for this order; null unless billing.state is billed

orders[].platformFeeCentsinteger | nullrequired

Your platform fee. Null means not recorded; 0 means computed as zero.

orders[].billingobjectrequired

 

orders[].billing.statestringrequired

One 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 objectrequired

Credit 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[].amountCentsintegerrequired

Positive is a credit

orders[].billing.invoiceWideCredits[].createdAtstring (date-time)required

 

orders[].creditsarray of objectrequired

Pre-invoice money credits on the order

orders[].credits[].amountCentsintegerrequired

 

orders[].credits[].productIdinteger | nullrequired

 

orders[].credits[].skustring | nullrequired

 

orders[].credits[].quantityinteger | nullrequired

 

orders[].credits[].appliedbooleanrequired

True once an invoice took it

orders[].credits[].createdAtstring (date-time)required

 

orders[].invoiceCreditsarray of objectrequired

Credit 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)required

The 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 ​

partnerSlugstringpathrequired

The partner's Axiom-issued slug (e.g. acme-health).

partnerOrderIdstringpathrequired

 

Responses ​

StatusMeaning
200The order
401Missing, expired, or invalid HMAC signature / timestamp
404No 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.
423partner_inactive or tenant_suspended. Your partner account is deactivated or suspended, so no request will be served until it is reinstated.
429Per-partner rate limit exceeded

Response fields (200) ​

oktruerequired

 

orderobjectrequired

 

order.axiomOrderIdintegerrequired

 

order.partnerOrderIdstringrequired

 

order.orderedAtstring (date-time)required

 

order.statusstringrequired

 

order.replacesPartnerOrderIdstring | nulloptional

For a re-ship

order.itemsarray of objectrequired

 

order.items[].productIdintegerrequired

The stable key. sku is its current SKU.

order.items[].skustringrequired

 

order.items[].quantityintegerrequired

 

order.items[].unitPriceCentsinteger | nullrequired

Null on orders created before unit prices were stamped

order.chargeCentsinteger | nullrequired

Goods charge stamped at creation

order.couponCentsintegerrequired

 

order.shippingCentsinteger | nullrequired

Shipping billed for this order; null unless billing.state is billed

order.platformFeeCentsinteger | nullrequired

Your platform fee. Null means not recorded; 0 means computed as zero.

order.billingobjectrequired

 

order.billing.statestringrequired

One 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 objectrequired

Credit 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[].amountCentsintegerrequired

Positive is a credit

order.billing.invoiceWideCredits[].createdAtstring (date-time)required

 

order.creditsarray of objectrequired

Pre-invoice money credits on the order

order.credits[].amountCentsintegerrequired

 

order.credits[].productIdinteger | nullrequired

 

order.credits[].skustring | nullrequired

 

order.credits[].quantityinteger | nullrequired

 

order.credits[].appliedbooleanrequired

True once an invoice took it

order.credits[].createdAtstring (date-time)required

 

order.invoiceCreditsarray of objectrequired

Credit 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)required

The 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 ​

partnerSlugstringpathrequired

The partner's Axiom-issued slug (e.g. acme-health).

statusstringqueryoptional

One of: issued, pending, partial, paid, dispute, late, void.

limitintegerqueryoptional

From 1 to 100. Default 50.

offsetintegerqueryoptional

At least 0. Default 0.

Responses ​

StatusMeaning
200The partner's invoices
401Missing, expired, or invalid HMAC signature / timestamp
423partner_inactive or tenant_suspended. Your partner account is deactivated or suspended, so no request will be served until it is reinstated.
429Per-partner rate limit exceeded

Response fields (200) ​

oktruerequired

 

totalintegerrequired

 

invoicesarray of objectrequired

 

invoices[].invoiceNumberstringrequired

 

invoices[].statusstringrequired

One of: issued, pending, partial, paid, dispute, late, void.

invoices[].issuedAtstring (date-time) | nulloptional

 

invoices[].dueAtstring (date-time) | nulloptional

 

invoices[].paidAtstring (date-time) | nulloptional

 

invoices[].totalCentsintegerrequired

Invoice total in cents

invoices[].paidCentsintegerrequired

Cash received in cents

invoices[].creditCentsintegerrequired

Credit memos applied in cents

invoices[].residualCentsintegerrequired

Still owed in cents; 0 on paid and void invoices

invoices[].currencystringrequired

 

invoices[].paymentUrlstring | nulloptional

Hosted 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 ​

partnerSlugstringpathrequired

The partner's Axiom-issued slug (e.g. acme-health).

invoiceNumberstringpathrequired

 

Responses ​

StatusMeaning
200The invoice
401Missing, expired, or invalid HMAC signature / timestamp
404No 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.
423partner_inactive or tenant_suspended. Your partner account is deactivated or suspended, so no request will be served until it is reinstated.
429Per-partner rate limit exceeded

Response fields (200) ​

oktruerequired

 

invoiceobjectrequired

 

invoice.invoiceNumberstringrequired

 

invoice.statusstringrequired

One of: issued, pending, partial, paid, dispute, late, void.

invoice.issuedAtstring (date-time) | nulloptional

 

invoice.dueAtstring (date-time) | nulloptional

 

invoice.paidAtstring (date-time) | nulloptional

 

invoice.totalCentsintegerrequired

Invoice total in cents

invoice.paidCentsintegerrequired

Cash received in cents

invoice.creditCentsintegerrequired

Credit memos applied in cents

invoice.residualCentsintegerrequired

Still owed in cents; 0 on paid and void invoices

invoice.currencystringrequired

 

invoice.paymentUrlstring | nulloptional

Hosted 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"
  }
}