Checkout

Note

If your app is part of the multi-currency beta, then all money fields on the Checkout resource are in the presentment currency.

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.

For a detailed tutorial that walks you through the key capabilities of the Checkout API, see Sell through the Checkout API.

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.

What you can do with Checkout

The Shopify API lets you do the following with the Checkout resource. More detailed versions of these general actions may be available:

Checkout properties

applied_discount
"applied_discount": {
  "amount": "30.00",
  "title": "XYZ Promotion",
  "description": "Promotional item for blackfriday.",
  "value": "30.00",
  "value_type": "fixed_amount",
  "non_applicable_reason": null,
  "applicable": true
}

The discount metadata generated by applying a discount code. A custom discount can also be added by specifying values for amount, title, description, value, and value_type.

  • amount: The amount that is deducted from payment_due.
  • 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 and percentage.
  • 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.
billing_address
required
"billing_address": {
  "address1": "Chestnut Street 92",
  "address2": "Suite 300",
  "city": "Louisville",
  "company": null,
  "country": "US",
  "first_name": null,
  "id": 207119551,
  "last_name": null,
  "phone": "555-625-1199",
  "province": "KY",
  "zip": "40202",
  "province_code": null,
  "country_code": null
}

The mailing address associated with the payment method. It has the following 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 two-letter abbreviation of the region of the billing address.
  • zip: The postal code (zip, postcode, Eircode, …) of the billing address.
buyer_accepts_marketing
"buyer_accepts_marketing": false

Whether the customer has consented to receive marketing material via email.

created_at
read-only
"created_at": "2008-01-10T11:00:00-05:00"

The date and time (ISO 8601 format) when the checkout was created.

currency
read-only
"currency": "USD"

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.

customer_id
"customer_id": 1234

The ID of the customer associated with this checkout.

discount_code
"discount_code": "30_DOLLARS_OFF"

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.

email
"email": "bob.norman@hostmail.com"

The customer's email address. A checkout needs to have a value for email or phone before it can be completed.

gift_cards
"gift_cards": [
  {
    "amount_used": "30.00",
    "balance": "70.00",
    "id": 1014759463,
    "last_characters": "abdr"
  }
]

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:

  • amount_used: The amount of the gift card used by this checkout.
  • code: The gift card code.
  • balance: The amount left on the gift card after being applied to this checkout.
  • 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.
Updating the gift card list overwrites any previous list already defined in the checkout. To remove a gift card from the list of applied gift cards, re-apply the gift_cards array without that gift card.
line_items
required
"line_items": [
  {
    "compare_at_price": "9.99",
    "fulfillment_service": "manual",
    "grams": "20",
    "id": 39072856,
    "line_price": "19.99",
    "price": "19.99",
    "product_id": 632910392,
    "quantity": "",
    "requires_shipping": false,
    "sku": "IPOD2008GREEN",
    "taxable": true,
    "title": "IPod Nano - 8GB",
    "variant_id": 39072856,
    "variant_title": "Green",
    "vendor": "Apple"
  }
]

A list of line item objects, each containing information about an item in the checkout. Each line item object has the following properties:

  • compare_at_price: The original selling price of the product, if applicable.</>
  • 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 by quantity.
  • price: The price of the item.
  • 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.
order
read-only
"order": {
  "id": 123,
  "name": "#0123",
  "status_url": "https://checkout.shopify.com/123/checkouts/4207896aad57dfb159?key=123abc"
}

An object containing the ID, name, and status page URL of the associated order when the checkout is complete. Default value: null.

payment_due
read-only
"payment_due": "99.95"

The amount left to be paid. This is equal to the sum of the checkout line prices, taxes, and shipping minus discounts and gift cards.

payment_url
read-only
"payment_url": "https://elb.deposit.shopifycs.com/sessions"

The URL that must be used to store credit cards in Shopify's card vault. These URLs are subject to change, so you should always use the one supplied here. The general pattern for the URLs is https://elb.deposit.shopifycs.com/sessions.

phone
"phone": "+13125551212"

The customer's phone number. A checkout needs to have a value for email or phone before it can be completed.

presentment_currency
beta
"presentment_currency": "JPY"

The three-letter code (ISO 4217 format) for the currency that the customer used for payment at checkout. For the shop's default currency, see currency.

requires_shipping
read-only
"requires_shipping": true

Whether the checkout requires shipping. If true, then shipping_line must be set before creating a payment.

reservation_time
deprecated
"reservation_time": null

The reservation time in seconds for the line item products. Default value: null. This property is not writable.

reservation_time_left
deprecated
"reservation_time_left": 0

The time in seconds that the line item products will be held. Default value: 0. This property is not writable.

shipping_address
"shipping_address": {
  "address1": "Chestnut Street 92",
  "address2": "Apt 2",
  "city": "Louisville",
  "company": null,
  "country": "United States",
  "first_name": "Bob",
  "last_name": "Norman",
  "phone": "555-625-1199",
  "province": "Kentucky",
  "zip": "40202",
  "country_code": "US",
  "province_code": "KY"
}

The mailing address to where the checkout will be shipped. It has the following 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 two-letter abbreviation of the region of the shipping address.
  • zip: The postal code (zip, postcode, Eircode, …) of the shipping address.
shipping_line
"shipping_line": {
  "handle": "shopify-Standard-10.00",
  "price": "10.00",
  "title": "Standard"
}

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.

shipping_rate
read-only
"shipping_rate": {
  "id": "shopify-Standard-10.00",
  "price": "10.00",
  "title": "Standard"
}

