Skip to main content

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.

Abandoned checkouts

Requires orders access scope.
Requires access to protected customer data.

You can use the Abandoned checkouts resource to retrieve a list and a count of abandoned checkouts. A checkout is considered abandoned after the customer has added contact information, but before the customer has completed their purchase.

This resource may be helpful to complete the following actions:

  • Gather marketing information on customers who have abandoned their cart.
  • Use information to remarket to abandoned checkout customers.
  • Understand customers’ behavior.
  • Track abandoned checkouts over time.
  • View abandoned checkout items.
Was this section helpful?

Anchor to

The Abandoned checkouts resource

Anchor to

Properties


abandoned_checkout_url

The recovery URL that's sent to a customer so they can recover their checkout.


billing_address

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 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.
  • default: Whether this is the default address for the customer.
  • 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.
  • latitude: The latitude of the billing address.
  • longitude: The longitude of the billing address.
  • name: The full name of the person associated with the payment method.
  • phone: The phone number at the billing address.
  • province: The name of the state or province of the billing address.
  • province_code: The alphanumeric abbreviation of the state or province of the billing address.
  • zip: The zip or postal code of the billing address.

buyer_accepts_marketing

Whether the customer would like to receive email updates from the shop. This is set by the I want to receive occasional emails about new products, promotions and other news checkbox during checkout.


buyer_accepts_sms_marketing

Whether the customer would like to receive SMS updates from the shop. This is set by the Text me with news and offers checkbox during checkout.


cart_token
deprecated

The ID for the cart that's attached to the checkout.


closed_at
deprecated

The date and time (ISO 8601 format) when the checkout was closed. If the checkout was not closed, then this value is null.


completed_at

The date and time (ISO 8601 format) when the checkout was completed. For abandoned checkouts, this value is null until a customer completes the checkout using the recovery URL.


created_at

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


currency
deprecated

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

The customer details associated with the abandoned checkout. For more information, refer to the Customer resource.


customer_locale

The two or three-letter language code, optionally followed by a region modifier. Example values: en, en-CA.


device_id
deprecated

The ID of the Shopify POS device that created the checkout. This field is deprecated.


Was this section helpful?
{}

The Abandoned checkouts resource

{
"abandoned_checkout_url": "https://www.snowdevil.ca/14168/checkouts/0123456789abcdef0456456789abcdef/recover?key=6dacd6065bb80268bda857ee",
"billing_address": {
"address1": "Chestnut Street 92",
"address2": "",
"city": "Louisville",
"company": null,
"country": "United States",
"country_code": "US",
"default": true,
"first_name": "Greg",
"id": 207119551,
"last_name": "Piotrowski",
"name": "Greg Piotrowski",
"phone": "555-625-1199",
"province": "Kentucky",
"province_code": "KY",
"zip": "40202"
},
"buyer_accepts_marketing": false,
"buyer_accepts_sms_marketing": false,
"cart_token": "0123456789abcdef0456456789abcdef",
"closed_at": null,
"completed_at": null,
"created_at": "2008-01-10T11:00:00-05:00",
"currency": {
"currency": "USD"
},
"customer": {
"accepts_marketing": false,
"created_at": "2012-03-13T16:09:55-04:00",
"email": "bob.norman@mail.example.com",
"first_name": "Bob",
"id": 207119551,
"last_name": "Norman",
"note": null,
"orders_count": "0",
"state": null,
"total_spent": "0.00",
"updated_at": "2012-03-13T16:09:55-04:00",
"tags": "tagcity"
},
"customer_locale": "fr",
"device_id": 1,
"discount_codes": [
{
"discount_code": {
"id": 507328175,
"code": "WINTERSALE20OFF",
"usage_count": 0,
"created_at": "2017-09-25T19:32:28-04:00",
"updated_at": "2017-09-25T19:32:28-04:00"
}
}
],
"email": "bob.norman@mail.example.com",
"gateway": "authorize_net",
"id": 450789469,
"landing_site": "http://www.example.com?source=abc",
"line_items": {
"price": 214,
"product_id": 431300801,
"quantity": 4,
"sku": "SKU123",
"title": "Jib",
"variant_id": 233402193,
"variant_title": "Green",
"vendor": "Ottawa Sail Shop"
},
"location_id": 1,
"note": null,
"phone": {
"phone": "+13125551212"
},
"presentment_currency": {
"presentment_currency": "USD"
},
"referring_site": "http://www.anexample.com",
"shipping_address": {
"address1": "Chestnut Street 92",
"address2": "Apt 2",
"city": "Louisville",
"company": null,
"country": "United States",
"first_name": "Bob",
"last_name": "Norman",
"latitude": "45.41634",
"longitude": "-75.6868",
"phone": "555-625-1199",
"province": "Kentucky",
"zip": "40202",
"name": "Bob Norman",
"country_code": "US",
"province_code": "KY"
},
"sms_marketing_phone": "+16135555555",
"shipping_lines": {
"code": "Free Shipping",
"price": "0.00",
"source": "shopify",
"title": "Free Shipping"
},
"source_name": "web",
"subtotal_price": "398.00",
"tax_lines": {
"price": "11.94",
"rate": 0.06,
"title": "State Tax",
"channel_liable": true
},
"taxes_included": false,
"token": "b1946ac92492d2347c6235b4d2611184",
"total_discounts": "0.00",
"total_duties": "105.31",
"total_line_items_price": "398.00",
"total_price": "409.94",
"total_tax": "11.94",
"total_weight": 400,
"updated_at": "2012-08-24T14:02:15-04:00",
"user_id": 1
}

