--- title: abandonedCheckouts - GraphQL Admin description: |- Returns a list of abandoned checkouts. A checkout is considered abandoned when a customer adds contact information but doesn't complete their purchase. Includes both abandoned and recovered checkouts. Each checkout provides [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) details, [`AbandonedCheckoutLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AbandonedCheckoutLineItem) objects, pricing information, and a recovery URL for re-engaging customers who didn't complete their purchase. api_version: 2026-01 api_name: admin type: query api_type: graphql source_url: html: https://shopify.dev/docs/api/admin-graphql/latest/queries/abandonedcheckouts md: https://shopify.dev/docs/api/admin-graphql/latest/queries/abandonedcheckouts.md --- # abandoned​Checkouts query Returns a list of abandoned checkouts. A checkout is considered abandoned when a customer adds contact information but doesn't complete their purchase. Includes both abandoned and recovered checkouts. Each checkout provides [`Customer`](https://shopify.dev/docs/api/admin-graphql/latest/objects/Customer) details, [`AbandonedCheckoutLineItem`](https://shopify.dev/docs/api/admin-graphql/latest/objects/AbandonedCheckoutLineItem) objects, pricing information, and a recovery URL for re-engaging customers who didn't complete their purchase. ## AbandonedCheckoutConnection arguments [AbandonedCheckoutConnection!](https://shopify.dev/docs/api/admin-graphql/latest/connections/AbandonedCheckoutConnection) * after * before * first * last * query * reverse * savedSearchId * sortKey *** ## Possible returns * edges * nodes * pageInfo *** ## Examples * ### Retrieves a list of abandoned checkouts #### Query ```graphql query AbandonedCheckouts { abandonedCheckouts(first: 1) { nodes { abandonedCheckoutUrl billingAddress { country } completedAt createdAt customer { firstName lastName email } id shippingAddress { country } updatedAt } } } ``` #### cURL ```bash curl -X POST \ https://your-development-store.myshopify.com/admin/api/2026-01/graphql.json \ -H 'Content-Type: application/json' \ -H 'X-Shopify-Access-Token: {access_token}' \ -d '{ "query": "query AbandonedCheckouts { abandonedCheckouts(first: 1) { nodes { abandonedCheckoutUrl billingAddress { country } completedAt createdAt customer { firstName lastName email } id shippingAddress { country } updatedAt } } }" }' ``` #### React Router ```javascript import { authenticate } from "../shopify.server"; export const loader = async ({request}) => { const { admin } = await authenticate.admin(request); const response = await admin.graphql( `#graphql query AbandonedCheckouts { abandonedCheckouts(first: 1) { nodes { abandonedCheckoutUrl billingAddress { country } completedAt createdAt customer { firstName lastName email } id shippingAddress { country } updatedAt } } }`, ); const json = await response.json(); return json.data; } ``` #### Ruby ```ruby session = ShopifyAPI::Auth::Session.new( shop: "your-development-store.myshopify.com", access_token: access_token ) client = ShopifyAPI::Clients::Graphql::Admin.new( session: session ) query = <<~QUERY query AbandonedCheckouts { abandonedCheckouts(first: 1) { nodes { abandonedCheckoutUrl billingAddress { country } completedAt createdAt customer { firstName lastName email } id shippingAddress { country } updatedAt } } } QUERY response = client.query(query: query) ``` #### Node.js ```javascript const client = new shopify.clients.Graphql({session}); const data = await client.query({ data: `query AbandonedCheckouts { abandonedCheckouts(first: 1) { nodes { abandonedCheckoutUrl billingAddress { country } completedAt createdAt customer { firstName lastName email } id shippingAddress { country } updatedAt } } }`, }); ``` #### Response ```json { "abandonedCheckouts": { "nodes": [ { "abandonedCheckoutUrl": "https://www.snowdevil.ca/26371970/checkouts/ac/cart_token_k23sabns3/recover?key=secret_token_i23kd8f88&locale=en", "billingAddress": { "country": "Canada" }, "completedAt": null, "createdAt": "2125-07-31T15:57:11Z", "customer": { "firstName": "Bob", "lastName": "Bobsen", "email": "bob@example.com" }, "id": "gid://shopify/AbandonedCheckout/123", "shippingAddress": { "country": "Canada" }, "updatedAt": "2125-07-31T15:57:11Z" } ] } } ```