The selected shipping rate. This property is not writable.

source_name
"source_name": "my_app"

The source of the checkout. Apart from the reserved values of web, pos, iphone, and android, you can set this value to whatever you like.

subtotal_price
read-only
"subtotal_price": "398.00"

The price of the checkout before shipping, taxes, and tips.

tax_lines
read-only
"tax_lines": [
  {
    "price": "11.94",
    "rate": "0.06",
    "title": "State Tax"
  }
]

An array of tax_line objects, each of which represents a tax rate applicable to the checkout. Each tax line object has the following properties:

  • price: The amount of tax to be charged.
  • rate: The rate of tax to be applied.
  • title: The name of the tax.
taxes_included
read-only
"taxes_included": false

Whether taxes are included in the subtotal price.

token
read-only
"token": "b1946ac92492d2347c6235b4d2611184"

A unique identifier for a particular checkout.

total_price
read-only
"total_price": "409.94"

The sum of the the checkout line prices, taxes, shipping costs, tips, and discounts.

total_tax
read-only
"total_tax": "11.94"

The sum of all the taxes applied to the checkout.

updated_at
read-only
"updated_at": "2012-08-24T14:02:15-04:00"

The date and time (ISO 8601 format format) when the checkout was last modified.

user_id
"user_id": 1234

The ID of the user who created the checkout. This value is passed to the order. Default value: null.

web_url
read-only
"web_url": "https://checkout.shopify.com/112233/checkouts/4207896aad57dfb159?key=123abc"

The URL pointing to the checkout accessible from the web.

Endpoints

POST /admin/checkouts.json
Creates a checkout

Create a checkout with a product variant and quantity

POST /admin/checkouts.json
{
  "checkout": {
    "line_items": [
      {
        "variant_id": 447654529,
        "quantity": 5
      }
    ]
  }
}
View Response
HTTP/1.1 201 Created
Location: https://apple.myshopify.com/admin/checkouts/aa8296288254541a747d50794cee3249.json
{
  "checkout": {
    "clone_url": "https://apple.myshopify.com/690933842/checkouts/aa8296288254541a747d50794cee3249/clone",
    "completed_at": null,
    "created_at": "2018-11-06T16:55:39-05:00",
    "currency": "USD",
    "presentment_currency": "USD",
    "customer_id": null,
    "customer_locale": "en",
    "device_id": null,
    "discount_code": null,
    "email": null,
    "legal_notice_url": null,
    "location_id": null,
    "name": "#1066348317",
    "note": "",
    "note_attributes": {},
    "order_id": null,
    "order_status_url": null,
    "order": null,
    "payment_due": "995.00",
    "payment_url": "https://app.local/cardserver/sessions",
    "payments": [],
    "phone": null,
    "shopify_payments_account_id": null,
    "privacy_policy_url": null,
    "refund_policy_url": null,
    "requires_shipping": true,
    "reservation_time_left": 0,
    "reservation_time": null,
    "source_identifier": null,
    "source_name": "755357713",
    "source_url": null,
    "subtotal_price": "995.00",
    "shipping_policy_url": null,
    "tax_exempt": false,
    "taxes_included": false,
    "terms_of_sale_url": null,
    "terms_of_service_url": null,
    "token": "aa8296288254541a747d50794cee3249",
    "total_price": "995.00",
    "total_tax": "0.00",
    "total_line_items_price": "995.00",
    "updated_at": "2018-11-06T16:55:39-05:00",
    "user_id": null,
    "web_url": "https://apple.myshopify.com/690933842/checkouts/aa8296288254541a747d50794cee3249",
    "line_items": [
      {
        "id": "28024e82b40102e993766cf1d8a3942c",
        "key": "28024e82b40102e993766cf1d8a3942c",
        "product_id": 921728736,
        "variant_id": 447654529,
        "sku": "IPOD2009BLACK",
        "vendor": "Apple",
        "title": "IPod Touch 8GB",
        "variant_title": "Black",
        "image_url": "//cdn.shopify.com/s/assets/checkout/product-blank-98d4187c2152136e9fb0587a99dfcce6f6873f3a9f21ea9135ed7f495296090f.png",
        "taxable": true,
        "requires_shipping": true,
        "gift_card": false,
        "price": "199.00",
        "compare_at_price": null,
        "line_price": "995.00",
        "properties": {},
        "quantity": 5,
        "grams": 567,
        "fulfillment_service": "shipwire-app",
        "applied_discounts": []
      }
    ],
    "gift_cards": [],
    "tax_lines": [],
    "tax_manipulations": [],
    "shipping_line": null,
    "shipping_rate": null,
    "shipping_address": null,
    "credit_card": null,
    "billing_address": null,
    "applied_discount": null
  }
}

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

POST /admin/checkouts.json
{
  "checkout": {
    "line_items": [
      {
        "variant_id": 123456789,
        "quantity": 1
      }
    ]
  }
}
View Response
HTTP/1.1 422 Unprocessable Entity
{
  "errors": {
    "line_items": {
      "0": {
        "variant_id": [
          {
            "code": "invalid",
            "message": "is invalid",
            "options": {}
          }
        ]
      }
    }
  }
}

Creating a checkout with line item errors fails and returns the errors mapped by index

