Skip to main content
An order is what an account buys: its lines, billing preferences, invoices and payments. This area creates and reads orders, quotes and contracts, changes their lines and billing, moves them through their states, and manages their notes and files. It has 60 endpoints, and every SDK supports all of them.
Only the preview endpoints are dry runs. Every other state change, such as upgrade, cancel or discard_draft, takes effect at once. Discarding a draft removes it, so the order can no longer be read.

At a glance

Before you call

Register your API credentials once when your app starts, as shown in Authentication. Every SDK sample on these pages then gets its client in one line. With cURL, send the access token in an Authorization header: Authorization: Bearer $ACCESS_TOKEN.

Things to know

  • Most order bodies go under order. The exceptions are upgrade, downgrade, contract_adjustment and their previews (effective_date and lines at the top level), the dormant invoice call (activate), the express call (account), and the note calls, which take a multipart form.
  • A contract needs a recurring or metered item on a line. Set allow_contract to true and send contract_properties when you create the order.
  • Lines are named two ways. Line paths take the line’s id as line_uuid; a change body names a line by its charge_item_uuid, sent as uuid.
  • Previewing an order can still create an account. POST /orders/preview creates no order, but a body that names a new account creates that account.
  • Payments and fulfillments are not checked against the order. GET /orders/{order_id}/payments/{payment_id} and .../item_fulfillments/{fulfillment_id} read the record by its own id.
  • Listings page by cursor. Send limit, then pass pagination.next_cursor as cursor while pagination.has_more is true.