Stop a purchase that has not bought anything yet: no further attempt is made, the purchase is not finished by hand, and the order settles as cancelled. Allowed while the order is pending / processing and no attempt is running (purchase.state is needs_action or pending). An order that bought anything, already settled as failed, or has an attempt running answers 409; cancelling an already cancelled order returns it unchanged.
POST
/
cart
/
purchase
/
cancel
JavaScript
import HenrySDK from '@henrylabs/sdk';
const client = new HenrySDK({
apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted
});
const response = await client.cart.checkout.cancelPurchase({
refId: 'ckp-ref_3fa85f64-5717-4562-b3fc',
reason: 'The buyer chose to complete the purchase themselves',
});
console.log(response.details);
curl --request POST \
--url https://api.henrylabs.ai/v1/cart/purchase/cancel \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"refId": "ckp-ref_3fa85f64-5717-4562-b3fc",
"reason": "The buyer chose to complete the purchase themselves"
}
'
pending / processing while the purchase runs. It then settles: complete (every item bought), partially_complete (some items bought — see products[].status), failed (nothing bought — see error), or cancelled (stopped by Cart Purchase Cancel before anything was bought). After a failed attempt an order can stay processing for up to an hour before it settles; purchase says what is happening meanwhile.
What is happening with the purchase while status is pending / processing: which attempt is running, whether it is a retry, whether the purchase needs action, and why the last attempt failed.
Why items failed, once the order has settled as failed or partially_complete. Absent while the purchase runs and when every item was bought.
Show child attributes
Was this page helpful?
⌘I
JavaScript
import HenrySDK from '@henrylabs/sdk';
const client = new HenrySDK({
apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted
});
const response = await client.cart.checkout.cancelPurchase({
refId: 'ckp-ref_3fa85f64-5717-4562-b3fc',
reason: 'The buyer chose to complete the purchase themselves',
});
console.log(response.details);
curl --request POST \
--url https://api.henrylabs.ai/v1/cart/purchase/cancel \
--header 'Content-Type: application/json' \
--header 'x-api-key: <api-key>' \
--data '
{
"refId": "ckp-ref_3fa85f64-5717-4562-b3fc",
"reason": "The buyer chose to complete the purchase themselves"
}
'
{"docsConfig":{"theme":"almond","$schema":"https://mintlify.com/docs.json","name":"Henry Docs","description":"Henry Labs is a commerce API for apps and AI agents. Search products, build multi-merchant carts, and check out at online merchants with one SDK and one API key.","colors":{"primary":"#F95D24","light":"#F95D24","dark":"#F95D24"},"logo":{"light":"https://mintcdn.com/henrysocial/Hwbu9SUy5nEnx_Uc/images/logo-light.svg?fit=max\u0026auto=format\u0026n=Hwbu9SUy5nEnx_Uc\u0026q=85\u0026s=3b5de7db65089f45a1db621b6ffa9a88","dark":"https://mintcdn.com/henrysocial/Hwbu9SUy5nEnx_Uc/images/logo-dark.svg?fit=max\u0026auto=format\u0026n=Hwbu9SUy5nEnx_Uc\u0026q=85\u0026s=54397c2fc3e7793d5b6bd7101e594975"},"favicon":"https://mintcdn.com/henrysocial/Hwbu9SUy5nEnx_Uc/images/icon.svg?fit=max\u0026auto=format\u0026n=Hwbu9SUy5nEnx_Uc\u0026q=85\u0026s=9f49f9f57f59d7b2ac56b065ac3fe7ee","api":{"playground":{"display":"simple"}},"appearance":{"default":"dark"},"navbar":{"links":[{"href":"mailto:support@henrylabs.ai","label":"Talk to us"}],"primary":{"type":"button","label":"Dashboard ➔","href":"https://app.henrylabs.ai"}},"footer":{},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"henrysocial","hasAudioNarration":false,"actualSubdomain":"henrysocial","customDomains":["docs.henrylabs.ai"],"gitSource":{"type":"github","owner":"henry-social","repo":"henry","deployBranch":"main","contentDirectory":"apps/public-docs","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae8b621eb73d12669c30033","collectionId":"4aef8825-c1f7-402d-8b08-3bb536590727","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae8b621eb73d12669c30033"},"feedback":{"thumbs":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"}},"buildId":"6aecf3465719a0d3b7a29ed7","clientVersion":"0.0.4071","searchFilterCounts":[{"language":"default","tag":"API Reference","count":26},{"language":"default","tag":"Server SDK","count":14},{"language":"default","tag":"Client SDK","count":12},{"language":"default","tag":"Cart","count":12},{"language":"default","tag":"Info","count":6},{"language":"default","tag":"Getting Started","count":6},{"language":"default","tag":"Key Features","count":6},{"language":"default","tag":"Card","count":6},{"language":"default","tag":"Product","count":4},{"language":"default","tag":"Careers","count":3}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-signup","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-enabled","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":true},"customCss":[],"page":{"pagePath":"api-reference/cart/cart-purchase-cancel","slug":"/api-reference/cart/cart-purchase-cancel","pageMetadata":{"title":"Cart Purchase Cancel","description":"Stop a purchase that has not bought anything yet: no further attempt is made, the purchase is not finished by hand, and the order settles as `cancelled`. Allowed while the order is `pending` / `processing` and no attempt is running (`purchase.state` is `needs_action` or `pending`). An order that bought anything, already settled as `failed`, or has an attempt running answers `409`; cancelling an already cancelled order returns it unchanged.","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json post /cart/purchase/cancel","href":"/api-reference/cart/cart-purchase-cancel","autogeneratedByOpenApi":true},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx, jsxs: _jsxs} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n code: \"code\",\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsxs(_components.p, {\n children: [\"Stop a purchase that has not bought anything yet: no further attempt is made, the purchase is not finished by hand, and the order settles as \", _jsx(_components.code, {\n children: \"cancelled\"\n }), \". Allowed while the order is \", _jsx(_components.code, {\n children: \"pending\"\n }), \" / \", _jsx(_components.code, {\n children: \"processing\"\n }), \" and no attempt is running (\", _jsx(_components.code, {\n children: \"purchase.state\"\n }), \" is \", _jsx(_components.code, {\n children: \"needs_action\"\n }), \" or \", _jsx(_components.code, {\n children: \"pending\"\n }), \"). An order that bought anything, already settled as \", _jsx(_components.code, {\n children: \"failed\"\n }), \", or has an attempt running answers \", _jsx(_components.code, {\n children: \"409\"\n }), \"; cancelling an already cancelled order returns it unchanged.\"]\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){return _jsx(_Fragment,{})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Cart Purchase Cancel","description":"Stop a purchase that has not bought anything yet: no further attempt is made, the purchase is not finished by hand, and the order settles as `cancelled`. Allowed while the order is `pending` / `processing` and no attempt is running (`purchase.state` is `needs_action` or `pending`). An order that bought anything, already settled as `failed`, or has an attempt running answers `409`; cancelling an already cancelled order returns it unchanged.","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json post /cart/purchase/cancel","href":"/api-reference/cart/cart-purchase-cancel","autogeneratedByOpenApi":true}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[],"codeExamples":{}},"jsLinks":[],"openApiReferenceData":{"operation":{"operationId":"cartPurchaseCancel","summary":"Cart Purchase Cancel","description":"Stop a purchase that has not bought anything yet: no further attempt is made, the purchase is not finished by hand, and the order settles as `cancelled`. Allowed while the order is `pending` / `processing` and no attempt is running (`purchase.state` is `needs_action` or `pending`). An order that bought anything, already settled as `failed`, or has an attempt running answers `409`; cancelling an already cancelled order returns it unchanged.","tags":["Cart"],"security":["a3c14d95-d7b8-4a77-88c5-905bdb2ad67c"],"requestBody":"2acca1b8-eaf8-49c6-a822-4f40a4e6743f","responses":{"200":"f7b816ee-2c77-4fdc-8b8a-1d62665450fc","400":"83db02c8-7f69-4465-93b8-f721c08652d4","401":"45843129-0829-4fa8-b75b-a28e7cc61384","404":"457a1886-a17a-48ea-a1b9-88fccf01217f","409":"f9180312-4fee-430f-b046-e968af7c91d4"},"x-codeSamples":[{"lang":"JavaScript","source":"import HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK({\n apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.cart.checkout.cancelPurchase({\n refId: 'ckp-ref_3fa85f64-5717-4562-b3fc',\n reason: 'The buyer chose to complete the purchase themselves',\n});\n\nconsole.log(response.details);"}],"method":"post","type":"path","servers":["3dfaf641-2f51-4cc8-931e-123a3b29a77f"],"path":"/cart/purchase/cancel","baseUrlOptions":["https://api.henrylabs.ai/v1"],"title":"Cart Purchase Cancel","codeSamples":[{"lang":"JavaScript","source":"import HenrySDK from '@henrylabs/sdk';\n\nconst client = new HenrySDK({\n apiKey: process.env['HENRY_SDK_API_KEY'], // This is the default and can be omitted\n});\n\nconst response = await client.cart.checkout.cancelPurchase({\n refId: 'ckp-ref_3fa85f64-5717-4562-b3fc',\n reason: 'The buyer chose to complete the purchase themselves',\n});\n\nconsole.log(response.details);"}],"requiredOnlyExamples":false,"requestExampleType":"codeSamples","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"content":{"application/json":{"example":{"refId":"ckp-ref_3fa85f64-5717-4562-b3fc","reason":"The buyer chose to complete the purchase themselves"},"schema":{"type":"object","properties":{"refId":{"type":"string","pattern":"^[a-zA-Z]{3}-ref_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}$","description":"The order's reference ID, as returned by Cart Purchase","example":"ckp-ref_3fa85f64-5717-4562-b3fc","isRequired":true,"uniqueKey":"refId","typeLabel":"string"},"reason":{"description":"Why the purchase is being cancelled. Returned as `result.reason` on the cancelled order and on the `order.purchase.cancelled` webhook.","example":"The buyer chose to complete the purchase themselves","type":"string","maxLength":500,"uniqueKey":"reason","typeLabel":"string"}},"required":["refId"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"refId":"ckp-ref_3fa85f64-5717-4562-b3fc","reason":"The buyer chose to complete the purchase themselves"}}},"exampleType":"examples"}},"exampleType":"examples"},"responses":{"f7b816ee-2c77-4fdc-8b8a-1d62665450fc":{"description":"The order, now `cancelled`","content":{"application/json":{"schema":{"type":"object","properties":{"refId":{"type":"string","pattern":"^[a-zA-Z]{3}-ref_[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[0-9a-f]{4}$","isRequired":true,"uniqueKey":"refId","typeLabel":"string"},"status":{"type":"string","enum":["pending","processing","complete","partially_complete","failed","cancelled"],"description":"`pending` / `processing` while the purchase runs. It then settles: `complete` (every item bought), `partially_complete` (some items bought — see `products[].status`), `failed` (nothing bought — see `error`), or `cancelled` (stopped by Cart Purchase Cancel before anything was bought). After a failed attempt an order can stay `processing` for up to an hour before it settles; `purchase` says what is happening meanwhile.","isRequired":true,"uniqueKey":"status","typeLabel":"enum\u003cstring>"},"purchase":{"type":"object","properties":{"state":{"type":"string","enum":["pending","attempting","retrying","needs_action","settled"],"description":"`pending` — no attempt yet. `attempting` — the first attempt is running. `retrying` — an attempt failed (see `error`) and another is running. `needs_action` — an attempt failed, nothing is retrying it, and the purchase can still be finished by hand within the hour or cancelled. `settled` — the outcome is final; read `status`.","isRequired":true,"uniqueKey":"purchase.state","typeLabel":"enum\u003cstring>"},"attempt":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"How many purchase attempts have been made, the running one included. `0` before the first.","example":1,"isRequired":true,"uniqueKey":"purchase.attempt","typeLabel":"integer"},"error":{"description":"Why the most recent attempt failed, as the same client-safe `{ code, message }` the order's `error` uses. Present while `retrying`, while `needs_action`, and once settled as `failed`.","type":"object","properties":{"code":{"type":"string","enum":["CARD_DECLINED","ITEM_UNAVAILABLE","SHIPPING_UNAVAILABLE","MINIMUM_ORDER_NOT_MET","PURCHASE_FAILED","MULTIPLE_ERRORS"],"description":"`CARD_DECLINED` — the merchant did not accept the card; a different card may work. `ITEM_UNAVAILABLE` — an item is out of stock or no longer sold. `SHIPPING_UNAVAILABLE` — the merchant does not ship to the address. `MINIMUM_ORDER_NOT_MET` — the order is under the merchant's minimum. `PURCHASE_FAILED` — the purchase could not be completed for a reason on Henry's side; contact support with the reference ID. `MULTIPLE_ERRORS` — the order's merchants failed for different reasons.","example":"CARD_DECLINED","isRequired":true,"uniqueKey":"purchase.error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"A short description of the failure, safe to show the buyer. `PURCHASE_FAILED` and `MULTIPLE_ERRORS` carry the order's reference ID for support.","example":"The merchant did not accept the card","isRequired":true,"uniqueKey":"purchase.error.message","typeLabel":"string"}},"required":["code","message"],"additionalProperties":false,"uniqueKey":"purchase.error","typeLabel":"object"}},"required":["state","attempt"],"additionalProperties":false,"description":"What is happening with the purchase while `status` is `pending` / `processing`: which attempt is running, whether it is a retry, whether the purchase needs action, and why the last attempt failed.","isRequired":true,"uniqueKey":"purchase","typeLabel":"object"},"products":{"type":"array","items":{"type":"object","properties":{"status":{"type":"string","enum":["pending","processing","complete","failed"],"description":"The item's own outcome: `complete` once bought, `failed` once it could not be. It stays `processing` while it is being bought and, after a failed attempt, for up to an hour before it settles.","isRequired":true,"uniqueKey":"products.items.[INDEX].status","typeLabel":"enum\u003cstring>"},"purchase":{"type":"object","properties":{"state":{"type":"string","enum":["pending","attempting","retrying","needs_action","settled"],"description":"`pending` — no attempt yet. `attempting` — the first attempt is running. `retrying` — an attempt failed (see `error`) and another is running. `needs_action` — an attempt failed, nothing is retrying it, and the purchase can still be finished by hand within the hour or cancelled. `settled` — the outcome is final; read `status`.","isRequired":true,"uniqueKey":"products.items.[INDEX].purchase.state","typeLabel":"enum\u003cstring>"},"attempt":{"type":"integer","minimum":0,"maximum":9007199254740991,"description":"How many purchase attempts have been made, the running one included. `0` before the first.","example":1,"isRequired":true,"uniqueKey":"products.items.[INDEX].purchase.attempt","typeLabel":"integer"},"error":{"description":"Why the most recent attempt failed, as the same client-safe `{ code, message }` the order's `error` uses. Present while `retrying`, while `needs_action`, and once settled as `failed`.","type":"object","properties":{"code":{"type":"string","enum":["CARD_DECLINED","ITEM_UNAVAILABLE","SHIPPING_UNAVAILABLE","MINIMUM_ORDER_NOT_MET","PURCHASE_FAILED","MULTIPLE_ERRORS"],"description":"`CARD_DECLINED` — the merchant did not accept the card; a different card may work. `ITEM_UNAVAILABLE` — an item is out of stock or no longer sold. `SHIPPING_UNAVAILABLE` — the merchant does not ship to the address. `MINIMUM_ORDER_NOT_MET` — the order is under the merchant's minimum. `PURCHASE_FAILED` — the purchase could not be completed for a reason on Henry's side; contact support with the reference ID. `MULTIPLE_ERRORS` — the order's merchants failed for different reasons.","example":"CARD_DECLINED","isRequired":true,"uniqueKey":"products.items.[INDEX].purchase.error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"A short description of the failure, safe to show the buyer. `PURCHASE_FAILED` and `MULTIPLE_ERRORS` carry the order's reference ID for support.","example":"The merchant did not accept the card","isRequired":true,"uniqueKey":"products.items.[INDEX].purchase.error.message","typeLabel":"string"}},"required":["code","message"],"additionalProperties":false,"uniqueKey":"products.items.[INDEX].purchase.error","typeLabel":"object"}},"required":["state","attempt"],"additionalProperties":false,"description":"What is happening with this item's purchase: the attempt it is on, whether it is being retried or needs action, and why its last attempt failed.","isRequired":true,"uniqueKey":"products.items.[INDEX].purchase","typeLabel":"object"},"link":{"type":"string","format":"uri","isRequired":true,"uniqueKey":"products.items.[INDEX].link","typeLabel":"string\u003curi>"},"quantity":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991,"isRequired":true,"uniqueKey":"products.items.[INDEX].quantity","typeLabel":"integer"},"merchant":{"type":"string","isRequired":true,"uniqueKey":"products.items.[INDEX].merchant","typeLabel":"string"},"host":{"type":"string","isRequired":true,"uniqueKey":"products.items.[INDEX].host","typeLabel":"string"},"affiliateProductLink":{"type":"string","format":"uri","uniqueKey":"products.items.[INDEX].affiliateProductLink","typeLabel":"string\u003curi>"},"selectedOptions":{"type":"array","items":{"type":"string","uniqueKey":"products.items.[INDEX].selectedOptions.items.[INDEX]","typeLabel":"string"},"uniqueKey":"products.items.[INDEX].selectedOptions","typeLabel":"string[]"},"selectedShipping":{"type":"object","properties":{"id":{"type":"string","uniqueKey":"products.items.[INDEX].selectedShipping.id","typeLabel":"string"},"value":{"type":"string","uniqueKey":"products.items.[INDEX].selectedShipping.value","typeLabel":"string"}},"additionalProperties":false,"uniqueKey":"products.items.[INDEX].selectedShipping","typeLabel":"object"}},"required":["status","purchase","link","quantity","merchant","host"],"additionalProperties":false,"uniqueKey":"products.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"products","typeLabel":"object[]"},"details":{"type":"object","properties":{"hasAccount":{"type":"boolean","isRequired":true,"uniqueKey":"details.hasAccount","typeLabel":"boolean"},"name":{"type":"object","properties":{"firstName":{"type":"string","isRequired":true,"uniqueKey":"details.name.firstName","typeLabel":"string"},"lastName":{"type":"string","isRequired":true,"uniqueKey":"details.name.lastName","typeLabel":"string"},"middleName":{"type":"string","uniqueKey":"details.name.middleName","typeLabel":"string"}},"required":["firstName","lastName"],"additionalProperties":false,"isRequired":true,"uniqueKey":"details.name","typeLabel":"object"},"card":{"type":"object","properties":{"nameOnCard":{"type":"object","properties":{"firstName":{"type":"string","isRequired":true,"uniqueKey":"details.card.nameOnCard.firstName","typeLabel":"string"},"lastName":{"type":"string","isRequired":true,"uniqueKey":"details.card.nameOnCard.lastName","typeLabel":"string"},"middleName":{"type":"string","uniqueKey":"details.card.nameOnCard.middleName","typeLabel":"string"}},"required":["firstName","lastName"],"additionalProperties":false,"isRequired":true,"uniqueKey":"details.card.nameOnCard","typeLabel":"object"},"details":{"type":"object","properties":{},"additionalProperties":false,"isRequired":true,"uniqueKey":"details.card.details","typeLabel":"object"},"billingAddress":{"type":"object","properties":{"line1":{"type":"string","isRequired":true,"uniqueKey":"details.card.billingAddress.line1","typeLabel":"string"},"city":{"type":"string","isRequired":true,"uniqueKey":"details.card.billingAddress.city","typeLabel":"string"},"province":{"type":"string","isRequired":true,"uniqueKey":"details.card.billingAddress.province","typeLabel":"string"},"postalCode":{"type":"string","isRequired":true,"uniqueKey":"details.card.billingAddress.postalCode","typeLabel":"string"},"countryCode":{"type":"string","isRequired":true,"uniqueKey":"details.card.billingAddress.countryCode","typeLabel":"string"},"name":{"type":"object","properties":{"firstName":{"type":"string","isRequired":true,"uniqueKey":"details.card.billingAddress.name.firstName","typeLabel":"string"},"lastName":{"type":"string","isRequired":true,"uniqueKey":"details.card.billingAddress.name.lastName","typeLabel":"string"},"middleName":{"type":"string","uniqueKey":"details.card.billingAddress.name.middleName","typeLabel":"string"}},"required":["firstName","lastName"],"additionalProperties":false,"uniqueKey":"details.card.billingAddress.name","typeLabel":"object"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","uniqueKey":"details.card.billingAddress.email","typeLabel":"string\u003cemail>"},"phone":{"type":"object","properties":{"countryCode":{"type":"string","isRequired":true,"uniqueKey":"details.card.billingAddress.phone.countryCode","typeLabel":"string"},"nationalNumber":{"type":"string","isRequired":true,"uniqueKey":"details.card.billingAddress.phone.nationalNumber","typeLabel":"string"},"e164":{"type":"string","isRequired":true,"uniqueKey":"details.card.billingAddress.phone.e164","typeLabel":"string"},"country":{"type":"string","uniqueKey":"details.card.billingAddress.phone.country","typeLabel":"string"}},"required":["countryCode","nationalNumber","e164"],"additionalProperties":false,"uniqueKey":"details.card.billingAddress.phone","typeLabel":"object"},"line2":{"type":"string","uniqueKey":"details.card.billingAddress.line2","typeLabel":"string"}},"required":["line1","city","province","postalCode","countryCode"],"additionalProperties":false,"uniqueKey":"details.card.billingAddress","typeLabel":"object"}},"required":["nameOnCard","details"],"additionalProperties":false,"isRequired":true,"uniqueKey":"details.card","typeLabel":"object"},"email":{"type":"string","uniqueKey":"details.email","typeLabel":"string"},"phone":{"type":"object","properties":{"countryCode":{"type":"string","isRequired":true,"uniqueKey":"details.phone.countryCode","typeLabel":"string"},"nationalNumber":{"type":"string","isRequired":true,"uniqueKey":"details.phone.nationalNumber","typeLabel":"string"},"e164":{"type":"string","isRequired":true,"uniqueKey":"details.phone.e164","typeLabel":"string"},"country":{"type":"string","uniqueKey":"details.phone.country","typeLabel":"string"}},"required":["countryCode","nationalNumber","e164"],"additionalProperties":false,"uniqueKey":"details.phone","typeLabel":"object"},"shippingAddress":{"type":"object","properties":{"line1":{"type":"string","isRequired":true,"uniqueKey":"details.shippingAddress.line1","typeLabel":"string"},"city":{"type":"string","isRequired":true,"uniqueKey":"details.shippingAddress.city","typeLabel":"string"},"province":{"type":"string","isRequired":true,"uniqueKey":"details.shippingAddress.province","typeLabel":"string"},"postalCode":{"type":"string","isRequired":true,"uniqueKey":"details.shippingAddress.postalCode","typeLabel":"string"},"countryCode":{"type":"string","isRequired":true,"uniqueKey":"details.shippingAddress.countryCode","typeLabel":"string"},"name":{"type":"object","properties":{"firstName":{"type":"string","isRequired":true,"uniqueKey":"details.shippingAddress.name.firstName","typeLabel":"string"},"lastName":{"type":"string","isRequired":true,"uniqueKey":"details.shippingAddress.name.lastName","typeLabel":"string"},"middleName":{"type":"string","uniqueKey":"details.shippingAddress.name.middleName","typeLabel":"string"}},"required":["firstName","lastName"],"additionalProperties":false,"uniqueKey":"details.shippingAddress.name","typeLabel":"object"},"email":{"type":"string","format":"email","pattern":"^(?!\\.)(?!.*\\.\\.)([A-Za-z0-9_'+\\-\\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","uniqueKey":"details.shippingAddress.email","typeLabel":"string\u003cemail>"},"phone":{"type":"object","properties":{"countryCode":{"type":"string","isRequired":true,"uniqueKey":"details.shippingAddress.phone.countryCode","typeLabel":"string"},"nationalNumber":{"type":"string","isRequired":true,"uniqueKey":"details.shippingAddress.phone.nationalNumber","typeLabel":"string"},"e164":{"type":"string","isRequired":true,"uniqueKey":"details.shippingAddress.phone.e164","typeLabel":"string"},"country":{"type":"string","uniqueKey":"details.shippingAddress.phone.country","typeLabel":"string"}},"required":["countryCode","nationalNumber","e164"],"additionalProperties":false,"uniqueKey":"details.shippingAddress.phone","typeLabel":"object"},"line2":{"type":"string","uniqueKey":"details.shippingAddress.line2","typeLabel":"string"}},"required":["line1","city","province","postalCode","countryCode"],"additionalProperties":false,"uniqueKey":"details.shippingAddress","typeLabel":"object"},"settings":{"type":"object","properties":{"collectEmail":{"type":"boolean","uniqueKey":"details.settings.collectEmail","typeLabel":"boolean"},"collectAddress":{"type":"boolean","uniqueKey":"details.settings.collectAddress","typeLabel":"boolean"},"collectPhone":{"type":"boolean","uniqueKey":"details.settings.collectPhone","typeLabel":"boolean"}},"additionalProperties":false,"uniqueKey":"details.settings","typeLabel":"object"}},"required":["hasAccount","name","card"],"additionalProperties":false,"isRequired":true,"uniqueKey":"details","typeLabel":"object"},"result":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"productLink":{"type":"string","format":"uri","isRequired":true,"uniqueKey":"result.\\items.items.[INDEX].productLink","typeLabel":"string\u003curi>"},"confirmationNumber":{"type":"string","isRequired":true,"uniqueKey":"result.\\items.items.[INDEX].confirmationNumber","typeLabel":"string"},"costs":{"type":"object","properties":{"total":{"type":"object","properties":{"value":{"type":"number","isRequired":true,"uniqueKey":"result.\\items.items.[INDEX].costs.total.value","typeLabel":"number"},"currency":{"type":"string","enum":["USD","EUR","AUD","SGD","TWD","GBP","CAD","MXN","NPR","INR","DKK","NOK","SEK","CHF","PLN","CZK","JPY","NZD","HKD","AED","LBP","SAR"],"isRequired":true,"uniqueKey":"result.\\items.items.[INDEX].costs.total.currency","typeLabel":"enum\u003cstring>"}},"required":["value","currency"],"additionalProperties":false,"isRequired":true,"uniqueKey":"result.\\items.items.[INDEX].costs.total","typeLabel":"object"},"subtotal":{"type":"object","properties":{"value":{"type":"number","isRequired":true,"uniqueKey":"result.\\items.items.[INDEX].costs.subtotal.value","typeLabel":"number"},"currency":{"type":"string","enum":["USD","EUR","AUD","SGD","TWD","GBP","CAD","MXN","NPR","INR","DKK","NOK","SEK","CHF","PLN","CZK","JPY","NZD","HKD","AED","LBP","SAR"],"isRequired":true,"uniqueKey":"result.\\items.items.[INDEX].costs.subtotal.currency","typeLabel":"enum\u003cstring>"}},"required":["value","currency"],"additionalProperties":false,"uniqueKey":"result.\\items.items.[INDEX].costs.subtotal","typeLabel":"object"},"tax":{"type":"object","properties":{"value":{"type":"number","isRequired":true,"uniqueKey":"result.\\items.items.[INDEX].costs.tax.value","typeLabel":"number"},"currency":{"type":"string","enum":["USD","EUR","AUD","SGD","TWD","GBP","CAD","MXN","NPR","INR","DKK","NOK","SEK","CHF","PLN","CZK","JPY","NZD","HKD","AED","LBP","SAR"],"isRequired":true,"uniqueKey":"result.\\items.items.[INDEX].costs.tax.currency","typeLabel":"enum\u003cstring>"}},"required":["value","currency"],"additionalProperties":false,"uniqueKey":"result.\\items.items.[INDEX].costs.tax","typeLabel":"object"},"shipping":{"type":"object","properties":{"value":{"type":"number","isRequired":true,"uniqueKey":"result.\\items.items.[INDEX].costs.shipping.value","typeLabel":"number"},"currency":{"type":"string","enum":["USD","EUR","AUD","SGD","TWD","GBP","CAD","MXN","NPR","INR","DKK","NOK","SEK","CHF","PLN","CZK","JPY","NZD","HKD","AED","LBP","SAR"],"isRequired":true,"uniqueKey":"result.\\items.items.[INDEX].costs.shipping.currency","typeLabel":"enum\u003cstring>"}},"required":["value","currency"],"additionalProperties":false,"uniqueKey":"result.\\items.items.[INDEX].costs.shipping","typeLabel":"object"},"discount":{"type":"object","properties":{"value":{"type":"number","isRequired":true,"uniqueKey":"result.\\items.items.[INDEX].costs.discount.value","typeLabel":"number"},"currency":{"type":"string","enum":["USD","EUR","AUD","SGD","TWD","GBP","CAD","MXN","NPR","INR","DKK","NOK","SEK","CHF","PLN","CZK","JPY","NZD","HKD","AED","LBP","SAR"],"isRequired":true,"uniqueKey":"result.\\items.items.[INDEX].costs.discount.currency","typeLabel":"enum\u003cstring>"}},"required":["value","currency"],"additionalProperties":false,"uniqueKey":"result.\\items.items.[INDEX].costs.discount","typeLabel":"object"}},"required":["total"],"additionalProperties":false,"isRequired":true,"uniqueKey":"result.\\items.items.[INDEX].costs","typeLabel":"object"},"quantity":{"oneOf":[{"type":"integer","maximum":9007199254740991,"minimum":0,"exclusiveMinimum":true,"uniqueKey":"result.\\items.items.[INDEX].quantity.oneOf.0","typeLabel":"integer"},{"type":"null","uniqueKey":"result.\\items.items.[INDEX].quantity.oneOf.1","typeLabel":"null"}],"uniqueKey":"result.\\items.items.[INDEX].quantity","typeLabel":"integer | null"},"shipping":{"type":"object","properties":{"id":{"type":"string","isRequired":true,"uniqueKey":"result.\\items.items.[INDEX].shipping.id","typeLabel":"string"},"name":{"type":"string","isRequired":true,"uniqueKey":"result.\\items.items.[INDEX].shipping.name","typeLabel":"string"},"cost":{"type":"object","properties":{"value":{"type":"number","isRequired":true,"uniqueKey":"result.\\items.items.[INDEX].shipping.cost.value","typeLabel":"number"},"currency":{"type":"string","enum":["USD","EUR","AUD","SGD","TWD","GBP","CAD","MXN","NPR","INR","DKK","NOK","SEK","CHF","PLN","CZK","JPY","NZD","HKD","AED","LBP","SAR"],"isRequired":true,"uniqueKey":"result.\\items.items.[INDEX].shipping.cost.currency","typeLabel":"enum\u003cstring>"}},"required":["value","currency"],"additionalProperties":false,"isRequired":true,"uniqueKey":"result.\\items.items.[INDEX].shipping.cost","typeLabel":"object"},"timeEstimate":{"type":"string","uniqueKey":"result.\\items.items.[INDEX].shipping.timeEstimate","typeLabel":"string"},"minDate":{"type":"string","uniqueKey":"result.\\items.items.[INDEX].shipping.minDate","typeLabel":"string"},"maxDate":{"type":"string","uniqueKey":"result.\\items.items.[INDEX].shipping.maxDate","typeLabel":"string"}},"required":["id","name","cost"],"additionalProperties":false,"uniqueKey":"result.\\items.items.[INDEX].shipping","typeLabel":"object"},"appliedCoupon":{"type":"object","properties":{"code":{"type":"string","isRequired":true,"uniqueKey":"result.\\items.items.[INDEX].appliedCoupon.code","typeLabel":"string"},"savedAmount":{"type":"object","properties":{"value":{"type":"number","isRequired":true,"uniqueKey":"result.\\items.items.[INDEX].appliedCoupon.savedAmount.value","typeLabel":"number"},"currency":{"type":"string","enum":["USD","EUR","AUD","SGD","TWD","GBP","CAD","MXN","NPR","INR","DKK","NOK","SEK","CHF","PLN","CZK","JPY","NZD","HKD","AED","LBP","SAR"],"isRequired":true,"uniqueKey":"result.\\items.items.[INDEX].appliedCoupon.savedAmount.currency","typeLabel":"enum\u003cstring>"}},"required":["value","currency"],"additionalProperties":false,"uniqueKey":"result.\\items.items.[INDEX].appliedCoupon.savedAmount","typeLabel":"object"}},"required":["code"],"additionalProperties":false,"uniqueKey":"result.\\items.items.[INDEX].appliedCoupon","typeLabel":"object"},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"oneOf":[{}],"uniqueKey":"result.\\items.items.[INDEX].metadata.additionalProperties","typeLabel":"any"},"uniqueKey":"result.\\items.items.[INDEX].metadata","typeLabel":"object"}},"required":["productLink","confirmationNumber","costs"],"additionalProperties":false,"uniqueKey":"result.\\items.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"result.\\items","typeLabel":"object[]"},"costs":{"type":"object","properties":{"subtotal":{"type":"object","properties":{"value":{"type":"number","isRequired":true,"uniqueKey":"result.costs.subtotal.value","typeLabel":"number"},"currency":{"type":"string","enum":["USD","EUR","AUD","SGD","TWD","GBP","CAD","MXN","NPR","INR","DKK","NOK","SEK","CHF","PLN","CZK","JPY","NZD","HKD","AED","LBP","SAR"],"isRequired":true,"uniqueKey":"result.costs.subtotal.currency","typeLabel":"enum\u003cstring>"}},"required":["value","currency"],"additionalProperties":false,"isRequired":true,"uniqueKey":"result.costs.subtotal","typeLabel":"object"},"serviceFee":{"type":"object","properties":{"value":{"type":"number","isRequired":true,"uniqueKey":"result.costs.serviceFee.value","typeLabel":"number"},"currency":{"type":"string","enum":["USD","EUR","AUD","SGD","TWD","GBP","CAD","MXN","NPR","INR","DKK","NOK","SEK","CHF","PLN","CZK","JPY","NZD","HKD","AED","LBP","SAR"],"isRequired":true,"uniqueKey":"result.costs.serviceFee.currency","typeLabel":"enum\u003cstring>"}},"required":["value","currency"],"additionalProperties":false,"isRequired":true,"uniqueKey":"result.costs.serviceFee","typeLabel":"object"},"total":{"type":"object","properties":{"value":{"type":"number","isRequired":true,"uniqueKey":"result.costs.total.value","typeLabel":"number"},"currency":{"type":"string","enum":["USD","EUR","AUD","SGD","TWD","GBP","CAD","MXN","NPR","INR","DKK","NOK","SEK","CHF","PLN","CZK","JPY","NZD","HKD","AED","LBP","SAR"],"isRequired":true,"uniqueKey":"result.costs.total.currency","typeLabel":"enum\u003cstring>"}},"required":["value","currency"],"additionalProperties":false,"isRequired":true,"uniqueKey":"result.costs.total","typeLabel":"object"}},"required":["subtotal","serviceFee","total"],"additionalProperties":false,"isRequired":true,"uniqueKey":"result.costs","typeLabel":"object"}},"required":["items","costs"],"additionalProperties":false,"uniqueKey":"result","typeLabel":"object"},"error":{"description":"Why items failed, once the order has settled as `failed` or `partially_complete`. Absent while the purchase runs and when every item was bought.","type":"object","properties":{"code":{"type":"string","enum":["CARD_DECLINED","ITEM_UNAVAILABLE","SHIPPING_UNAVAILABLE","MINIMUM_ORDER_NOT_MET","PURCHASE_FAILED","MULTIPLE_ERRORS"],"description":"`CARD_DECLINED` — the merchant did not accept the card; a different card may work. `ITEM_UNAVAILABLE` — an item is out of stock or no longer sold. `SHIPPING_UNAVAILABLE` — the merchant does not ship to the address. `MINIMUM_ORDER_NOT_MET` — the order is under the merchant's minimum. `PURCHASE_FAILED` — the purchase could not be completed for a reason on Henry's side; contact support with the reference ID. `MULTIPLE_ERRORS` — the order's merchants failed for different reasons.","example":"CARD_DECLINED","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"A short description of the failure, safe to show the buyer. `PURCHASE_FAILED` and `MULTIPLE_ERRORS` carry the order's reference ID for support.","example":"The merchant did not accept the card","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"}},"required":["code","message"],"additionalProperties":false,"uniqueKey":"error","typeLabel":"object"}},"required":["refId","status","purchase","products","details"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"refId":"\u003cstring>","status":"pending","purchase":{"state":"pending","attempt":1,"error":{"code":"CARD_DECLINED","message":"The merchant did not accept the card"}},"products":[{"status":"pending","purchase":{"state":"pending","attempt":1,"error":{"code":"CARD_DECLINED","message":"The merchant did not accept the card"}},"link":"\u003cstring>","quantity":123,"merchant":"\u003cstring>","host":"\u003cstring>","affiliateProductLink":"\u003cstring>","selectedOptions":["\u003cstring>"],"selectedShipping":{"id":"\u003cstring>","value":"\u003cstring>"}}],"details":{"hasAccount":true,"name":{"firstName":"\u003cstring>","lastName":"\u003cstring>","middleName":"\u003cstring>"},"card":{"nameOnCard":{"firstName":"\u003cstring>","lastName":"\u003cstring>","middleName":"\u003cstring>"},"details":{},"billingAddress":{"line1":"\u003cstring>","city":"\u003cstring>","province":"\u003cstring>","postalCode":"\u003cstring>","countryCode":"\u003cstring>","name":{"firstName":"\u003cstring>","lastName":"\u003cstring>","middleName":"\u003cstring>"},"email":"jsmith@example.com","phone":{"countryCode":"\u003cstring>","nationalNumber":"\u003cstring>","e164":"\u003cstring>","country":"\u003cstring>"},"line2":"\u003cstring>"}},"email":"\u003cstring>","phone":{"countryCode":"\u003cstring>","nationalNumber":"\u003cstring>","e164":"\u003cstring>","country":"\u003cstring>"},"shippingAddress":{"line1":"\u003cstring>","city":"\u003cstring>","province":"\u003cstring>","postalCode":"\u003cstring>","countryCode":"\u003cstring>","name":{"firstName":"\u003cstring>","lastName":"\u003cstring>","middleName":"\u003cstring>"},"email":"jsmith@example.com","phone":{"countryCode":"\u003cstring>","nationalNumber":"\u003cstring>","e164":"\u003cstring>","country":"\u003cstring>"},"line2":"\u003cstring>"},"settings":{"collectEmail":true,"collectAddress":true,"collectPhone":true}},"result":{"items":[{"productLink":"\u003cstring>","confirmationNumber":"\u003cstring>","costs":{"total":{"value":123,"currency":"USD"},"subtotal":{"value":123,"currency":"USD"},"tax":{"value":123,"currency":"USD"},"shipping":{"value":123,"currency":"USD"},"discount":{"value":123,"currency":"USD"}},"quantity":4503599627370495,"shipping":{"id":"\u003cstring>","name":"\u003cstring>","cost":{"value":123,"currency":"USD"},"timeEstimate":"\u003cstring>","minDate":"\u003cstring>","maxDate":"\u003cstring>"},"appliedCoupon":{"code":"\u003cstring>","savedAmount":{"value":123,"currency":"USD"}},"metadata":{}}],"costs":{"subtotal":{"value":123,"currency":"USD"},"serviceFee":{"value":123,"currency":"USD"},"total":{"value":123,"currency":"USD"}}},"error":{"code":"CARD_DECLINED","message":"The merchant did not accept the card"}}}},"exampleType":"generated"}},"exampleType":"generated"},"83db02c8-7f69-4465-93b8-f721c08652d4":{"description":"Bad request - Invalid parameters","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","isRequired":true,"uniqueKey":"success","typeLabel":"boolean"},"status":{"type":"string","isRequired":true,"uniqueKey":"status","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"required":["success","status","message"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":true,"status":"\u003cstring>","message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"45843129-0829-4fa8-b75b-a28e7cc61384":{"description":"Unauthorized - Invalid API key","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","isRequired":true,"uniqueKey":"success","typeLabel":"boolean"},"status":{"type":"string","isRequired":true,"uniqueKey":"status","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"required":["success","status","message"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":true,"status":"\u003cstring>","message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"457a1886-a17a-48ea-a1b9-88fccf01217f":{"description":"Order not found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","isRequired":true,"uniqueKey":"success","typeLabel":"boolean"},"status":{"type":"string","isRequired":true,"uniqueKey":"status","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"required":["success","status","message"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":true,"status":"\u003cstring>","message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"},"f9180312-4fee-430f-b046-e968af7c91d4":{"description":"The purchase cannot be cancelled: something was bought, it already ended as `failed`, or an attempt is running","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","isRequired":true,"uniqueKey":"success","typeLabel":"boolean"},"status":{"type":"string","isRequired":true,"uniqueKey":"status","typeLabel":"string"},"message":{"type":"string","isRequired":true,"uniqueKey":"message","typeLabel":"string"}},"required":["success","status","message"],"additionalProperties":false,"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"success":true,"status":"\u003cstring>","message":"\u003cstring>"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"a3c14d95-d7b8-4a77-88c5-905bdb2ad67c":{"ApiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key","scopes":[],"schemeName":"ApiKeyAuth"}}},"servers":{"3dfaf641-2f51-4cc8-931e-123a3b29a77f":{"url":"https://api.henrylabs.ai/v1","description":"Production server"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"type":"apiKey","in":"header","name":"x-api-key","scopes":[],"schemeName":"ApiKeyAuth"},"schema":{"title":"x-api-key","type":"string","isRequired":true,"typeLabel":"string","deprecated":false},"schemeName":"ApiKeyAuth","name":"x-api-key"}],"title":"ApiKeyAuth"}]},"originalFileLocation":"v1/api-reference/openapi.documented.json"},"subdomain":"henrysocial","siteName":"Henry Docs","title":"Cart Purchase Cancel - Henry Docs","navMaps":{"firstHrefInVersion":{"v1.20.0":{"href":"/api-reference/cart/cart-purchase-cancel","matchLevel":0}},"firstHrefInLanguage":{}},"lastModified":"2026-11-05T20:32:25.624Z","originalFileLocation":"api-reference/cart/cart-purchase-cancel.mdx"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Stop a purchase that has not bought anything yet: no further attempt is made, the purchase is not finished by hand, and the order settles as cancelled. Allowed while the order is pending / processing and no attempt is running (purchase.state is needs_action or pending). An order that bought anything, already settled as failed, or has an attempt running answers 409; cancelling an already cancelled order returns it unchanged.\">\u003cmeta data-mint-head name=\"application-name\" content=\"Henry Docs\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/henrysocial/mZMyMeEof-j9j0zV/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/mintlify-assets/_mintlify/favicons/henrysocial/mZMyMeEof-j9j0zV/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/henrysocial/mZMyMeEof-j9j0zV/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/henrysocial/mZMyMeEof-j9j0zV/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/henrysocial/mZMyMeEof-j9j0zV/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/henrysocial/mZMyMeEof-j9j0zV/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/henrysocial/mZMyMeEof-j9j0zV/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/henrysocial/mZMyMeEof-j9j0zV/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/henrysocial/mZMyMeEof-j9j0zV/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Cart Purchase Cancel - Henry Docs\">\u003cmeta data-mint-head property=\"og:description\" content=\"Stop a purchase that has not bought anything yet: no further attempt is made, the purchase is not finished by hand, and the order settles as cancelled. Allowed while the order is pending / processing and no attempt is running (purchase.state is needs_action or pending). An order that bought anything, already settled as failed, or has an attempt running answers 409; cancelling an already cancelled order returns it unchanged.\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Henry Docs\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.henrylabs.ai/api-reference/cart/cart-purchase-cancel\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://henrysocial.mintlify.app/_mintlify/api/og/v2?division=Cart\u0026amp;title=Cart+Purchase+Cancel\u0026amp;description=Stop+a+purchase+that+has+not+bought+anything+yet%3A+no+further+attempt+is+made%2C+the+purchase+is+not+finished+by+hand%2C+and+the+order+settles+as+%60cancelled%60.+Allowe\u0026amp;theme=3855eacd6db3c70ccd2dc6c8\u0026amp;signature=174e0c5f607077f62292ceb502f79f396d5f11e777eeaf423ff972ef7c6dbcad\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"Cart Purchase Cancel - Henry Docs\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Stop a purchase that has not bought anything yet: no further attempt is made, the purchase is not finished by hand, and the order settles as cancelled. Allowed while the order is pending / processing and no attempt is running (purchase.state is needs_action or pending). An order that bought anything, already settled as failed, or has an attempt running answers 409; cancelling an already cancelled order returns it unchanged.\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://henrysocial.mintlify.app/_mintlify/api/og/v2?division=Cart\u0026amp;title=Cart+Purchase+Cancel\u0026amp;description=Stop+a+purchase+that+has+not+bought+anything+yet%3A+no+further+attempt+is+made%2C+the+purchase+is+not+finished+by+hand%2C+and+the+order+settles+as+%60cancelled%60.+Allowe\u0026amp;theme=3855eacd6db3c70ccd2dc6c8\u0026amp;signature=174e0c5f607077f62292ceb502f79f396d5f11e777eeaf423ff972ef7c6dbcad\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/mintlify-assets/_mintlify/favicons/henrysocial/mZMyMeEof-j9j0zV/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Henry Docs\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#F95D24\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.henrylabs.ai/api-reference/cart/cart-purchase-cancel\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/cart/cart-purchase-cancel.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.henrylabs.ai/#organization\",\"name\":\"Henry Docs\",\"url\":\"https://docs.henrylabs.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/henrysocial/Hwbu9SUy5nEnx_Uc/images/logo-light.svg?fit=max\u0026auto=format\u0026n=Hwbu9SUy5nEnx_Uc\u0026q=85\u0026s=3b5de7db65089f45a1db621b6ffa9a88\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.henrylabs.ai#website\",\"name\":\"Henry Docs\",\"url\":\"https://docs.henrylabs.ai\",\"publisher\":{\"@id\":\"https://docs.henrylabs.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.henrylabs.ai/api-reference/cart/cart-purchase-cancel#webpage\",\"url\":\"https://docs.henrylabs.ai/api-reference/cart/cart-purchase-cancel\",\"name\":\"Cart Purchase Cancel\",\"description\":\"Stop a purchase that has not bought anything yet: no further attempt is made, the purchase is not finished by hand, and the order settles as cancelled. Allowed while the order is pending / processing and no attempt is running (purchase.state is needs_action or pending). An order that bought anything, already settled as failed, or has an attempt running answers 409; cancelling an already cancelled order returns it unchanged.\",\"dateModified\":\"2026-11-05T20:32:25.624Z\",\"isPartOf\":{\"@id\":\"https://docs.henrylabs.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.henrylabs.ai/api-reference/cart/cart-purchase-cancel#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.henrylabs.ai/api-reference/cart/cart-purchase-cancel#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Cart\",\"item\":\"https://docs.henrylabs.ai/api-reference/cart/cart-list\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Cart Purchase Cancel\",\"item\":\"https://docs.henrylabs.ai/api-reference/cart/cart-purchase-cancel\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.henrylabs.ai/api-reference/cart/cart-purchase-cancel#apireference\",\"headline\":\"Cart Purchase Cancel\",\"name\":\"Cart Purchase Cancel\",\"description\":\"Stop a purchase that has not bought anything yet: no further attempt is made, the purchase is not finished by hand, and the order settles as cancelled. Allowed while the order is pending / processing and no attempt is running (purchase.state is needs_action or pending). An order that bought anything, already settled as failed, or has an attempt running answers 409; cancelling an already cancelled order returns it unchanged.\",\"url\":\"https://docs.henrylabs.ai/api-reference/cart/cart-purchase-cancel\",\"mainEntityOfPage\":{\"@id\":\"https://docs.henrylabs.ai/api-reference/cart/cart-purchase-cancel#webpage\"},\"dateModified\":\"2026-11-05T20:32:25.624Z\",\"publisher\":{\"@id\":\"https://docs.henrylabs.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.henrylabs.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Henry Docs\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Henry Docs","nav":{"global":null,"versions":[{"version":"v1.20.0","tabs":[{"tab":"Server SDK","pages":[{"title":"Server SDK","href":"/v1/sdk/server/getting-started/introduction"}]},{"tab":"Client SDK","pages":[{"title":"Client SDK","href":"/v1/sdk/client/getting-started/introduction"}]},{"tab":"API Reference","groups":[{"group":"Card","pages":[{"title":"Card Get (Beta)","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json get /card/{cardToken}","href":"/api-reference/card/card-get-beta"},{"title":"Card Close (Beta)","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json post /card/{cardToken}/close","href":"/api-reference/card/card-close-beta"},{"title":"Card Issue (Beta)","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json post /card/issue","href":"/api-reference/card/card-issue-beta"},{"title":"Card Reveal (Beta)","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json post /card/{cardToken}/reveal","href":"/api-reference/card/card-reveal-beta"},{"title":"Card Tokenize","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json post /card/tokenize","href":"/api-reference/card/card-tokenize"},{"title":"Card Update","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json post /card/{cardToken}/cvv","href":"/api-reference/card/card-update"}]},{"group":"Product","pages":[{"title":"Product Details Status","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json get /product/details/status","href":"/api-reference/product/product-details-status"},{"title":"Product Search Status","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json get /product/search/status","href":"/api-reference/product/product-search-status"},{"title":"Product Search","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json post /product/search","href":"/api-reference/product/product-search"},{"title":"Product Details","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json post /product/details","href":"/api-reference/product/product-details"}]},{"group":"Cart","pages":[{"title":"Cart List","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json get /cart","href":"/api-reference/cart/cart-list"},{"title":"Cart Create","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json post /cart","href":"/api-reference/cart/cart-create"},{"title":"Cart Update Item","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json put /cart/{cartId}/item","href":"/api-reference/cart/cart-update-item"},{"title":"Cart Add Item","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json post /cart/{cartId}/item","href":"/api-reference/cart/cart-add-item"},{"title":"Cart Remove item","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json delete /cart/{cartId}/item","href":"/api-reference/cart/cart-remove-item"},{"title":"Cart Fetch","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json post /cart/{cartId}","href":"/api-reference/cart/cart-fetch"},{"title":"Cart Delete","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json delete /cart/{cartId}","href":"/api-reference/cart/cart-delete"},{"title":"Cart Details Status","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json get /cart/checkout/status","href":"/api-reference/cart/cart-details-status"},{"title":"Cart Details","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json post /cart/{cartId}/details","href":"/api-reference/cart/cart-details"},{"title":"Cart Purchase Status","description":"Check the status of a cart purchase job and get results when ready.","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json get /cart/purchase/status","href":"/api-reference/cart/cart-purchase-status"},{"title":"Cart Purchase Cancel","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json post /cart/purchase/cancel","href":"/api-reference/cart/cart-purchase-cancel"},{"title":"Cart Purchase","description":"Initiate the purchase process for a cart. Requests are async by default, or use mode=sync to wait up to 30 seconds for completion.","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json post /cart/{cartId}/purchase","href":"/api-reference/cart/cart-purchase"}]},{"group":"Merchants","pages":[{"title":"Merchants List","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json get /merchants","href":"/api-reference/merchants/merchants-list"},{"title":"Merchant Retrieve","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json get /merchants/{host}","href":"/api-reference/merchants/merchant-retrieve"},{"title":"Merchant Search","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json get /merchants/search","href":"/api-reference/merchants/merchant-search"}]},{"group":"Orders","pages":[{"title":"Orders List","deprecated":null,"version":null,"openapi":"/v1/api-reference/openapi.documented.json get /orders","href":"/api-reference/orders/orders-list"}]}]},{"tab":"Changelog","pages":[{"title":"Changelog","href":"/v1/info/changelog"}]},{"tab":"Careers","pages":[{"title":"Careers","href":"/v1/info/careers/join-us"}]}]}]},"basePath":"","title":"Cart Purchase Cancel - Henry Docs","buildId":"dpl_GZsjphRpnhWkstV12jxWNcMHFyox","deploymentId":"dpl_GZsjphRpnhWkstV12jxWNcMHFyox","dynamics":["c2aa737661","b0f84f53ff","a9bb46feb3","2b790eda92"],"chunks":["OpenApiReferenceProvider-B5zPa4Vr.js","utils-CVjrr8Yd.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-DTgURWzl.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-DxTHtkdZ.js","snippetPresets-Cx47o5Vx.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","Page-CYZot51e.js","ApiExamples-4Fr6y9N_.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-Dq2ElbEk.js","shallow-BfYl9r69.js","getApiPlaygroundDisplay-Ch3xc7i1.js","CodeSnippet-BsBxuJ1v.js","CodeSnippets-CetzeDL8.js","getPastedJson-BxPKFSJx.js","icon-o0J1Ochb.js","MethodPill-Du3usO5m.js","DuplicateIcon-DJypyMzl.js","createIcon-YMA6N8KJ.js","DynamicMarkdown-CWvhfcZc.js","SectionHeading-BdLVaXCd.js","axios-vUo_bRtp.js","Markdown-C4Ez6OeV.js","clsx-DptzKFCt.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","html-void-elements-mCSPHezU.js","dist-Dt1IougW.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","AssistantPageLink-CZ6Wt2Vb.js"]}