POST /admin/checkouts.json
{
  "checkout": {
    "line_items": [
      {
        "variant_id": 447654529,
        "quantity": 1
      },
      {
        "variant_id": 1,
        "quantity": 1
      },
      {
        "variant_id": 1,
        "quantity": 1
      },
      {
        "variant_id": 39072856,
        "quantity": 1
      },
      {
        "variant_id": 1,
        "quantity": 1
      }
    ]
  }
}
View Response
HTTP/1.1 422 Unprocessable Entity
{
  "errors": {
    "line_items": {
      "1": {
        "variant_id": [
          {
            "code": "invalid",
            "message": "is invalid",
            "options": {}
          }
        ]
      },
      "2": {
        "variant_id": [
          {
            "code": "invalid",
            "message": "is invalid",
            "options": {}
          }
        ]
      },
      "4": {
        "variant_id": [
          {
            "code": "invalid",
            "message": "is invalid",
            "options": {}
          }
        ]
      }
    }
  }
}

Create a checkout without any line items

POST /admin/checkouts.json
{
  "checkout": {
    "email": "me@example.com"
  }
}
View Response
HTTP/1.1 201 Created
Location: https://apple.myshopify.com/admin/checkouts/481e7acc12d717966d466ad4ce020354.json
{
  "checkout": {
    "clone_url": "https://apple.myshopify.com/690933842/checkouts/481e7acc12d717966d466ad4ce020354/clone",
    "completed_at": null,
    "created_at": "2018-11-06T16:56:01-05:00",
    "currency": "USD",
    "presentment_currency": "USD",
    "customer_id": 1073339456,
    "customer_locale": "en",
    "device_id": null,
    "discount_code": null,
    "email": "me@example.com",
    "legal_notice_url": null,
    "location_id": null,
    "name": "#1066348318",
    "note": "",
    "note_attributes": {},
    "order_id": null,
    "order_status_url": null,
    "order": null,
    "payment_due": "0.00",
    "payment_url": "https://app.local/cardserver/sessions",
    "payments": [],
    "phone": null,
    "shopify_payments_account_id": null,
    "privacy_policy_url": null,
    "refund_policy_url": null,
    "requires_shipping": false,
    "reservation_time_left": 0,
    "reservation_time": null,
    "source_identifier": null,
    "source_name": "755357713",
    "source_url": null,
    "subtotal_price": "0.00",
    "shipping_policy_url": null,
    "tax_exempt": false,
    "taxes_included": false,
    "terms_of_sale_url": null,
    "terms_of_service_url": null,
    "token": "481e7acc12d717966d466ad4ce020354",
    "total_price": "0.00",
    "total_tax": "0.00",
    "total_line_items_price": "0.00",
    "updated_at": "2018-11-06T16:56:01-05:00",
    "user_id": null,
    "web_url": "https://apple.myshopify.com/690933842/checkouts/481e7acc12d717966d466ad4ce020354",
    "line_items": [],
    "gift_cards": [],
    "tax_lines": [],
    "tax_manipulations": [],
    "shipping_line": null,
    "shipping_rate": null,
    "shipping_address": null,
    "credit_card": null,
    "billing_address": null,
    "applied_discount": null
  }
}
POST /admin/checkouts/b490a9220cd14d7344024f4874f640a6/complete.json
Completes a checkout

Complete a checkout without requiring payment

POST /admin/checkouts/#{token}/complete.json
{
}
View Response
HTTP/1.1 202 Accepted
Location: https://apple.myshopify.com/admin/checkouts/b490a9220cd14d7344024f4874f640a6.json
Retry-After: 1
{
  "checkout": {
    "clone_url": "https://checkout.local/690933842/checkouts/b490a9220cd14d7344024f4874f640a6/clone",
    "completed_at": null,
    "created_at": "2012-10-12T07:05:27-04:00",
    "currency": "USD",
    "presentment_currency": "USD",
    "customer_id": 207119551,
    "customer_locale": null,
    "device_id": null,
    "discount_code": null,
    "email": "bob.norman@hostmail.com",
    "legal_notice_url": null,
    "location_id": null,
    "name": "#86568385",
    "note": "",
    "note_attributes": {
      "custom engraving": "Happy Birthday",
      "colour": "green"
    },
    "order_id": null,
    "order_status_url": null,
    "order": null,
    "payment_due": "0.00",
    "payment_url": "https://app.local/cardserver/sessions",
    "payments": [],
    "phone": null,
    "shopify_payments_account_id": null,
    "privacy_policy_url": null,
    "refund_policy_url": null,
    "requires_shipping": false,
    "reservation_time_left": 0,
    "reservation_time": null,
    "source_identifier": null,
    "source_name": "web",
    "source_url": null,
    "subtotal_price": "0.00",
    "shipping_policy_url": null,
    "tax_exempt": false,
    "taxes_included": false,
    "terms_of_sale_url": null,
    "terms_of_service_url": null,
    "token": "b490a9220cd14d7344024f4874f640a6",
    "total_price": "0.00",
    "total_tax": "0.00",
    "total_line_items_price": "0.00",
    "updated_at": "2018-11-06T16:56:02-05:00",
    "user_id": null,
    "web_url": "https://checkout.local/690933842/checkouts/b490a9220cd14d7344024f4874f640a6",
    "line_items": [
      {
        "id": 49148385,
        "key": 49148385,
        "product_id": 632910392,
        "variant_id": 49148385,
        "sku": "IPOD2008RED",
        "vendor": "Apple",
        "title": "IPod Nano - 8GB",
        "variant_title": "Red",
        "image_url": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1541541311",
        "taxable": true,
        "requires_shipping": false,
        "gift_card": false,
        "price": "0.00",
        "compare_at_price": null,
        "line_price": "0.00",
        "properties": {},
        "quantity": 1,
        "grams": 200,
        "fulfillment_service": "manual",
        "applied_discounts": []
      }
    ],
    "gift_cards": [],
    "tax_lines": [],
    "tax_manipulations": [],
    "shipping_line": null,
    "shipping_rate": null,
    "shipping_address": {
      "id": 550558813,
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "company": null,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "province": "Kentucky",
      "province_code": "KY",
      "country": "United States",
      "country_code": "US",
      "zip": "40202"
    },
    "credit_card": null,
    "billing_address": {
      "id": 550558813,
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "company": null,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "province": "Kentucky",
      "province_code": "KY",
      "country": "United States",
      "country_code": "US",
      "zip": "40202"
    },
    "applied_discount": null
  }
}
GET /admin/checkouts/exuw7apwoycchjuwtiqg8nytfhphr62a.json
Retrieves a checkout

