The REST Admin API is a legacy API as of October 1, 2024. Starting April 1, 2025, all new public apps must be built exclusively with the GraphQL Admin API. For details and migration steps, visit our migration guide.
Checkout
The REST Checkout API is deprecated as of version 2024-07. Please see the developer changelog for more information.
If you're building an app with the Sales Channel SDK, then you can use the Checkout API to let customers purchase products from Shopify stores that have installed your sales channel.
Shopify uses the Checkout resource to manage a user's cart as it transitions to a paid order. This process includes specifying which line items are included in the checkout, attaching a customer's shipping and payment details, and calculating tax and shipping rates. Credit card payments can be attached to a Checkout using the Payment resource.
Note
You can't use the Checkout API to create a new checkout user experience for an individual store. For that you need to use an SDK that's powered by the Storefront API instead, such as the JavaScript Buy, iOS Buy, and Android Buy SDKs.
Endpoints
- post/admin/api/latest/checkouts.
json Creates a checkoutdeprecated - post/admin/api/latest/checkouts/{token}/complete.
json Completes a checkoutdeprecated - get/admin/api/latest/checkouts/{token}.
json Retrieves a checkoutdeprecated - get/admin/api/latest/checkouts/{token}/shipping_
rates. json Retrieves a list of shipping ratesdeprecated - put/admin/api/latest/checkouts/{token}.
json Modifies an existing checkoutdeprecated
The Checkout resource
Properties
A cart-level discount applied to the checkout. Apply a discount by
specifying values for amount
, title
, description
, value
,
and value_type
.
Show applied_discount properties
- amount: The amount that is deducted from
payment_due
in presentment currency. - title: The title to categorize the applied discount.
- description: The description of the applied discount.
- value: The value that was used to calculate the final applied discount amount.
- value_type: The type of value that was used to calculate the final applied discount amount. Valid values:
fixed_amount
andpercentage
. - non_applicable_reason: The reason why the discount is not applicable, if the discount cannot be applied to the checkout.
- applicable: Whether this discount code can be applied to the checkout.
- application_type: Describes how the discount was applied to the checkout. Possible values:
- automatic: The discount was applied automatically.
- discount_code: The merchant or customer entered a discount code.
- manual: The discount was applied manually by the merchant or an app.
- script: The discount was applied by a Shopify Script.
The mailing address associated with the payment method. It has the following properties:
Show billing_address properties
- address1: The street address of the billing address.
- address2: An optional additional field for the street address of the billing address.
- city: The city, town, or village of the billing address.
- company: The company of the person associated with the billing address.
- country: The name of the country of the billing address.
- country_code: The two-letter code (ISO 3166-1 alpha-2 format) for the country of the billing address.
- first_name: The first name of the person associated with the payment method.
- last_name: The last name of the person associated with the payment method.
- phone: The phone number at the billing address.
- province: The name of the region (province, state, prefecture, …) of the billing address.
- province_code: The alphanumeric abbreviation of the region of the billing address.
- zip: The postal code (zip, postcode, Eircode, …) of the billing address.
Whether the customer has consented to receive marketing material via email.
The date and time (ISO 8601 format) when the checkout was created.
The three-letter code (ISO 4217 format) of the shop's default currency at the time of checkout. For the currency that the customer used at checkout, see presentment_currency
.
The ID of the customer associated with this checkout.
The discount code that is applied to the checkout. This populates applied_discount
with
the appropriate metadata for that discount code. To remove a discount code, send an empty string or
null
.
The customer's email address. A checkout needs to have a value for email
or phone
before it can be completed.
A list of gift card objects, each containing information about a gift card applied to this checkout.
Gift cards can be applied to a checkout by passing { "checkout": { "gift_cards": [{ "code": "a gift card code" }, { "code": "another gift card code" }] } }
.
Each gift card object has the following properties:
Show gift_cards properties
- amount_used: The amount of the gift card used by this checkout in presentment currency.
- code: The gift card code.
- balance: The amount left on the gift card after being applied to this checkout in presentment currency.
- id: The ID for the applied gift card.
- last_characters: The last four characters of the applied gift card for display back to the user.
gift_cards
array without that gift card.A list of line item objects, each containing information about an item in the checkout. Each line item object has the following properties:
Show line_items properties
- applied_discounts: A list of the discounts applied to the line item.
- compare_at_price: The original selling price of the product, if applicable.
- discount_allocations: A list all discounts on the checkout that target this line item, including both "across" and "each" applications. A superset of
applied_discounts
. - fulfillment_service: If the variant is a gift card, allows to override the fulfillment service so the gift card can be activated with a custom code. Valid values:
manual
. - grams: The weight of the item in grams.
- id: The checkout-specific ID of the line item.
- line_price: The line price of the item, based on
price
multiplied byquantity
. - price: The price of the item in presentment currency.
- product_id: The product of the line item.
- properties: The customization information for a line item (optional).
- quantity: The number of products that were purchased.
- requires_shipping: Whether the fulfillment requires shipping.
- sku: The unique identifier of the item in the fulfillment.
- taxable: Whether this product is taxable.
- title: The title of the product.
- variant_id: The variant ID of the line item.
- variant_title: The title of the product variant.
- vendor: The name of the item's supplier.
An object containing the ID, name, and status page URL of the associated order when the checkout is complete. Default value: null
.
The amount left to be paid in presentment currency. This is equal to the sum of the checkout line prices, taxes, and shipping minus discounts and gift cards.
The Checkout resource
Anchor to POST request, Creates a checkoutpostCreates a checkout deprecated
checkouts
access scope.Creates a checkout
Create a checkout with a product variant and quantity
Create a checkout with a product variant and quantity
Show checkout properties
A list of line item objects, each containing information about an item in the checkout. Each line item object has the following properties:
Show line_items properties
- applied_discounts: A list of the discounts applied to the line item.
- compare_at_price: The original selling price of the product, if applicable.
- discount_allocations: A list all discounts on the checkout that target this line item, including both "across" and "each" applications. A superset of
applied_discounts
. - fulfillment_service: If the variant is a gift card, allows to override the fulfillment service so the gift card can be activated with a custom code. Valid values:
manual
. - grams: The weight of the item in grams.
- id: The checkout-specific ID of the line item.
- line_price: The line price of the item, based on
price
multiplied byquantity
. - price: The price of the item in presentment currency.
- product_id: The product of the line item.
- properties: The customization information for a line item (optional).
- quantity: The number of products that were purchased.
- requires_shipping: Whether the fulfillment requires shipping.
- sku: The unique identifier of the item in the fulfillment.
- taxable: Whether this product is taxable.
- title: The title of the product.
- variant_id: The variant ID of the line item.
- variant_title: The title of the product variant.
- vendor: The name of the item's supplier.
Create a checkout without any line items
Create a checkout without any line items
Creating a checkout with errors, such as using the ID of a variant that doesn't exist or that isn't published to your sales channel, fails with a 422 response and returns errors
Creating a checkout with errors, such as using the ID of a variant that doesn't exist or that isn't published to your sales channel, fails with a 422 response and returns errors
Show checkout properties
A list of line item objects, each containing information about an item in the checkout. Each line item object has the following properties:
Show line_items properties
- applied_discounts: A list of the discounts applied to the line item.
- compare_at_price: The original selling price of the product, if applicable.
- discount_allocations: A list all discounts on the checkout that target this line item, including both "across" and "each" applications. A superset of
applied_discounts
. - fulfillment_service: If the variant is a gift card, allows to override the fulfillment service so the gift card can be activated with a custom code. Valid values:
manual
. - grams: The weight of the item in grams.
- id: The checkout-specific ID of the line item.
- line_price: The line price of the item, based on
price
multiplied byquantity
. - price: The price of the item in presentment currency.
- product_id: The product of the line item.
- properties: The customization information for a line item (optional).
- quantity: The number of products that were purchased.
- requires_shipping: Whether the fulfillment requires shipping.
- sku: The unique identifier of the item in the fulfillment.
- taxable: Whether this product is taxable.
- title: The title of the product.
- variant_id: The variant ID of the line item.
- variant_title: The title of the product variant.
- vendor: The name of the item's supplier.
Creating a checkout with line item errors fails and returns the errors mapped by index
Creating a checkout with line item errors fails and returns the errors mapped by index
Show checkout properties
A list of line item objects, each containing information about an item in the checkout. Each line item object has the following properties:
Show line_items properties
- applied_discounts: A list of the discounts applied to the line item.
- compare_at_price: The original selling price of the product, if applicable.
- discount_allocations: A list all discounts on the checkout that target this line item, including both "across" and "each" applications. A superset of
applied_discounts
. - fulfillment_service: If the variant is a gift card, allows to override the fulfillment service so the gift card can be activated with a custom code. Valid values:
manual
. - grams: The weight of the item in grams.
- id: The checkout-specific ID of the line item.
- line_price: The line price of the item, based on
price
multiplied byquantity
. - price: The price of the item in presentment currency.
- product_id: The product of the line item.
- properties: The customization information for a line item (optional).
- quantity: The number of products that were purchased.
- requires_shipping: Whether the fulfillment requires shipping.
- sku: The unique identifier of the item in the fulfillment.
- taxable: Whether this product is taxable.
- title: The title of the product.
- variant_id: The variant ID of the line item.
- variant_title: The title of the product variant.
- vendor: The name of the item's supplier.
/admin/api/2025-07/checkouts. json
Response
Anchor to POST request, Completes a checkoutpostCompletes a checkout deprecated
checkouts
access scope.Completes a checkout
Complete a checkout without requiring payment
Complete a checkout without requiring payment
/admin/api/2025-07/checkouts/b490a9220cd14d7344024f4874f640a6/complete. json
Response
Anchor to GET request, Retrieves a checkoutgetRetrieves a checkout deprecated
checkouts
access scope.Retrieves a checkout
Retrieve a completed checkout
Retrieve a completed checkout
Retrieve a processing checkout
Retrieve a processing checkout
Retrieve an existing checkout
Retrieve an existing checkout
/admin/api/2025-07/checkouts/bd5a8aa1ecd019dd3520ff791ee3a24c. json
Response
Anchor to GET request, Retrieves a list of shipping ratesgetRetrieves a list of shipping rates deprecated
Retrieves a list of available shipping rates for the specified checkout. Implementers need to poll this endpoint until rates become available.
Each shipping rate contains the checkout's new subtotal price, total tax, and total price in the event that this shipping rate is selected. This can be used to update the UI without performing further API requests. To apply a shipping rate, update the checkout's shipping line with the handle of the selected rate.Retrieve available shipping rates
Retrieve available shipping rates
Retrieving shipping rates before they're available returns an empty array
Retrieving shipping rates before they're available returns an empty array
Retrieving shipping rates when none are available for the current shipping address or cart returns an empty array
Retrieving shipping rates when none are available for the current shipping address or cart returns an empty array
/admin/api/2025-07/checkouts/exuw7apwoycchjuwtiqg8nytfhphr62a/shipping_ rates. json
Response
Anchor to PUT request, Modifies an existing checkoutputModifies an existing checkout deprecated
checkouts
access scope.Modifies an existing checkout
Select a shipping rate
Select a shipping rate
Show checkout properties
A unique identifier for a particular checkout.
The selected shipping rate. A new shipping rate can be selected by updating the value for handle
.
A shipping line is required when requires_shipping
is true
. Learn more about
selecting shipping rates.
Update the shipping address and email of a checkout
Update the shipping address and email of a checkout
Show checkout properties
A unique identifier for a particular checkout.
The customer's email address. A checkout needs to have a value for email
or phone
before it can be completed.
The mailing address to where the checkout will be shipped. It has the following properties:
Show shipping_address properties
- address1: The street address of the shipping address.
- address2: An optional additional field for the street address of the shipping address.
- city: The city, town, or village of the shipping address.
- company: The company of the person associated with the shipping address.
- country: The name of the country of the shipping address.
- country_code: The two-letter code (ISO 3166-1 alpha-2 format) for the country of the shipping address.
- first_name: The first name of the person associated with the shipping address.
- last_name: The last name of the person associated with the shipping address.
- phone: The phone number at the shipping address.
- province: The name of the region (province, state, prefecture, …) of the shipping address.
- province_code: The alphanumeric abbreviation of the region of the shipping address.
- zip: The postal code (zip, postcode, Eircode, …) of the shipping address.
Updating a shipping address with an invalid zip code fails and returns errors
Updating a shipping address with an invalid zip code fails and returns errors
Show checkout properties
A unique identifier for a particular checkout.
The mailing address to where the checkout will be shipped. It has the following properties:
Show shipping_address properties
- address1: The street address of the shipping address.
- address2: An optional additional field for the street address of the shipping address.
- city: The city, town, or village of the shipping address.
- company: The company of the person associated with the shipping address.
- country: The name of the country of the shipping address.
- country_code: The two-letter code (ISO 3166-1 alpha-2 format) for the country of the shipping address.
- first_name: The first name of the person associated with the shipping address.
- last_name: The last name of the person associated with the shipping address.
- phone: The phone number at the shipping address.
- province: The name of the region (province, state, prefecture, …) of the shipping address.
- province_code: The alphanumeric abbreviation of the region of the shipping address.
- zip: The postal code (zip, postcode, Eircode, …) of the shipping address.