Orders

Orders represent in-progress purchases, their line items, billing details, signing state, and resulting entitlements.

Order Object

Represents an in-progress store order.

Order Structure
FieldTypeDescription
idstringThe ID of the order
statusintegerThe status of the order
revisionintegerThe revision used for optimistic updates
order_line_itemsarray[order line item object]The line items in the order
billing_facet?billing facet objectThe billing details for the order
external_gateway_facet?objectBilling details managed by an external payment gateway
gifting_facet?gifting facet objectGift details for the order
subscription_facet?objectSubscription details for the order
checkout_context?objectAdditional checkout context
created_atISO8601 timestampWhen the order was created
unsatisfied_constraints?array[object]Constraints that prevent the order from being signed
Order Status
ValueNameDescription
0UNSPECIFIEDThe order status is unspecified
1DRAFTThe order is open for modification
2SIGNEDThe order has been signed
3DISCARDEDThe order has been discarded
4SIGNING_IN_PROGRESSThe order is being signed
5SIGNING_FAILEDThe order could not be signed
Order Line Item Structure
FieldTypeDescription
idstringThe ID of the line item
sku_idsnowflakeThe ID of the SKU
quantityintegerThe quantity of the SKU
purchase_typeintegerThe purchase type
subscription_plan_id?snowflakeThe ID of the subscription plan used for a subscription line item
Order Line Item Purchase Type
ValueNameDescription
0UNSPECIFIEDThe purchase type is unspecified
1ONE_TIMEThe line item is purchased once
2SUBSCRIPTIONThe line item creates or updates a subscription
Billing Facet Structure
FieldTypeDescription
payment_gatewayintegerThe payment gateway
payment_source_id??snowflakeThe ID of the payment source
invoice_preview?invoice objectThe invoice preview calculated for the order
Gifting Facet Structure
FieldTypeDescription
is_giftbooleanWhether the order is a gift
gift_customization?gift customization objectCustomization for the gift
Gift Customization Structure
FieldTypeDescription
recipient_id?snowflakeThe ID of the gift recipient
gift_style?integerThe style of the gift
emoji_id??snowflakeThe ID of the custom emoji
emoji_name??stringThe name of the standard emoji
sound_id??snowflakeThe ID of the sound attached to the gift
reward_sku_ids?array[snowflake]The IDs of reward SKUs included in the gift
custom_message_contents?stringThe custom message attached to the gift
Example Order
{
"id": "01JYJ6R5H47VQ9C2M8P3A6N1TK",
"status": 1,
"revision": 2,
"order_line_items": [
{
"id": "01JYJ6R6ETTQZB71W0E7P9M4YH",
"sku_id": "1422548914485198869",
"quantity": 1,
"purchase_type": 1
}
],
"billing_facet": {
"payment_gateway": 1,
"payment_source_id": "1422548914485198870"
},
"created_at": "2026-08-12T14:22:31.450000+00:00",
"unsatisfied_constraints": []
}

Endpoints

Get Order

GET/billing/orders/{order.id}

Returns an order object.

Create Order

POST/billing/orders

Creates a new order. Returns the new order object on success.

JSON Params
FieldTypeDescription
order_line_itemsarray[partial order line item object]The line items to add to the order
billing_facetpartial billing facet objectThe billing details for the order
application_facet?application facet objectApplication-specific order details
location_facet?location facet objectLocation details used during checkout
gifting_facet?gifting facet objectGift details for the order

Only sku_id, quantity, and purchase_type are supplied for each line item when creating an order.

Application Facet Structure
FieldTypeDescription
test_modebooleanWhether the order is for an application in test mode
Location Facet Structure
FieldTypeDescription
request_gateway_country_codestringThe country code selected for the payment gateway

List Orders

GET/billing/orders

Returns a list of order objects.

Query String Params
FieldTypeDescription
limit?integerThe maximum number of orders to return

Modify Order

PATCH/billing/orders/{order.id}

Modifies an order. Returns the updated order object on success.

JSON Params
FieldTypeDescription
billing_facet?partial billing facet objectThe updated billing details
expected_revision?integerThe revision the caller expects to modify

Sign Order

POST/billing/orders/{order.id}/sign

Signs the order. Returns the signed order object on success. If the order has unsatisfied constraints, the API may return the order object in a 400 response.

JSON Params
FieldTypeDescription
expected_revision?integerThe revision the caller expects to sign

Discard Order

POST/billing/orders/{order.id}/discard

Discards the order. Returns the discarded order object on success.

List Order Entitlements

GET/billing/orders/{order.id}/entitlements

Returns a list of entitlement objects created for the order.