Retrieves a count of checkouts from the past 90 days


api_version
string
required

created_at_max

Count checkouts created before the specified date. (format: 2014-04-25T16:15:47-04:00)


created_at_min

Count checkouts created after the specified date. (format: 2014-04-25T16:15:47-04:00)


since_id

Restrict results to after the specified ID.


status
default open

Count checkouts with a given status.

Show status properties
  • open: Count only open abandoned checkouts.

  • closed: Count only closed abandoned checkouts that have been archived.


updated_at_max

Count checkouts last updated before the specified date. (format: 2014-04-25T16:15:47-04:00)


updated_at_min

Count checkouts last updated after the specified date. (format: 2014-04-25T16:15:47-04:00)


Was this section helpful?

Count abandoned checkouts created before date specified

Query parameters
created_at_max=2013-10-12T07:05:27-02:00

Count checkouts created before the specified date. (format: 2014-04-25T16:15:47-04:00)

Count all abandoned checkouts

Count closed abandoned checkouts

Query parameters
status=closed
default open

Count checkouts with a given status.

Show status properties
  • open: Count only open abandoned checkouts.

  • closed: Count only closed abandoned checkouts that have been archived.

Was this section helpful?
get

/admin/api/unstable/checkouts.json?created_at_max=2013-10-12T07:05:27-02:00

curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/checkouts.json?created_at_max=2013-10-12T07%3A05%3A27-02%3A00" \
-H "X-Shopify-Access-Token: {access_token}"

{}

Response

JSON
HTTP/1.1 200 OK
{
"checkouts": [
{
"id": 450789469,
"token": "2a1ace52255252df566af0faaedfbfa7",
"cart_token": "68778783ad298f1c80c3bafcddeea02f",
"email": "bob.norman@mail.example.com",
"gateway": null,
"buyer_accepts_marketing": false,
"created_at": "2012-10-12T07:05:27-04:00",
"updated_at": "2012-10-12T07:05:27-04:00",
"landing_site": null,
"note": null,
"note_attributes": [
{
"name": "custom engraving",
"value": "Happy Birthday"
},
{
"name": "colour",
"value": "green"
}
],
"referring_site": null,
"shipping_lines": [
{
"code": "Free Shipping",
"price": "0.00",
"original_shop_price": null,
"original_rate_price": null,
"original_shop_markup": null,
"source": "shopify",
"title": "Free Shipping",
"presentment_title": null,
"phone": null,

Anchor to GET request, Retrieves a list of abandoned checkouts
get
Retrieves a list of abandoned checkouts

Retrieves a list of abandoned checkouts.


api_version
string
required

created_at_max

Show checkouts created before the specified date. (format: 2014-04-25T16:15:47-04:00)


created_at_min

Show checkouts created after the specified date. (format: 2014-04-25T16:15:47-04:00)


limit
≤ 250
default 50

The maximum number of results to show.


since_id

Restrict results to after the specified ID.


status
default open

Show only checkouts with a given status.

Show status properties
  • open: Show only open abandoned checkouts.

  • closed: Count only closed abandoned checkouts that have been archived.


updated_at_max

Show checkouts last updated before the specified date. (format: 2014-04-25T16:15:47-04:00)


updated_at_min

Show checkouts last updated after the specified date. (format: 2014-04-25T16:15:47-04:00)


Was this section helpful?

Retrieve a limited number of abandoned checkouts

Query parameters
limit=1
≤ 250
default 50

The maximum number of results to show.

Retrieve all abandoned checkouts

Retrieve checkouts created before date specified

Query parameters
created_at_max=2013-10-12T07:05:27-02:00

Show checkouts created before the specified date. (format: 2014-04-25T16:15:47-04:00)

Retrieve closed abandoned checkouts

Query parameters
status=closed
default open

Show only checkouts with a given status.

Show status properties
  • open: Show only open abandoned checkouts.

  • closed: Count only closed abandoned checkouts that have been archived.

Was this section helpful?
get

/admin/api/unstable/checkouts.json?limit=1

curl -X GET "https://your-development-store.myshopify.com/admin/api/unstable/checkouts.json?limit=1" \
-H "X-Shopify-Access-Token: {access_token}"

{}

Response

JSON
HTTP/1.1 200 OK
{
"checkouts": [
{
"id": 450789469,
"token": "2a1ace52255252df566af0faaedfbfa7",
"cart_token": "68778783ad298f1c80c3bafcddeea02f",
"email": "bob.norman@mail.example.com",
"gateway": null,
"buyer_accepts_marketing": false,
"created_at": "2012-10-12T07:05:27-04:00",
"updated_at": "2012-10-12T07:05:27-04:00",
"landing_site": null,
"note": null,
"note_attributes": [
{
"name": "custom engraving",
"value": "Happy Birthday"
},
{
"name": "colour",
"value": "green"
}
],
"referring_site": null,
"shipping_lines": [
{
"code": "Free Shipping",
"price": "0.00",
"original_shop_price": null,
"original_rate_price": null,
"original_shop_markup": null,
"source": "shopify",
"title": "Free Shipping",
"presentment_title": null,
"phone": null,