Retrieve an existing checkout

GET /admin/checkouts/#{token}.json
View Response
HTTP/1.1 202 Accepted
Location: https://apple.myshopify.com/admin/checkouts/exuw7apwoycchjuwtiqg8nytfhphr62a.json
Retry-After: 1
{
  "checkout": {
    "clone_url": "https://checkout.local/690933842/checkouts/exuw7apwoycchjuwtiqg8nytfhphr62a/clone",
    "completed_at": null,
    "created_at": "2012-10-12T07:05:27-04:00",
    "currency": "USD",
    "presentment_currency": "USD",
    "customer_id": 207119551,
    "customer_locale": null,
    "device_id": null,
    "discount_code": null,
    "email": "bob.norman@hostmail.com",
    "legal_notice_url": null,
    "location_id": null,
    "name": "#862052962",
    "note": "",
    "note_attributes": {
      "custom engraving": "Happy Birthday",
      "colour": "green"
    },
    "order_id": null,
    "order_status_url": null,
    "order": null,
    "payment_due": "419.49",
    "payment_url": "https://app.local/cardserver/sessions",
    "payments": [],
    "phone": null,
    "shopify_payments_account_id": null,
    "privacy_policy_url": null,
    "refund_policy_url": null,
    "requires_shipping": true,
    "reservation_time_left": 0,
    "reservation_time": null,
    "source_identifier": null,
    "source_name": "web",
    "source_url": null,
    "subtotal_price": "398.00",
    "shipping_policy_url": null,
    "tax_exempt": false,
    "taxes_included": false,
    "terms_of_sale_url": null,
    "terms_of_service_url": null,
    "token": "exuw7apwoycchjuwtiqg8nytfhphr62a",
    "total_price": "419.49",
    "total_tax": "21.49",
    "total_line_items_price": "398.00",
    "updated_at": "2012-10-12T07:05:27-04:00",
    "user_id": null,
    "web_url": "https://checkout.local/690933842/checkouts/exuw7apwoycchjuwtiqg8nytfhphr62a",
    "line_items": [
      {
        "id": "44343cf45b8639e3",
        "key": "44343cf45b8639e3",
        "product_id": 632910392,
        "variant_id": 49148385,
        "sku": "IPOD2008RED",
        "vendor": "Apple",
        "title": "IPod Nano - 8GB",
        "variant_title": "Red",
        "image_url": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1541541311",
        "taxable": true,
        "requires_shipping": true,
        "gift_card": false,
        "price": "199.00",
        "compare_at_price": null,
        "line_price": "199.00",
        "properties": {},
        "quantity": 1,
        "grams": 200,
        "fulfillment_service": "manual",
        "applied_discounts": []
      },
      {
        "id": "15629eaf97dda251",
        "key": "15629eaf97dda251",
        "product_id": 632910392,
        "variant_id": 808950810,
        "sku": "IPOD2008PINK",
        "vendor": "Apple",
        "title": "IPod Nano - 8GB",
        "variant_title": "Pink",
        "image_url": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1541541311",
        "taxable": true,
        "requires_shipping": true,
        "gift_card": false,
        "price": "199.00",
        "compare_at_price": null,
        "line_price": "199.00",
        "properties": {},
        "quantity": 1,
        "grams": 200,
        "fulfillment_service": "manual",
        "applied_discounts": []
      }
    ],
    "gift_cards": [],
    "tax_lines": [
      {
        "price": "21.49",
        "rate": 0.06,
        "title": "State Tax",
        "compare_at": 0.06
      }
    ],
    "tax_manipulations": [],
    "shipping_line": {
      "handle": "shopify-Free%20Shipping-0.00",
      "price": "0.00",
      "title": "Free Shipping"
    },
    "shipping_rate": {
      "id": "shopify-Free%20Shipping-0.00",
      "price": "0.00",
      "title": "Free Shipping"
    },
    "shipping_address": {
      "id": 550558813,
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "company": null,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "province": "Kentucky",
      "province_code": "KY",
      "country": "United States",
      "country_code": "US",
      "zip": "40202"
    },
    "credit_card": null,
    "billing_address": {
      "id": 550558813,
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "company": null,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "province": "Kentucky",
      "province_code": "KY",
      "country": "United States",
      "country_code": "US",
      "zip": "40202"
    },
    "applied_discount": null
  }
}

Retrieve a completed checkout

