Skip to main content

checkout

A customer's checkout.


Deprecated

The checkout object will be deprecated for the Information, Shipping, and Payment pages on August 13, 2024. Merchants who have customized these pages using checkout.liquid need to upgrade to Checkout Extensibility before August 13, 2024.

Learn how to build checkout extensions that extend the functionality of Shopify checkout.


You can access the checkout object on the Order status page.

Shopify Plus merchants can access the checkout object in the checkout.liquid layout.

Properties

Anchor to
applied_gift_cards
array of gift_card

The gift cards applied to the checkout.

Anchor to
attributes

Additional attributes entered by the customer with the cart.

Shopify Plus merchants that have access to checkout.liquid can capture attributes at checkout.

Anchor to
billing_address

The billing address entered at checkout.

Anchor to
buyer_accepts_marketing

Returns true if the customer checks the email marketing subscription checkbox. Returns false if not.

Anchor to
cart_level_discount_applications

The cart-specific discount applications for the checkout.

The ISO code of the currency of the checkout.

The customer associated with the checkout.

Note

The customer object is directly accessible globally when a customer is logged in to their account.

Anchor to
discount_applications

The discount applications for the checkout.

Anchor to
discounts_amount

The total amount of the discounts applied to the checkout in the currency's subunit.

The value is output in the customer's local (presentment) currency.

For currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.

Tip

Use money filters to output a formatted amount.

Anchor to
discounts_savings

The total amount of the discounts applied to the checkout in the currency's subunit, as a negative value.

The value is output in the customer's local (presentment) currency.

For currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.

Tip

Use money filters to output a formatted amount.

The email associated with the checkout.

Anchor to
gift_cards_amount

The amount of the checkout price paid in gift cards.

The value is output in the customer's local (presentment) currency.

Tip

Use money filters to output a formatted amount.

The ID of the checkout.

The number of items in the checkout.

Anchor to
line_items
array of line_item

The line items of the checkout.

Anchor to
line_items_subtotal_price

The sum of the prices of all of the line items of the checkout in the currency's subunit, after any line item discounts. have been applied.

The value is output in the customer's local (presentment) currency.

For currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.

Tip

Use money filters to output a formatted amount.

The name of the checkout.

This value is the same as checkout.id with a # prepended to it.

Additional information entered by the customer with the cart.

The order created by the checkout.

Depending on the payment provider, the order might not have been created when the Thank you page is first viewed. In this case, nil is returned.

Note

The order object isn't available on the Thank you page.

The ID of the order created by the checkout.

The value is the same as order.id.

Depending on the payment provider, the order might not have been created when the Order status page is first viewed. In this case, nil is returned.

The name of the order created by the checkout.

The value is the same as order.name.

Depending on the payment provider, the order might not have been created when the Order status page is first viewed. In this case, nil is returned.

Anchor to
order_number

An integer representation of the name of the order created by the checkout.

The value is the same as order.order_number.

Depending on the payment provider, the order might not have been created when the Order status page is first viewed. In this case, nil is returned.

Anchor to
requires_shipping

Returns true if any of the line items of the checkout require shipping. Returns false if not.

Anchor to
shipping_address

The shipping address of the checkout.

The shipping method of the checkout.

Anchor to
shipping_price

The shipping price of the checkout in the currency's subunit.

The value is output in the customer's local (presentment) currency.

For currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.

Tip

Use money filters to output a formatted amount.

Anchor to
tax_lines
array of tax_line

The tax lines for the checkout.

The total tax amount of the checkout in the currency's subunit.

The value is output in the customer's local (presentment) currency.

For currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.

Tip

Use money filters to output a formatted amount.

Anchor to
total_price

The total price of the checkout in the currency's subunit.

The value is output in the customer's local (presentment) currency.

For currencies without subunits, such as JPY and KRW, tenths and hundredths of a unit are appended. For example, 1000 Japanese yen is output as 100000.

Tip

Use money filters to output a formatted amount.

Anchor to
transactions
array of transaction

The transactions of the checkout.

Deprecated Properties

Anchor to
cancelled
Deprecated

Returns true if the checkout has been cancelled. Returns false if not.

Deprecated

Deprecated because false is always returned.

Anchor to
discount
Deprecated

A discount applied to the checkout without being saved.

Deprecated

Deprecated because an unsaved discount doesn't exist on the Order status page.

Anchor to
discounts
array of discount
Deprecated

The discounts applied to the checkout.

Deprecated

Deprecated because not all discount types and details are captured.

The checkout.discounts property has been replaced by checkout.discount_applications.

Anchor to
financial_status
Deprecated

The financial status of the checkout.

Deprecated

Deprecated because nil is always returned.

Anchor to
fulfilled_at
Deprecated

A timestamp for the fulfullment of the checkout.

Deprecated

Deprecated because nil is always returned.

Anchor to
fulfilled_line_items
array of line_item
Deprecated

The fulfilled line items from the checkout.

Deprecated

Deprecated because the array is always empty.

Anchor to
fulfillment_status
Deprecated

The fulfillment status of the checkout.

Deprecated

Deprecated because unfulfilled is always returned.

Anchor to
unavailable_line_items
array of line_item
Deprecated

The unavailable line items of the checkout.

Deprecated

Deprecated because the array is always empty.

Anchor to
unfulfilled_line_items
array of line_item
Deprecated

The unfulfilled line items of the checkout.

Deprecated

Deprecated because the array is always the same as checkout.line_items.

{
"applied_gift_cards": [],
"attributes": {},
"billing_address": {},
"buyer_accepts_marketing": false,
"cart_level_discount_applications": [],
"currency": "CAD",
"customer": {},
"discount_applications": [],
"discounts_amount": 4224,
"discounts_savings": -4224,
"email": "cornelius.potionmaker@gmail.com",
"gift_cards_amount": 0,
"id": 29944051400769,
"line_items": [],
"line_items_subtotal_price": 42249,
"name": "#29944051400769",
"note": null,
"order": null,
"order_id": null,
"order_name": "#29944051400769",
"order_number": "#29944051400769",
"requires_shipping": true,
"shipping_address": {},
"shipping_method": {},
"shipping_price": 0,
"tax_lines": [],
"tax_price": 0,
"total_price": 38025,
"transactions": []
}
Was this section helpful?