The Order Object
An order is created when a customer purchases a product.
An order belongs to a Store, is associated with a Customer and can have many Order Items, Subscriptions, License Keys and Discount Redemptions.
Attributes
store_id
The ID of the store this order belongs to.
customer_id
The ID of the customer this order belongs to.
identifier
The unique identifier (UUID) for this order.
order_number
An integer representing the sequential order number for this store.
user_name
The full name of the customer.
user_email
The email address of the customer.
currency
The ISO 4217 currency code for the order (e.g. USD
, GBP
, etc).
currency_rate
If the order currency is USD, this will always be 1.0
. Otherwise, this is the currency conversion rate used to determine the cost of the order in USD at the time of purchase.
subtotal
A positive integer in cents representing the subtotal of the order in the order currency.
setup_fee
A positive integer in cents representing the setup fee of the order in the order currency.
discount_total
A positive integer in cents representing the total discount value applied to the order in the order currency.
tax
A positive integer in cents representing the tax applied to the order in the order currency.
total
A positive integer in cents representing the total cost of the order in the order currency.
refunded_amount
A positive integer in cents representing the refunded amount of the order in the order currency.
subtotal_usd
A positive integer in cents representing the subtotal of the order in USD.
setup_fee_usd
A positive integer in cents representing the setup fee of the order in USD.
discount_total_usd
A positive integer in cents representing the total discount value applied to the order in USD.
tax_usd
A positive integer in cents representing the tax applied to the order in USD.
total_usd
A positive integer in cents representing the total cost of the order in USD.
refunded_amount_usd
A positive integer in cents representing the refunded amount of the order in USD.
tax_name
The name of the tax rate (e.g. VAT
, Sales Tax
, etc) applied to the order. Will be null
if no tax was applied.
tax_rate
If tax is applied to the order, this will be the rate of tax as a decimal percentage.
tax_inclusive
A boolean indicating if the order was created with tax inclusive or exclusive pricing.
status
The status of the order. One of:
pending
failed
paid
refunded
partial_refund
fraudulent
status_formatted
The formatted status of the order.
refunded
Has the value true
if the order has been fully refunded.
refunded_at
If the order has been fully refunded, this will be an ISO 8601 formatted date-time string indicating when the order was refunded.
subtotal_formatted
A human-readable string representing the subtotal of the order in the order currency (e.g. $9.99).
setup_fee_formatted
A human-readable string representing the setup fee of the order in the order currency (e.g. $9.99).
discount_total_formatted
A human-readable string representing the total discount value applied to the order in the order currency (e.g. $9.99).
tax_formatted
A human-readable string representing the tax applied to the order in the order currency (e.g. $9.99).
total_formatted
A human-readable string representing the total cost of the order in the order currency (e.g. $9.99).
refunded_amount_formatted
A human-readable string representing the refunded amount of the order in the order currency (e.g. $9.99).
first_order_item
An object representing the first Order Item belonging to this order.
id
- The ID of the order item.order_id
- The ID of the order.product_id
- The ID of the product.variant_id
- The ID of the product variant.product_name
- The name of the product.variant_name
- The name of the product variant.price
- A positive integer in cents representing the price of the order item in the order currency.created_at
- An ISO 8601 formatted date-time string indicating when the order item was created.updated_at
- An ISO 8601 formatted date-time string indicating when the order item was last updated.test_mode
- A boolean indicating if the order was made in test mode.
urls
An object of customer-facing URLs for this order. It contains:
receipt
- A pre-signed URL for viewing the order in the customer’s My Orders page.
created_at
An ISO 8601 formatted date-time string indicating when the object was created.
updated_at
An ISO 8601 formatted date-time string indicating when the object was last updated.
test_mode
A boolean indicating if the object was created within test mode.