Get Checkout Task

Retrieves the full state of an existing checkout task — including its current status, execution history, derived pricing and shipping details, and the original customer and product data. Use this endpoint to track the progress of an asynchronous checkout task created via POST /checkout.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

When to Use This Endpoint

POST /checkout is asynchronous — it returns a taskId immediately but the actual checkout runs in the background. You need a way to know what happened.

The recommended approach is webhooks. CartAI will push status events to your server as each transition occurs. Use this GET endpoint as a complement to webhooks, or as a fallback when webhooks are not available in your environment.

Use caseRecommended approach
Production app, real-time updatesWebhooks (push) — lower latency, no polling overhead
After receiving a webhook eventCall GET /checkout/{taskId} to fetch full derivedDetails
Webhook delivery not possiblePoll GET /checkout/{taskId} every few seconds
Debugging / inspectionCall GET /checkout/{taskId} on demand
Showing order summary to userCall after any status
⚠️

Do not poll at very high frequency. If webhooks are unavailable, a 5–10 second polling interval is appropriate. Polling every second will generate unnecessary load and may trigger rate limits.


Authentication

Every request must include your API key in the request header.

X-Api-Key: YOUR_API_KEY_HERE
  • Use X-Api-Key (capital X and A) — this header name is case-insensitive in HTTP/1.1, but match the casing your client library normalises to.
  • Never embed your API key in client-side code. Always call this endpoint from your backend.

Path Parameters

ParameterTypeRequiredDescription
taskIdstring (UUID)✅ YesThe taskId returned by POST /checkout when the task was created. Example: 019af513-ea98-7d21-8f36-3dbe36dd4e05

Response Schema

A successful 200 response returns a single JSON object. Here is every field explained.

Top-level fields

FieldTypeDescription
tidstring (UUID)The task identifier. Same as the taskId you passed in the path.
executionIdstring (UUID)Unique ID for the current execution attempt. Changes on each retry/re-execution. See Understanding Iterations.
executionNumberintegerWhich execution attempt this is. Starts at 1. Increments if CartAI retries the checkout.
isLatestbooleantrue if this response reflects the most recent execution attempt. Always true when querying the task directly.
statusstringCurrent lifecycle status of the task. See Checkout Task Lifecycle for all possible values.
createdAtstring (datetime)When this execution attempt was created. Format: YYYY-MM-DD HH:MM:SS.ffffff
groupIdstring (UUID)Groups all sub-tasks belonging to the same logical order. In multi-merchant checkouts, each merchant gets its own task but they share a groupId.
merchantstringThe merchant domain the agent is operating on (e.g. saltiebeauty.com).
tasksarray of objectsThe products included in this checkout task. See tasks[] below.
derivedDetailsobjectData discovered by the AI agent during execution — actual pricing, shipping option selected, etc. Populated progressively. See derivedDetails below.
customerobjectThe full customer object as originally submitted. Echoed back for reference. See customer below.
addonsobjectThe addons object as originally submitted. Echoed back for reference. See addons below.

tasks[]

The list of products this task is purchasing. Each item is an object with the following fields:

FieldTypeDescription
urlstring (URI)The product page URL on the merchant's website. This is what the AI agent navigated to.
quantityintegerNumber of units to purchase.
selectedVariantobjectThe variant selected for this product. Contains color, size, and fit string fields. Empty strings indicate the field was not specified or not applicable.
optionsobject | nullTask-level execution options. null if not set.
metadataobjectYour custom pass-through data. Contains title, description, primaryImage, and price. These are for your records — CartAI does not use them for execution.

derivedDetails

This object is populated progressively by the AI agent as it moves through the checkout. Fields will be null in early stages and fill in as the agent discovers them.

FieldTypePopulated whenDescription
pricingobject | nullAfter the agent reaches the checkout summary stepActual pricing discovered at checkout — subtotal, shipping cost, tax, and total as shown by the merchant.
shippingMethodobject | nullAfter the agent evaluates shipping optionsThe shipping strategy that was applied (e.g. { strategy: "cheapest" }).
selectedShippingOptionstring | nullAfter the agent selects a shipping methodThe exact shipping option the agent picked (e.g. "Standard Shipping (Free)" or "UPS Ground - $5.99").
💡

derivedDetails is the most useful part of this response for displaying order summaries to your customers. It contains the actual total they will be charged, which may differ from the product's listed price due to shipping, tax, or merchant-applied discounts.


customer

An echo of the customer object sent in the original POST /checkout request. All fields are returned as-is. This is useful for verifying what data was used without needing to look up your original request.

Field pathTypeDescription
contact.firstNamestringBuyer's first name.
contact.lastNamestringBuyer's last name.
contact.emailstringBuyer's email address.
contact.phonestringBuyer's phone number.
shippingAddress.addressLine1stringPrimary street address.
shippingAddress.addressLine2stringSuite, apartment, or unit (may be empty).
shippingAddress.citystringCity.
shippingAddress.provincestringState or province.
shippingAddress.postalCodestringZIP or postal code.
shippingAddress.countrystringCountry.
billingAddressobject | nullBilling address, same schema as shippingAddress. null if billing was not separately specified.
shippingMethod.strategystringThe shipping selection strategy used (e.g. "cheapest").
payment.providerstringPayment provider name (e.g. "test").
payment.datastringTest Card Information for the Checkout.


addons

An echo of the addons object sent in the original POST /checkout request. Returned as-is for reference.

FieldTypeDescription
couponCodearray of stringsThe coupon or promo codes that were submitted for this checkout (e.g. ["SUMMER15"]).

Path Params
string
required

Task Id returned in Create Checkout Task API should be used as Path Params.

Headers
string
required
Responses

400

Bad Request

Language
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json