GET /admin/checkouts/#{token}.json
View Response
HTTP/1.1 200 OK
Location: https://apple.myshopify.com/admin/checkouts/bd5a8aa1ecd019dd3520ff791ee3a24c.json
{
  "checkout": {
    "clone_url": "https://checkout.local/690933842/checkouts/bd5a8aa1ecd019dd3520ff791ee3a24c/clone",
    "completed_at": "2005-07-31T11:57:11-04:00",
    "created_at": "2012-10-12T07:05:27-04:00",
    "currency": "USD",
    "presentment_currency": "USD",
    "customer_id": 207119551,
    "customer_locale": null,
    "device_id": null,
    "discount_code": null,
    "email": "bob.norman@hostmail.com",
    "legal_notice_url": null,
    "location_id": null,
    "name": "#901414060",
    "note": "",
    "note_attributes": {
      "custom engraving": "Happy Birthday",
      "colour": "green"
    },
    "order_id": 450789469,
    "order_status_url": "https://checkout.local/690933842/checkouts/bd5a8aa1ecd019dd3520ff791ee3a24c/thank_you",
    "order": {
      "id": 450789469,
      "name": "#1001",
      "status_url": "https://checkout.local/690933842/checkouts/bd5a8aa1ecd019dd3520ff791ee3a24c/thank_you"
    },
    "payment_due": "408.99",
    "payment_url": "https://app.local/cardserver/sessions",
    "payments": [],
    "phone": null,
    "shopify_payments_account_id": null,
    "privacy_policy_url": null,
    "refund_policy_url": null,
    "requires_shipping": true,
    "reservation_time_left": 0,
    "reservation_time": null,
    "source_identifier": null,
    "source_name": "web",
    "source_url": null,
    "subtotal_price": "398.00",
    "shipping_policy_url": null,
    "tax_exempt": false,
    "taxes_included": false,
    "terms_of_sale_url": null,
    "terms_of_service_url": null,
    "token": "bd5a8aa1ecd019dd3520ff791ee3a24c",
    "total_price": "408.99",
    "total_tax": "0.00",
    "total_line_items_price": "398.00",
    "updated_at": "2012-10-12T07:05:27-04:00",
    "user_id": null,
    "web_url": "https://checkout.local/690933842/checkouts/bd5a8aa1ecd019dd3520ff791ee3a24c",
    "line_items": [
      {
        "id": "44343cf45b8639e3",
        "key": "44343cf45b8639e3",
        "product_id": 632910392,
        "variant_id": 49148385,
        "sku": "IPOD2008RED",
        "vendor": "Apple",
        "title": "IPod Nano - 8GB",
        "variant_title": "Red",
        "image_url": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1541541311",
        "taxable": true,
        "requires_shipping": true,
        "gift_card": false,
        "price": "199.00",
        "compare_at_price": null,
        "line_price": "199.00",
        "properties": {},
        "quantity": 1,
        "grams": 200,
        "fulfillment_service": "manual",
        "applied_discounts": []
      },
      {
        "id": "15629eaf97dda251",
        "key": "15629eaf97dda251",
        "product_id": 632910392,
        "variant_id": 808950810,
        "sku": "IPOD2008PINK",
        "vendor": "Apple",
        "title": "IPod Nano - 8GB",
        "variant_title": "Pink",
        "image_url": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1541541311",
        "taxable": true,
        "requires_shipping": true,
        "gift_card": false,
        "price": "199.00",
        "compare_at_price": null,
        "line_price": "199.00",
        "properties": {},
        "quantity": 1,
        "grams": 200,
        "fulfillment_service": "manual",
        "applied_discounts": []
      }
    ],
    "gift_cards": [],
    "tax_lines": [],
    "tax_manipulations": [],
    "shipping_line": {
      "handle": "shopify-Standard%20Shipping-10.99",
      "price": "10.99",
      "title": "Standard Shipping"
    },
    "shipping_rate": {
      "id": "shopify-Standard%20Shipping-10.99",
      "price": "10.99",
      "title": "Standard Shipping"
    },
    "shipping_address": {
      "id": 550558813,
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "company": null,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "province": "Kentucky",
      "province_code": "KY",
      "country": "United States",
      "country_code": "US",
      "zip": "40202"
    },
    "credit_card": null,
    "billing_address": {
      "id": 550558813,
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "company": null,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "province": "Kentucky",
      "province_code": "KY",
      "country": "United States",
      "country_code": "US",
      "zip": "40202"
    },
    "applied_discount": null
  }
}

Retrieve a processing checkout

