Order ( order )
A order is a commercial order placed by a buyer. It carries amounts, line items, and fulfillment status and serves as the pivot between the payment session, invoicing, and operational delivery tracking.
Role
The order models the commercial lifecycle of a purchase from initial creation through fulfillment and closure. It may be created directly through the API or automatically produced by an orchestration process after a checkout session.
checkout session. The order is also the natural anchor for invoicing: invoices and credit notes may be created directly from an order or linked to an existing order later.
Identifier and structure
Every order has a stable identifier prefixed with ord_.
{
"object": "order",
"id": "ord_7e3b9f2a1c4d8e5f",
"buyer_id": "cmp_3a8f1d9c2b4e7f6a",
"buyer_contact_id": "ctc_d12e3f4a5b6c7d8e",
"checkout_session_id": "cs_5e2d8f1a9b3c4d7e",
"source_reference": "ORDER-2026-00842",
"status": "confirmed",
"currency": "eur",
"amount_excluding_tax": 100000,
"amount_tax": 20000,
"amount_including_tax": 120000,
"metadata": {},
"confirmed_at": "2026-06-17T10:05:00.000Z",
"fulfilled_at": null,
"closed_at": null,
"created_at": "2026-06-17T10:00:00.000Z",
"updated_at": "2026-06-17T10:05:00.000Z"
}Fields
| Field | Type | Description |
|---|---|---|
id | string | Order identifier (prefix `ord_`). |
object | string | Always "order". |
buyer_id | string | Buyer company (`cmp_…`). Required to issue an invoice from the order. |
buyer_contact_id | string | Buyer contact (ctc_…). Optional. |
checkout_session_id | string | Payment session that produced this order (`cs_…`). Optional. |
sales_channel | enum | null | Sales channel: `web`, `pos`, `admin`, `marketplace`, `call_center`, `edi`, `other`, or null. |
billing_details | object | null | Structured billing details for the order. |
shipping_details | object | null | Structured shipping details for the order. |
status | enum | Order status: `draft`, `created`, `confirmed`, `fulfilled`, `completed`, `cancelled`. |
currency | string | ISO 4217 currency code in lowercase (for example `eur`). |
amount_excluding_tax | integer | Amount excluding tax in cents. Must satisfy: excluding tax + tax = including tax. |
amount_tax | integer | Tax amount in cents. |
amount_including_tax | integer | Amount including tax in cents. |
source_reference | string | Reference in your system (internal order number, cart…). |
metadata | object | Flat map of `string | number | boolean` scalars, following the API metadata convention. |
confirmed_at | datetime | Confirmation timestamp. Populated no earlier than `confirmed`. |
fulfilled_at | datetime | Fulfillment timestamp. Populated from `fulfilled` onward. |
closed_at | datetime | Closure timestamp (`completed` or `cancelled`). |
created_at | datetime | Creation date. |
updated_at | datetime | Last update date. |
Lifecycle
. The order follows a linear lifecycle with two final states. The initial status (draft or created) is selected at creation — later statuses are reachable only through dedicated transition endpoints.
Statuses
| Status | Description | Final |
|---|---|---|
draft | Draft not yet active. Editable. Cannot be confirmed — only possible exit is cancellation. | no |
created | Active order sent to the buyer. Editable. Can be confirmed or canceled. | no |
confirmed | Accepted order. Not editable. Can be fulfilled or canceled. | no |
fulfilled | Goods or services fulfilled. Not editable. | no |
completed | Order completed and closed. | yes |
cancelled | Canceled order. Reachable from `draft`, `created`, or `confirmed`. | yes |
Transitions
| Action | Endpoint | From | To | Updated timestamps |
|---|---|---|---|---|
| Confirmer | POST /:id/confirm | created | confirmed | confirmed_at |
| Livrer | POST /:id/fulfill | confirmed | fulfilled | fulfilled_at |
| Complete | POST /:id/complete | fulfilled | completed | closed_at |
| Annuler | POST /:id/cancel | draft, created, confirmed | cancelled | closed_at |
Progress timestamps are cumulative: moving directly to
fulfilled without explicitly going through confirmed
also populates confirmed_at. Likewise, complete
populates fulfilled_at if it was still null.
Only orders in draft or created status can be updated through POST /:id — amounts, lines, buyer, metadata. From confirmedonward, all fields are frozen — any correction requires cancellation and a new order, or a credit note.
Lignes d'article
Line items describe the products or services in the order. They may be supplied at creation and atomically replaced during an update while the order is in draft or
createdstatus. They are then available through
GET /v1/orders/:id/line-items.
{
"object": "line_item",
"id": "li_a1b2c3d4e5f6",
"product_name": "Pro Subscription",
"description": "12-month access",
"line_type": "service",
"product_reference": "PROD-PRO-12M",
"quantity": 1,
"unit_amount_excluding_tax": 100000,
"unit_amount_including_tax": 120000,
"amount_excluding_tax": 100000,
"amount_tax": 20000,
"amount_including_tax": 120000,
"currency": "eur",
"tax": { "type": "percent", "rate": 0.20, "code": "VAT20" }
}| Field | Type | Description |
|---|---|---|
product_name | string | Product or service name. Required. |
description | string | Additional description. Optional. |
line_type | enum | product, service, shipping, discount, fee. Optional. |
product_reference | string | Product reference in your catalog. Optional. |
quantity | integer | Quantity (positive integer). |
unit_amount_excluding_tax | integer | Unit price excluding tax in cents. |
unit_amount_including_tax | integer | Unit price including tax in cents. |
amount_excluding_tax | integer | Line amount excluding tax (= `unit_ht` × `quantity` when absent). |
amount_tax | integer | Line tax amount. |
amount_including_tax | integer | Line amount including tax. |
currency | string | Line currency. Must match the order currency. |
tax | object | Tax detail: type (`percent`, `fixed`, `none`), rate, code, amount. |
. The equality constraint HT + taxe = TTC applies to every line individually. Line amounts (amount_*) are calculated automatically when absent (unit_amount × quantity).
Invoicing
An order may be associated with one or more invoices or credit notes. Two modes are available: create an invoice directly from the order or link existing invoices.
Create an invoice from the order
POST /v1/orders/:id/invoices creates an invoice automatically inheriting the merchant_id, du buyer_id and currency
from the order — these fields cannot be overridden. The order must have a buyer_id for an invoice to be issued.
POST /v1/orders/ord_7e3b/invoices
{
"type": "invoice",
"amount_excluding_tax": 100000,
"amount_tax": 20000,
"amount_including_tax": 120000,
"reference": "FAC-2026-00042",
"issue_date": "2026-06-17",
"due_date": "2026-07-17",
"issue": true
}Setting "issue": true immediately issues the invoice (transition to status: "issued") and triggers the invoice.issued event in addition to invoice.created. For credit notes, use "type": "credit_note" and reference the original invoice through source_invoice_id.
Link existing invoices
Existing invoices created independently may be attached to the order.
| Endpoint | Effet |
|---|---|
GET /v1/orders/:id/invoices | Lists all invoices linked to the order. |
POST /v1/orders/:id/invoice-links | Atomically replaces the complete set of links. Send { "invoice_ids": ["inv_…", …] }. |
DELETE /v1/orders/:id/invoice-links/:invoice_id | Removes one link without affecting others. |
Linked invoices must belong to the same merchant and buyer as the order. The link is purely relational — it does not affect invoice status.
In processes
There is no dedicated node for order creation or transitions. The object is managed through direct API calls from your systems or HTTP actions in an orchestration process.
The order may be passed as a parameter to some payment nodes — for example
create_psp_payment accepts a order optional field to attach the payment to the corresponding order. Once persisted, it can be retrieved in a process through the generic helper fetch_order.
Events
| Event | Trigger |
|---|---|
order.created | The order was just created. |
order.updated | The order was updated (amounts, buyer, lines…). |
order.confirmed | The order moved to `confirmed`. |
order.fulfilled | The order moved to `fulfilled`. |
order.completed | The order moved to `completed`. |
order.cancelled | The order moved to `cancelled`. |
Transition events (confirmed, fulfilled,
completed, cancelled) include a diff with the final status in after. The order.updated
event includes a diff with the previous status in before and changed fields in after.