v1

latestOpenAPI 3.0.42026-07-2685196386.6 KB
Order

Create order

Creates a new order for a customer in the admin dashboard. Requires the stores.orders.create permission.

post/stores/{storeId}/orders

Path parameters

storeIdstring uuid required

The ID of the store the order will be created in.

Request body

costnumber double nullable

An arbitrary total to charge the customer, without referencing any products. When set, Items is ignored and the order is created with no line items.

gatewaystring required

The specific payment method ID to use for this order

couponCodestring nullable

The coupon code that the customer is applying to the order

affiliateCodestring nullable

The affiliate code (store affiliate link) to apply to this order.

emailAddressstring email required

The email address of the customer placing the order

returnUrlstring uri nullable

The URL to redirect the customer to after payment completion. If not provided, the store's default return URL will be used.

sendReceiptboolean required

Whether to send a receipt email to the customer after the order is completed. Defaults to true.

metadataobject nullable

Custom key-value metadata to attach to the order for your own tracking purposes. Maximum of 20 keys, each key max 40 characters, each value max 500 characters.

ipAddressstring nullable

The IP address of the customer placing the order

userAgentstring nullable

The browser user agent of the customer placing the order, you can get this from the request headers or using JavaScript

countryCodestring nullable

The 2-digit country code (ISO 3166-1 alpha-2) of the customer placing the order

Response

The object was successfully created.

successboolean required

Indicates whether the operation or response was successful.

messagestring nullable

A descriptive message providing additional context or information about the response.

codestring nullable

The error code (if there was an error) to use when referencing the error