GET /admin/checkouts/#{token}.json
View Response
HTTP/1.1 202 Accepted
Location: https://apple.myshopify.com/admin/checkouts/7yjf4v2we7gamku6a6h7tvm8h3mmvs4x.json
Retry-After: 1
{
  "checkout": {
    "clone_url": "https://checkout.local/690933842/checkouts/7yjf4v2we7gamku6a6h7tvm8h3mmvs4x/clone",
    "completed_at": null,
    "created_at": "2012-10-12T07:05:27-04:00",
    "currency": "USD",
    "presentment_currency": "USD",
    "customer_id": 207119551,
    "customer_locale": null,
    "device_id": null,
    "discount_code": null,
    "email": "bob.norman@hostmail.com",
    "legal_notice_url": null,
    "location_id": null,
    "name": "#446514532",
    "note": "",
    "note_attributes": {
      "custom engraving": "Happy Birthday",
      "colour": "green"
    },
    "order_id": null,
    "order_status_url": null,
    "order": null,
    "payment_due": "430.48",
    "payment_url": "https://app.local/cardserver/sessions",
    "payments": [
      {
        "id": 25428999,
        "unique_token": "e01e661f4a99acd9dcdg6f1422d0d6f7",
        "payment_processing_error_message": null,
        "fraudulent": false,
        "transaction": {
          "amount": "409.94",
          "amount_in": null,
          "amount_out": null,
          "amount_rounding": null,
          "authorization": "authorization-key",
          "created_at": "2005-08-01T11:57:11-04:00",
          "currency": "USD",
          "error_code": null,
          "parent_id": null,
          "gateway": "bogus",
          "id": 389404469,
          "kind": "authorization",
          "message": null,
          "status": "success",
          "test": false,
          "receipt": {
            "testcase": true,
            "authorization": "123456"
          }
        },
        "credit_card": null
      }
    ],
    "phone": null,
    "shopify_payments_account_id": null,
    "privacy_policy_url": null,
    "refund_policy_url": null,
    "requires_shipping": true,
    "reservation_time_left": 0,
    "reservation_time": null,
    "source_identifier": null,
    "source_name": "web",
    "source_url": null,
    "subtotal_price": "398.00",
    "shipping_policy_url": null,
    "tax_exempt": false,
    "taxes_included": false,
    "terms_of_sale_url": null,
    "terms_of_service_url": null,
    "token": "7yjf4v2we7gamku6a6h7tvm8h3mmvs4x",
    "total_price": "430.48",
    "total_tax": "21.49",
    "total_line_items_price": "398.00",
    "updated_at": "2012-10-12T07:05:27-04:00",
    "user_id": null,
    "web_url": "https://checkout.local/690933842/checkouts/7yjf4v2we7gamku6a6h7tvm8h3mmvs4x",
    "line_items": [
      {
        "id": "44343cf45b8639e3",
        "key": "44343cf45b8639e3",
        "product_id": 632910392,
        "variant_id": 49148385,
        "sku": "IPOD2008RED",
        "vendor": "Apple",
        "title": "IPod Nano - 8GB",
        "variant_title": "Red",
        "image_url": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1541541311",
        "taxable": true,
        "requires_shipping": true,
        "gift_card": false,
        "price": "199.00",
        "compare_at_price": null,
        "line_price": "199.00",
        "properties": {},
        "quantity": 1,
        "grams": 200,
        "fulfillment_service": "manual",
        "applied_discounts": []
      },
      {
        "id": "15629eaf97dda251",
        "key": "15629eaf97dda251",
        "product_id": 632910392,
        "variant_id": 808950810,
        "sku": "IPOD2008PINK",
        "vendor": "Apple",
        "title": "IPod Nano - 8GB",
        "variant_title": "Pink",
        "image_url": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1541541311",
        "taxable": true,
        "requires_shipping": true,
        "gift_card": false,
        "price": "199.00",
        "compare_at_price": null,
        "line_price": "199.00",
        "properties": {},
        "quantity": 1,
        "grams": 200,
        "fulfillment_service": "manual",
        "applied_discounts": []
      }
    ],
    "gift_cards": [],
    "tax_lines": [
      {
        "price": "21.49",
        "rate": 0.06,
        "title": "State Tax",
        "compare_at": 0.06
      }
    ],
    "tax_manipulations": [],
    "shipping_line": {
      "handle": "shopify-Standard%20Shipping-10.99",
      "price": "10.99",
      "title": "Standard Shipping"
    },
    "shipping_rate": {
      "id": "shopify-Standard%20Shipping-10.99",
      "price": "10.99",
      "title": "Standard Shipping"
    },
    "shipping_address": {
      "id": 550558813,
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "company": null,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "province": "Kentucky",
      "province_code": "KY",
      "country": "United States",
      "country_code": "US",
      "zip": "40202"
    },
    "credit_card": {
      "first_name": "Bob",
      "last_name": "Norman",
      "first_digits": "1",
      "last_digits": "1",
      "brand": "bogus",
      "expiry_month": 8,
      "expiry_year": 2042
    },
    "billing_address": {
      "id": 550558813,
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "company": null,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "province": "Kentucky",
      "province_code": "KY",
      "country": "United States",
      "country_code": "US",
      "zip": "40202"
    },
    "applied_discount": null
  }
}
PUT /admin/checkouts/exuw7apwoycchjuwtiqg8nytfhphr62a.json
Modifies an existing checkout

Update the shipping address and email of a checkout

