CartAI Checkout API
The Checkout API from CartAI — 4 operation(s) for checkout.
The Checkout API from CartAI — 4 operation(s) for checkout.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/cartai-ai:cartai-ai-checkout-api"
curl "https://apis.io/api/v1/apis?limit=25"
Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: CartAI Checkout API
version: 1.0.0
description: ''
servers:
- url: https://api.cartai.ai
tags:
- name: Checkout
paths:
/checkout:
post:
summary: Create Checkout Task
tags:
- Checkout
description: This API creates an asynchronous AI-powered checkout task that manages the entire purchase lifecycle — from cart assembly and shipping selection to payment processing and order confirmation — across one or many merchants in a single call.
parameters:
- in: header
name: X-Api-Key
schema:
type: string
required: true
responses:
'201':
description: Checkout tasks submitted
content:
application/json:
schema:
type: object
properties:
status:
type: string
example: success
message:
type: string
example: Checkout tasks submitted
groupId:
type: string
description: Identifier grouping all tasks submitted in this request
tasks:
type: array
items:
type: object
properties:
taskId:
type: string
executionId:
type: string
status:
type: string
example: queued
merchant:
type: string
liveUrl:
type: string
format: uri
description: Live preview URL for watching the checkout run
examples:
Success:
summary: Success
value:
status: success
message: Checkout tasks submitted
groupId: 01a1f857-0a5b-7371-a70e-0513656b448e
tasks:
- taskId: 01a1f857-0a68-7233-abf2-faec6856e343
executionId: 01a1f857-0a68-7233-abf2-fad75e4b2d81
status: queued
merchant: aloyoga.com
liveUrl: https://web.cartai.ai/v2/live-preview?id=eyJ0aWQiOiAiMDFhMWY4NTctMGE2OC03MjMzLWFiZjItZmFlYzY4NTZlMzQzIiwgImV4ZWN1dGlvbl9pZCI6ICIwMWExZjg1Ny0wYTY4LTcyMzMtYWJmMi1mYWQ3NWU0YjJkODEifQ==
'400':
description: Bad Request
requestBody:
required: true
content:
application/json:
schema:
type: object
required:
- customer
- tasks
properties:
customer:
type: object
properties:
contact:
type: object
properties:
lastName:
type: string
firstName:
type: string
phone:
type: string
pattern: ^[+0-9\- ]{7,20}$
email:
type: string
format: email
shippingAddress:
type: object
properties:
addressLine1:
type: string
addressLine2:
type: string
city:
type: string
province:
type: string
postalCode:
type: string
pattern: ^[A-Za-z0-9\- ]{3,10}$
country:
type: string
billingAddress:
type: object
properties:
addressLine1:
type: string
addressLine2:
type: string
city:
type: string
province:
type: string
postalCode:
type: string
pattern: ^[A-Za-z0-9\- ]{3,10}$
country:
type: string
shippingMethod:
type: object
properties:
strategy:
type: string
payment:
type: object
properties:
provider:
type: string
data:
type: object
properties:
cvv:
type: string
name:
type: string
cardNumber:
type: string
expiryYear:
type: string
expiryMonth:
type: string
tasks:
type: array
items:
type: object
required:
- url
- quantity
properties:
url:
type: string
format: uri
quantity:
type: integer
minimum: 1
selectedVariant:
type: object
properties:
color:
type: string
size:
type: string
options:
type: object
properties:
verifyBeforePlacement:
type: boolean
default: false
description: Agent asks for confirmation just before placing the order
useSavedCredentialToLogin:
type: boolean
default: false
description: Agent signs in using the stored credentials created with the Create Credential Vault Session API
useGuestCheckoutIfLoginFails:
type: boolean
default: false
description: If the stored credentials do not work, the agent falls back to guest checkout when the merchant offers it
allowInteraction:
type: boolean
default: false
description: Enables the interactive flow instead of fire and forget. With allowInteraction set to true, CartAI escalates whenever the checkout needs something it does not have, such as login and verification codes, shipping and billing addresses, payment details, shipping method or any other choice the merchant asks for. CartAI pauses the order, asks the customer, and finishes the checkout once the answer is provided.
allowPartialCheckout:
type: boolean
default: false
description: If some items fail (e.g. out of stock), the agent still completes checkout for the remaining items
addons:
type: object
properties:
couponCode:
type: array
items:
type: string
examples:
New Example:
summary: New Example
value:
customer:
contact:
lastName: Sturka
firstName: Carol
phone: '+12144444444'
email: john.doe@example.com
shippingAddress:
addressLine1: 609 Royal Crest Dr
addressLine2: ''
city: Richardson
province: TX
postalCode: '75081'
country: US
billingAddress:
addressLine1: 609 Royal Crest Dr
addressLine2: ''
city: Richardson
province: TX
postalCode: '75081'
country: US
shippingMethod:
strategy: cheapest
payment:
data:
cvv: '444'
name: Carol Sturka
cardNumber: '4242424242424242'
expiryYear: '2034'
expiryMonth: '12'
provider: test
tasks:
- url: https://www.aloyoga.com/products/w1518r-semi-sheer-mock-neck-oasis-tank-ivory
quantity: 1
selectedVariant:
color: Ivory
size: S
options:
verifyBeforePlacement: false
useSavedCredentialToLogin: false
useGuestCheckoutIfLoginFails: false
allowInteraction: false
allowPartialCheckout: true
addons:
couponCode:
- SUMMER15
operationId: postCheckout
x-operation-id-source: derived
/checkout/{taskId}:
get:
summary: Get Checkout Task
tags:
- Checkout
operationId: get_checkout-taskid
description: 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.
parameters:
- in: path
name: taskId
schema:
type: string
required: true
description: 'Task Id returned in Create Checkout Task API should be used as Path Params. '
- in: header
name: X-Api-Key
schema:
type: string
required: true
responses:
'200':
description: OK
content:
application/json:
schema:
type: object
properties:
addons:
type: object
properties:
couponCode:
type: array
items:
type: string
examples:
OK:
summary: OK
value:
tid: 019bd5c5-2824-76d1-aa7a-01db5c4d7065
executionId: 019bd5d7-aba0-7080-95e0-8b183f4eca0b
executionNumber: 3
isLatest: true
status: FAILED
createdAt: '2026-01-19 10:40:39.608994'
groupId: 019bd5c5-2824-76d1-aa7a-01c54a48e75e
merchant: saltiebeauty.com
tasks:
- url: https://saltiebeauty.com/products/seaweed-hydrating-shampoo
quantity: 1
selectedVariant:
color: ''
size: ''
fit: ''
options: null
metadata:
title: SEAWEED HYDRATING SHAMPOO
description: ''
primaryImage: ''
price: ''
derivedDetails:
pricing: null
shippingMethod: null
selectedShippingOption: null
customer:
contact:
firstName: Mauroki
lastName: Wabrom
email: wabrommauroki@gmail.com
phone: '+12144444444'
shippingAddress:
addressLine1: 3221 Robert Dr
addressLine2: ''
city: Richardson
province: TX
postalCode: '75082'
country: United States
billingAddress:
city: Richardson
country: United States
province: TX
postalCode: '75082'
addressLine1: 3221 Robert Dr
addressLine2: ''
shippingMethod:
strategy: cheapest
payment:
data:
cvv: '***'
name: Carol Sturka
cardNumber: '************4242'
expiryYear: '2034'
expiryMonth: '12'
provider: test
iterations:
- executionId: 019bd5c5-2824-76d1-aa7a-01e28ef271ed
executionNumber: 1
createdDate: '2026-01-19 10:20:26.532269'
- executionId: 019bd5d0-ba19-7cd2-8902-e99e729e5b25
executionNumber: 2
createdDate: '2026-01-19 10:33:04.518568'
- executionId: 019bd5d7-aba0-7080-95e0-8b183f4eca0b
executionNumber: 3
createdDate: '2026-01-19 10:40:39.608994'
addons:
couponCode:
- SUMMER15
'400':
description: Bad Request
delete:
summary: Cancel Checkout Task
tags:
- Checkout
operationId: cancel_checkout
description: Cancels an existing checkout task. This will stop any ongoing checkout processes and prevent further execution.
parameters:
- in: path
name: taskId
schema:
type: string
required: true
description: The ID of the checkout task to cancel
- in: header
name: x-api-key
schema:
type: string
required: true
responses:
'200':
description: Checkout task cancelled successfully
content:
application/json:
schema:
type: object
properties:
success:
type: boolean
'400':
description: Bad Request
/checkout/{taskId}/status-history:
get:
summary: Get Status History
tags:
- Checkout
operationId: get_status_history
description: Retrieves the complete status history for a checkout task, including all execution steps with their statuses, timestamps, and credits consumed.
parameters:
- in: path
name: taskId
schema:
type: string
required: true
description: The ID of the checkout task
- in: header
name: x-api-key
schema:
type: string
required: true
responses:
'200':
description: Status history retrieved successfully
content:
application/json:
schema:
type: object
properties:
status:
type: string
message:
type: string
data:
type: array
items:
type: object
properties:
id:
type: integer
taskId:
type: string
executionId:
type: string
status:
type: string
systemStatus:
type: string
createdAt:
type: string
isFailed:
type: boolean
note:
type: string
creditsConsumed:
type: number
retryCount:
type: integer
examples:
Success:
summary: Success
value:
status: SUCCESS
message: History retrieved successfully
data:
- id: 19772
taskId: 019e4a66-f86f-7eb0-ad9f-2aa1f149c03c
executionId: 019e4a66-f86f-7eb0-ad9f-2a9bc9e5a367
status: ORDER_CONFIRMED
systemStatus: FAILED
createdAt: '2026-05-21 12:04:53.639675'
isFailed: false
note: null
creditsConsumed: 0.79
retryCount: 1
- id: 19771
taskId: 019e4a66-f86f-7eb0-ad9f-2aa1f149c03c
executionId: 019e4a66-f86f-7eb0-ad9f-2a9bc9e5a367
status: CREDIT_CARD_INPUT
systemStatus: IN_PROGRESS
createdAt: '2026-05-21 12:03:39.117765'
isFailed: false
note: null
creditsConsumed: 0.38
retryCount: 1
'400':
description: Bad Request
/checkout/{taskId}/{intent}:
post:
summary: Send Interactive Inputs
tags:
- Checkout
operationId: send_interactive_inputs
description: Sends the customer's answer to a checkout task that is paused and waiting for input. With allowInteraction set to true, CartAI escalates whenever the checkout needs something it does not have and resumes the order once the answer arrives. The intent path parameter lists the input types this endpoint accepts.
parameters:
- in: path
name: taskId
schema:
type: string
format: uuid
required: true
description: ID of the checkout task that is waiting for input
- in: path
name: intent
schema:
type: string
enum:
- mfa
required: true
description: 'Type of input being sent. Supported: mfa'
- in: header
name: x-api-key
schema:
type: string
required: true
requestBody:
required: true
content:
application/json:
schema:
type: object
additionalProperties: false
required:
- otp
properties:
otp:
type: string
minLength: 4
maxLength: 8
description: The OTP/MFA code, 4–8 characters. Spaces at either end are trimmed. No other fields are allowed. Required when intent is mfa.
examples:
MFA:
summary: MFA / OTP code
value:
otp: '482913'
responses:
'201':
description: Input submitted successfully
content:
application/json:
schema:
type: object
properties:
status:
type: string
message:
type: string
tasks:
type: array
items:
type: object
properties:
taskId:
type: string
executionId:
type: string
status:
type: string
examples:
Success:
summary: Success
value:
status: success
message: OTP submitted.
tasks:
- taskId: 0193f2a1-7c4e-7b2a-9d1f-3e5a6b7c8d90
executionId: 0193f2a1-8d5f-7c3b-8e2a-4f6b7c8d9e01
status: mfa_received
'400':
description: intent isn't supported, otp is missing or the wrong length, or the body has extra fields
'403':
description: The task doesn't belong to the caller, or the task is past the stage where it accepts an OTP
'404':
description: The task wasn't found
'409':
description: An OTP was already submitted for this task
'500':
description: Unexpected server error
x-readme: {}