PUT /admin/checkouts/#{token}.json
{
  "checkout": {
    "token": "exuw7apwoycchjuwtiqg8nytfhphr62a",
    "email": "john.smith@example.com",
    "shipping_address": {
      "first_name": "John",
      "last_name": "Smith",
      "address1": "126 York St.",
      "city": "Los Angeles",
      "province_code": "CA",
      "country_code": "US",
      "phone": "(123)456-7890",
      "zip": "90002"
    }
  }
}
View Response
HTTP/1.1 202 Accepted
Location: https://apple.myshopify.com/admin/checkouts/exuw7apwoycchjuwtiqg8nytfhphr62a.json
Retry-After: 1
{
  "checkout": {
    "clone_url": "https://checkout.local/690933842/checkouts/exuw7apwoycchjuwtiqg8nytfhphr62a/clone",
    "completed_at": null,
    "created_at": "2012-10-12T07:05:27-04:00",
    "currency": "USD",
    "presentment_currency": "USD",
    "customer_id": 1073339457,
    "customer_locale": null,
    "device_id": null,
    "discount_code": null,
    "email": "john.smith@example.com",
    "legal_notice_url": null,
    "location_id": null,
    "name": "#862052962",
    "note": "",
    "note_attributes": {
      "custom engraving": "Happy Birthday",
      "colour": "green"
    },
    "order_id": null,
    "order_status_url": null,
    "order": null,
    "payment_due": "398.00",
    "payment_url": "https://app.local/cardserver/sessions",
    "payments": [],
    "phone": null,
    "shopify_payments_account_id": null,
    "privacy_policy_url": null,
    "refund_policy_url": null,
    "requires_shipping": true,
    "reservation_time_left": 0,
    "reservation_time": null,
    "source_identifier": null,
    "source_name": "web",
    "source_url": null,
    "subtotal_price": "398.00",
    "shipping_policy_url": null,
    "tax_exempt": false,
    "taxes_included": false,
    "terms_of_sale_url": null,
    "terms_of_service_url": null,
    "token": "exuw7apwoycchjuwtiqg8nytfhphr62a",
    "total_price": "398.00",
    "total_tax": "0.00",
    "total_line_items_price": "398.00",
    "updated_at": "2018-11-06T16:56:07-05:00",
    "user_id": null,
    "web_url": "https://checkout.local/690933842/checkouts/exuw7apwoycchjuwtiqg8nytfhphr62a",
    "line_items": [
      {
        "id": "44343cf45b8639e3",
        "key": "44343cf45b8639e3",
        "product_id": 632910392,
        "variant_id": 49148385,
        "sku": "IPOD2008RED",
        "vendor": "Apple",
        "title": "IPod Nano - 8GB",
        "variant_title": "Red",
        "image_url": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1541541311",
        "taxable": true,
        "requires_shipping": true,
        "gift_card": false,
        "price": "199.00",
        "compare_at_price": null,
        "line_price": "199.00",
        "properties": {},
        "quantity": 1,
        "grams": 200,
        "fulfillment_service": "manual",
        "applied_discounts": []
      },
      {
        "id": "15629eaf97dda251",
        "key": "15629eaf97dda251",
        "product_id": 632910392,
        "variant_id": 808950810,
        "sku": "IPOD2008PINK",
        "vendor": "Apple",
        "title": "IPod Nano - 8GB",
        "variant_title": "Pink",
        "image_url": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1541541311",
        "taxable": true,
        "requires_shipping": true,
        "gift_card": false,
        "price": "199.00",
        "compare_at_price": null,
        "line_price": "199.00",
        "properties": {},
        "quantity": 1,
        "grams": 200,
        "fulfillment_service": "manual",
        "applied_discounts": []
      }
    ],
    "gift_cards": [],
    "tax_lines": [],
    "tax_manipulations": [],
    "shipping_line": null,
    "shipping_rate": null,
    "shipping_address": {
      "id": 550558813,
      "first_name": "John",
      "last_name": "Smith",
      "phone": "(123)456-7890",
      "company": null,
      "address1": "126 York St.",
      "address2": "",
      "city": "Los Angeles",
      "province": "California",
      "province_code": "CA",
      "country": "United States",
      "country_code": "US",
      "zip": "90002"
    },
    "credit_card": null,
    "billing_address": {
      "id": 550558813,
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "company": null,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "province": "Kentucky",
      "province_code": "KY",
      "country": "United States",
      "country_code": "US",
      "zip": "40202"
    },
    "applied_discount": null
  }
}

Select a shipping rate

PUT /admin/checkouts/#{token}.json
{
  "checkout": {
    "token": "exuw7apwoycchjuwtiqg8nytfhphr62a",
    "shipping_line": {
      "handle": "shopify-Standard%20Shipping-10.99"
    }
  }
}
View Response
HTTP/1.1 200 OK
Location: https://apple.myshopify.com/admin/checkouts/exuw7apwoycchjuwtiqg8nytfhphr62a.json
{
  "checkout": {
    "clone_url": "https://checkout.local/690933842/checkouts/exuw7apwoycchjuwtiqg8nytfhphr62a/clone",
    "completed_at": null,
    "created_at": "2012-10-12T07:05:27-04:00",
    "currency": "USD",
    "presentment_currency": "USD",
    "customer_id": 207119551,
    "customer_locale": null,
    "device_id": null,
    "discount_code": null,
    "email": "bob.norman@hostmail.com",
    "legal_notice_url": null,
    "location_id": null,
    "name": "#862052962",
    "note": "",
    "note_attributes": {
      "custom engraving": "Happy Birthday",
      "colour": "green"
    },
    "order_id": null,
    "order_status_url": null,
    "order": null,
    "payment_due": "408.99",
    "payment_url": "https://app.local/cardserver/sessions",
    "payments": [],
    "phone": null,
    "shopify_payments_account_id": null,
    "privacy_policy_url": null,
    "refund_policy_url": null,
    "requires_shipping": true,
    "reservation_time_left": 0,
    "reservation_time": null,
    "source_identifier": null,
    "source_name": "web",
    "source_url": null,
    "subtotal_price": "398.00",
    "shipping_policy_url": null,
    "tax_exempt": false,
    "taxes_included": false,
    "terms_of_sale_url": null,
    "terms_of_service_url": null,
    "token": "exuw7apwoycchjuwtiqg8nytfhphr62a",
    "total_price": "408.99",
    "total_tax": "0.00",
    "total_line_items_price": "398.00",
    "updated_at": "2018-11-06T16:56:09-05:00",
    "user_id": null,
    "web_url": "https://checkout.local/690933842/checkouts/exuw7apwoycchjuwtiqg8nytfhphr62a",
    "line_items": [
      {
        "id": "44343cf45b8639e3",
        "key": "44343cf45b8639e3",
        "product_id": 632910392,
        "variant_id": 49148385,
        "sku": "IPOD2008RED",
        "vendor": "Apple",
        "title": "IPod Nano - 8GB",
        "variant_title": "Red",
        "image_url": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano.png?v=1541541311",
        "taxable": true,
        "requires_shipping": true,
        "gift_card": false,
        "price": "199.00",
        "compare_at_price": null,
        "line_price": "199.00",
        "properties": {},
        "quantity": 1,
        "grams": 200,
        "fulfillment_service": "manual",
        "applied_discounts": []
      },
      {
        "id": "15629eaf97dda251",
        "key": "15629eaf97dda251",
        "product_id": 632910392,
        "variant_id": 808950810,
        "sku": "IPOD2008PINK",
        "vendor": "Apple",
        "title": "IPod Nano - 8GB",
        "variant_title": "Pink",
        "image_url": "https://cdn.shopify.com/s/files/1/0006/9093/3842/products/ipod-nano-2.png?v=1541541311",
        "taxable": true,
        "requires_shipping": true,
        "gift_card": false,
        "price": "199.00",
        "compare_at_price": null,
        "line_price": "199.00",
        "properties": {},
        "quantity": 1,
        "grams": 200,
        "fulfillment_service": "manual",
        "applied_discounts": []
      }
    ],
    "gift_cards": [],
    "tax_lines": [],
    "tax_manipulations": [],
    "shipping_line": {
      "handle": "shopify-Standard%20Shipping-10.99",
      "price": "10.99",
      "title": "Standard Shipping"
    },
    "shipping_rate": {
      "id": "shopify-Standard%20Shipping-10.99",
      "price": "10.99",
      "title": "Standard Shipping"
    },
    "shipping_address": {
      "id": 550558813,
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "company": null,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "province": "Kentucky",
      "province_code": "KY",
      "country": "United States",
      "country_code": "US",
      "zip": "40202"
    },
    "credit_card": null,
    "billing_address": {
      "id": 550558813,
      "first_name": "Bob",
      "last_name": "Norman",
      "phone": "555-625-1199",
      "company": null,
      "address1": "Chestnut Street 92",
      "address2": "",
      "city": "Louisville",
      "province": "Kentucky",
      "province_code": "KY",
      "country": "United States",
      "country_code": "US",
      "zip": "40202"
    },
    "applied_discount": null
  }
}

Updating a shipping address with an invalid zip code fails and returns errors

PUT /admin/checkouts/#{token}.json
{
  "checkout": {
    "token": "exuw7apwoycchjuwtiqg8nytfhphr62a",
    "shipping_address": {
      "first_name": "John",
      "last_name": "Smith",
      "address1": "126 York St.",
      "city": "Beverly Hills",
      "province_code": "CA",
      "country_code": "US",
      "phone": "(123)456-7890",
      "zip": "1234"
    }
  }
}
View Response
HTTP/1.1 422 Unprocessable Entity
{
  "errors": {
    "shipping_address": {
      "zip": [
        {
          "code": "invalid_for_country",
          "message": "is not valid for United States",
          "options": {
            "country": "United States"
          }
        }
      ]
    }
  }
}
GET /admin/checkouts/exuw7apwoycchjuwtiqg8nytfhphr62a/shipping_rates.json
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.

Retrieving shipping rates before they're available returns an empty array

GET /admin/checkouts/#{token}/shipping_rates.json
View Response
HTTP/1.1 202 Accepted
Location: https://apple.myshopify.com/admin/checkouts/exuw7apwoycchjuwtiqg8nytfhphr62a/shipping_rates.json
Retry-After: 1
{
  "shipping_rates": []
}

Retrieve available shipping rates

GET /admin/checkouts/#{token}/shipping_rates.json
View Response
HTTP/1.1 200 OK
Location: https://apple.myshopify.com/admin/checkouts/exuw7apwoycchjuwtiqg8nytfhphr62a/shipping_rates.json
{
  "shipping_rates": [
    {
      "id": "shopify-Standard%20Shipping-10.99",
      "price": "10.99",
      "title": "Standard Shipping",
      "checkout": {
        "total_tax": "0.00",
        "total_price": "408.99",
        "subtotal_price": "398.00"
      },
      "phone_required": false,
      "delivery_range": null,
      "handle": "shopify-Standard%20Shipping-10.99"
    },
    {
      "id": "shopify-Expensive%20Shipping-99.99",
      "price": "99.99",
      "title": "Expensive Shipping",
      "checkout": {
        "total_tax": "0.00",
        "total_price": "497.99",
        "subtotal_price": "398.00"
      },
      "phone_required": false,
      "delivery_range": null,
      "handle": "shopify-Expensive%20Shipping-99.99"
    }
  ]
}

Retrieving shipping rates when none are available for the current shipping address or cart returns an empty array

GET /admin/checkouts/#{token}/shipping_rates.json
View Response
HTTP/1.1 200 OK
Location: https://apple.myshopify.com/admin/checkouts/zs9ru89kuqcdagk8bz4r9hnxt22wwd42/shipping_rates.json
{
  "shipping_rates": []
}

Sign up for a Partner account to get started.

Sign up