Completes the checkout in a single call after the buyer authorizes payment in the Apple Pay sheet. Apple Pay has no separate start or authorize step — once merchant validation succeeds and the buyer authorizes, the client submits the PKPaymentToken and contact details here, and Firmly authorizes and places the order.
Apple Pay is enabled per merchant. Check the cart’s payment_method_options array for { "type": "ApplePay", "wallet": "apple_pay", "config": { ... } } before offering Apple Pay; config carries country_code, supported_networks and merchant_capabilities for the ApplePayPaymentRequest. The merchant must be validated first via Validate Apple Pay Merchant.
Authentication
string
required
Device authentication token from Browser Session
Path Parameters
string
required
The merchant domain (e.g., “merchant.example.com”)
Request Body
object
required
Apple Pay payment attributes
Show Attributes
string
required
The Apple Pay PKPaymentToken as a JSON string (JSON.stringify(token) from the onpaymentauthorized event). Forwarded verbatim to the merchant for decryption.
object
The Apple Pay sheet shippingContact. Used as the shipping address when the merchant checkout has no separate shipping form.
object
The Apple Pay sheet billingContact (cardholder billing address). Can differ from the shipping address; some merchants require it for address verification.
string
The card network reported by Apple Pay (for example, "visa").
Response
Returns the order confirmation object.
string
Unique identifier for the cart
string
The order number from the merchant platform
string
Status of the cart (e.g., “submitted”)
object
Relevant URLs for the order
Show URLs
string
URL to the merchant’s order confirmation page
array
Array of items in the order
object
Delivery address details
object
Billing address details
object
Summary of the Apple Pay payment
Show Payment Summary
string
"ApplePay" for this gateway
object
Grand total including all costs
Code Example
session.onpaymentauthorized = async (event) => { try { const response = await fetch( 'https://api.firmly.work/api/v1/domains/merchant.example.com/express/apple-pay/complete-order', { method: 'POST', headers: { 'x-firmly-authorization': authToken, 'Content-Type': 'application/json' }, body: JSON.stringify({ attributes: { apple_pay_token: JSON.stringify(event.payment.token), apple_pay_address: event.payment.shippingContact, apple_pay_billing_address: event.payment.billingContact } }) } ); // A non-2xx response is an error object ({ description, ... }), not an order const order = await response.json(); if (!response.ok) { session.completePayment(ApplePaySession.STATUS_FAILURE); return; // order.description carries the reason to show the buyer } session.completePayment(ApplePaySession.STATUS_SUCCESS); if (order.urls?.thank_you_page) { window.location.href = order.urls.thank_you_page; } } catch (error) { // Network failure or unparseable body: close the sheet with a failure, never a success session.completePayment(ApplePaySession.STATUS_FAILURE); }};
{"docsConfig":{"theme":"maple","$schema":"https://mintlify.com/docs.json","name":"Firmly API","colors":{"primary":"#0066FF","light":"#4D94FF","dark":"#0052CC"},"logo":{"light":"https://mintcdn.com/firmly/r7dgvkipd3R1MD5w/logo/firmly-l.svg?fit=max\u0026auto=format\u0026n=r7dgvkipd3R1MD5w\u0026q=85\u0026s=8965271ce86f1ebdc22ec1c6cf6a2efb","dark":"https://mintcdn.com/firmly/r7dgvkipd3R1MD5w/logo/firmly-d.svg?fit=max\u0026auto=format\u0026n=r7dgvkipd3R1MD5w\u0026q=85\u0026s=3c0ae733516caa38333d950a50475087"},"favicon":"https://mintcdn.com/firmly/r7dgvkipd3R1MD5w/favicon.svg?fit=max\u0026auto=format\u0026n=r7dgvkipd3R1MD5w\u0026q=85\u0026s=d79d6af6760832d53fb9092f39b34d7d","api":{"openapi":"openapi.json","mdx":{"auth":{"method":"bearer","name":"x-firmly-authorization"},"server":"https://api.firmly.work/api/v2"}},"styling":{"latex":true},"navigation":{"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"firmly","hasAudioNarration":false,"actualSubdomain":"firmly","customDomains":[],"gitSource":{"type":"github","owner":"goyalu","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"DISABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6aecdff57600c2083d3c6022","clientVersion":"0.0.4344","searchFilterCounts":[{"language":"default","tag":"API Reference","count":58},{"language":"default","tag":"Payment Processing","count":16},{"language":"default","tag":"Express Checkout","count":11},{"language":"default","tag":"Simple Cart API (v1)","count":8},{"language":"default","tag":"Checkout","count":7},{"language":"default","tag":"Session","count":6},{"language":"default","tag":"firmly Connect","count":6},{"language":"default","tag":"Cart Management","count":5},{"language":"default","tag":"Catalog","count":4},{"language":"default","tag":"Shipment Configuration","count":4}]},"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":"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":"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":"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":"turbopuffer-dual-write","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":"editor-metadata","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},{"name":"starter-pricing","enabled":true,"variant":{"name":"treatment","enabled":true,"payload":{"type":"string","value":"treatment"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/payment/express-checkout/complete-order-apple-pay","slug":"/api-reference/payment/express-checkout/complete-order-apple-pay","pageMetadata":{"title":"Complete Apple Pay Order","api":"POST https://api.firmly.work/api/v1/domains/{domain}/express/apple-pay/complete-order","description":"Places the order using the Apple Pay payment token","href":"/api-reference/payment/express-checkout/complete-order-apple-pay"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Places the order using the Apple Pay payment token\"\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,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Expandable,Heading,Note,ParamField,ResponseField,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Note)_missingMdxReference(`Note`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(Heading,{level:`2`,id:`overview`,children:`Overview`}),`\n`,_jsxs(_components.p,{children:[`Completes the checkout in a single call after the buyer authorizes payment in the Apple Pay sheet. Apple Pay has no separate start or authorize step — once `,_jsx(_components.a,{href:`/api-reference/payment/express-checkout/validate-merchant-apple-pay`,children:`merchant validation`}),` succeeds and the buyer authorizes, the client submits the `,_jsx(_components.code,{children:`PKPaymentToken`}),` and contact details here, and Firmly authorizes and places the order.`]}),`\n`,_jsx(Note,{children:_jsxs(_components.p,{children:[`Apple Pay is enabled per merchant. Check the cart’s `,_jsx(_components.code,{children:`payment_method_options`}),` array for `,_jsx(_components.code,{children:`{ \"type\": \"ApplePay\", \"wallet\": \"apple_pay\", \"config\": { ... } }`}),` before offering Apple Pay; `,_jsx(_components.code,{children:`config`}),` carries `,_jsx(_components.code,{children:`country_code`}),`, `,_jsx(_components.code,{children:`supported_networks`}),` and `,_jsx(_components.code,{children:`merchant_capabilities`}),` for the `,_jsx(_components.code,{children:`ApplePayPaymentRequest`}),`. The merchant must be validated first via `,_jsx(_components.a,{href:`/api-reference/payment/express-checkout/validate-merchant-apple-pay`,children:`Validate Apple Pay Merchant`}),`.`]})}),`\n`,_jsx(Heading,{level:`2`,id:`authentication`,children:`Authentication`}),`\n`,_jsx(ParamField,{header:`x-firmly-authorization`,type:`string`,required:true,id:`param-x-firmly-authorization`,children:_jsx(_components.p,{children:`Device authentication token from Browser Session`})}),`\n`,_jsx(Heading,{level:`2`,id:`path-parameters`,children:`Path Parameters`}),`\n`,_jsx(ParamField,{path:`domain`,type:`string`,required:true,id:`param-domain`,children:_jsx(_components.p,{children:`The merchant domain (e.g., “merchant.example.com”)`})}),`\n`,_jsx(Heading,{level:`2`,id:`request-body`,children:`Request Body`}),`\n`,_jsxs(ParamField,{body:`attributes`,type:`object`,required:true,id:`param-attributes`,children:[_jsx(_components.p,{children:`Apple Pay payment attributes`}),_jsxs(Expandable,{title:`Attributes`,children:[_jsx(ParamField,{body:`apple_pay_token`,type:`string`,required:true,id:`param-apple-pay-token`,children:_jsxs(_components.p,{children:[`The Apple Pay `,_jsx(_components.code,{children:`PKPaymentToken`}),` as a JSON string (`,_jsx(_components.code,{children:`JSON.stringify(token)`}),` from the `,_jsx(_components.code,{children:`onpaymentauthorized`}),` event). Forwarded verbatim to the merchant for decryption.`]})}),_jsx(ParamField,{body:`apple_pay_address`,type:`object`,id:`param-apple-pay-address`,children:_jsxs(_components.p,{children:[`The Apple Pay sheet `,_jsx(_components.code,{children:`shippingContact`}),`. Used as the shipping address when the merchant checkout has no separate shipping form.`]})}),_jsx(ParamField,{body:`apple_pay_billing_address`,type:`object`,id:`param-apple-pay-billing-address`,children:_jsxs(_components.p,{children:[`The Apple Pay sheet `,_jsx(_components.code,{children:`billingContact`}),` (cardholder billing address). Can differ from the shipping address; some merchants require it for address verification.`]})}),_jsx(ParamField,{body:`apple_pay_card_network`,type:`string`,id:`param-apple-pay-card-network`,children:_jsxs(_components.p,{children:[`The card network reported by Apple Pay (for example, `,_jsx(_components.code,{children:`\"visa\"`}),`).`]})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`response`,children:`Response`}),`\n`,_jsx(_components.p,{children:`Returns the order confirmation object.`}),`\n`,_jsx(ResponseField,{name:`cart_id`,type:`string`,id:`param-cart-id`,children:_jsx(_components.p,{children:`Unique identifier for the cart`})}),`\n`,_jsx(ResponseField,{name:`platform_order_number`,type:`string`,id:`param-platform-order-number`,children:_jsx(_components.p,{children:`The order number from the merchant platform`})}),`\n`,_jsx(ResponseField,{name:`cart_status`,type:`string`,id:`param-cart-status`,children:_jsx(_components.p,{children:`Status of the cart (e.g., “submitted”)`})}),`\n`,_jsxs(ResponseField,{name:`urls`,type:`object`,id:`param-urls`,children:[_jsx(_components.p,{children:`Relevant URLs for the order`}),_jsx(Expandable,{title:`URLs`,children:_jsx(ResponseField,{name:`thank_you_page`,type:`string`,id:`param-thank-you-page`,children:_jsx(_components.p,{children:`URL to the merchant’s order confirmation page`})})})]}),`\n`,_jsx(ResponseField,{name:`line_items`,type:`array`,id:`param-line-items`,children:_jsx(_components.p,{children:`Array of items in the order`})}),`\n`,_jsx(ResponseField,{name:`shipping_info`,type:`object`,id:`param-shipping-info`,children:_jsx(_components.p,{children:`Delivery address details`})}),`\n`,_jsx(ResponseField,{name:`billing_info`,type:`object`,id:`param-billing-info`,children:_jsx(_components.p,{children:`Billing address details`})}),`\n`,_jsxs(ResponseField,{name:`payment_summary`,type:`object`,id:`param-payment-summary`,children:[_jsx(_components.p,{children:`Summary of the Apple Pay payment`}),_jsx(Expandable,{title:`Payment Summary`,children:_jsx(ResponseField,{name:`payment_type`,type:`string`,id:`param-payment-type`,children:_jsxs(_components.p,{children:[_jsx(_components.code,{children:`\"ApplePay\"`}),` for this gateway`]})})})]}),`\n`,_jsx(ResponseField,{name:`total`,type:`object`,id:`param-total`,children:_jsx(_components.p,{children:`Grand total including all costs`})}),`\n`,_jsx(Heading,{level:`2`,id:`code-example`,children:`Code Example`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`36`,language:`javascript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`36`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`session`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`onpaymentauthorized`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` async`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`=>`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` try`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://api.firmly.work/api/v1/domains/merchant.example.com/express/apple-pay/complete-order'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'POST'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'x-firmly-authorization'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` authToken`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'application/json'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` attributes:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apple_pay_token:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`payment`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`token`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apple_pay_address:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`payment`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`shippingContact`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apple_pay_billing_address:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` event`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`payment`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`billingContact`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` })`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` );`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // A non-2xx response is an error object ({ description, ... }), not an order`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` order`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`();`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`!`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ok`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` session`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`completePayment`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ApplePaySession`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`STATUS_FAILURE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` return`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`; `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// order.description carries the reason to show the buyer`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` session`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`completePayment`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ApplePaySession`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`STATUS_SUCCESS`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`order`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`urls`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`thank_you_page`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` window`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`location`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`href`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` order`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`urls`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`thank_you_page`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`catch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` // Network failure or unparseable body: close the sheet with a failure, never a success`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` session`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`completePayment`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`ApplePaySession`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:`STATUS_FAILURE`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`};`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`21`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`21`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` json`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://api.firmly.work/api/v1/domains/merchant.example.com/express/apple-pay/complete-order'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'x-firmly-authorization'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: auth_token,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Content-Type'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'application/json'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'attributes'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'apple_pay_token'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: json.dumps(payment_token),`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'apple_pay_address'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: shipping_contact,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'apple_pay_billing_address'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: billing_contact`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response.raise_for_status()`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`order `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` response.json()`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Order placed: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`order[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`'platform_order_number'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`4`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`4`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.firmly.work/api/v1/domains/merchant.example.com/express/apple-pay/complete-order`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"x-firmly-authorization: YOUR_AUTH_TOKEN\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{\"attributes\": {\"apple_pay_token\": \"{\\\\\"paymentData\\\\\":{...}}\", \"apple_pay_card_network\": \"visa\"}}'`})]}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`response-example`,children:`Response Example`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`39`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`39`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cart_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"9cf76530-1344-420f-9ca6-c7a96fb6db45\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"platform_order_number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"6800018416\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cart_status\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"submitted\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"urls\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"thank_you_page\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://merchant.example.com/checkout/onepage/success/\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"line_items\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"line_item_id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"3e66bef5-43f5-4a80-8957-91c5c8233163\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"sku\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"MT12\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"quantity\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Cassius Sparring Tank\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"price\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"currency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"USD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"value\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`18`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1800`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"symbol\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"shipping_info\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"first_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"John\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"last_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Smith\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"address1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"123 Main St\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"city\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Seattle\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"state_or_province\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"WA\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"country\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"US\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"postal_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"98101\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"billing_info\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"first_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"John\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"last_name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Smith\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"address1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"123 Main St\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"city\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Seattle\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"state_or_province\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"WA\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"country\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"US\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"postal_code\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"98101\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payment_summary\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"payment_type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ApplePay\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: { `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"currency\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"USD\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"value\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`30`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3000`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"symbol\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"$\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`error-responses`,children:`Error Responses`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Code`}),_jsx(_components.th,{children:`Description`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ErrorCartNotFound`})}),_jsx(_components.td,{children:`No active cart for this domain`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ErrorBadRequest`})}),_jsxs(_components.td,{children:[`Missing `,_jsx(_components.code,{children:`apple_pay_token`})]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ErrorGatewayNotFound`})}),_jsx(_components.td,{children:`Apple Pay is not enabled for this merchant`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ErrorPaymentMethodNotAvailable`})}),_jsx(_components.td,{children:`Apple Pay is not available for this cart`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ErrorMissingShippingMethod`})}),_jsx(_components.td,{children:`No shipping method selected`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ErrorMissingTaxSync`})}),_jsx(_components.td,{children:`Tax has not been calculated`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ErrorCheckout`})}),_jsx(_components.td,{children:`Checkout failed at the merchant`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`ErrorRateLimited`})}),_jsx(_components.td,{children:`Too many requests`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`related-endpoints`,children:`Related Endpoints`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/api-reference/payment/express-checkout/validate-merchant-apple-pay`,children:`Validate Apple Pay Merchant`}),` - Required before completing the order`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.a,{href:`/api-reference/payment/express-checkout/complete-order-google-pay`,children:`Complete Google Pay Order`}),` - Google Pay express flow`]}),`\n`]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"Complete Apple Pay Order","api":"POST https://api.firmly.work/api/v1/domains/{domain}/express/apple-pay/complete-order","description":"Places the order using the Apple Pay payment token","href":"/api-reference/payment/express-checkout/complete-order-apple-pay"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Overview","slug":"overview","depth":2,"children":[]},{"title":"Authentication","slug":"authentication","depth":2,"children":[]},{"title":"Path Parameters","slug":"path-parameters","depth":2,"children":[]},{"title":"Request Body","slug":"request-body","depth":2,"children":[]},{"title":"Response","slug":"response","depth":2,"children":[]},{"title":"Code Example","slug":"code-example","depth":2,"children":[]},{"title":"Response Example","slug":"response-example","depth":2,"children":[]},{"title":"Error Responses","slug":"error-responses","depth":2,"children":[]},{"title":"Related Endpoints","slug":"related-endpoints","depth":2,"children":[]}],"codeExamples":{},"endpoint":{"title":"Complete Apple Pay Order","path":"/api/v1/domains/{domain}/express/apple-pay/complete-order","servers":[{"url":"https://api.firmly.work"}],"method":"post","request":{"security":[{"title":"Bearer Auth","parameters":{"header":{"Authorization":{"type":"http","scheme":"bearer","description":"Bearer authentication header of the form `Bearer \u003ctoken>`, where `\u003ctoken>` is your auth token."}},"query":{},"cookie":{}}}],"parameters":{"query":{},"header":{"x-firmly-authorization":{"schema":[{"type":"string","description":"Device authentication token from Browser Session","required":true}]}},"cookie":{},"path":{"domain":{"schema":[{"type":"string","description":"The merchant domain (e.g., “merchant.example.com”)","required":true}]}}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"attributes":[{"type":"object","properties":{"apple_pay_token":[{"type":"string","description":"The Apple Pay `PKPaymentToken` as a JSON string ( `JSON.stringify(token)` from the `onpaymentauthorized` event). Forwarded verbatim to the merchant for decryption.","required":true}],"apple_pay_address":[{"type":"object","properties":{},"description":"The Apple Pay sheet `shippingContact` . Used as the shipping address when the merchant checkout has no separate shipping form."}],"apple_pay_billing_address":[{"type":"object","properties":{},"description":"The Apple Pay sheet `billingContact` (cardholder billing address). Can differ from the shipping address; some merchants require it for address verification."}],"apple_pay_card_network":[{"type":"string","description":"The card network reported by Apple Pay (for example, `\"visa\"` )."}]},"description":"Apple Pay payment attributes","required":true}]}}],"examples":{"example":{"value":{"attributes":{"apple_pay_token":"\u003cstring>","apple_pay_address":{},"apple_pay_billing_address":{},"apple_pay_card_network":"\u003cstring>"}}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"cart_id":[{"type":"string","description":"Unique identifier for the cart"}],"platform_order_number":[{"type":"string","description":"The order number from the merchant platform"}],"cart_status":[{"type":"string","description":"Status of the cart (e.g., “submitted”)"}],"urls":[{"type":"object","properties":{"thank_you_page":[{"type":"string","description":"URL to the merchant’s order confirmation page"}]},"description":"Relevant URLs for the order"}],"line_items":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"Array of items in the order"}],"shipping_info":[{"type":"object","properties":{},"description":"Delivery address details"}],"billing_info":[{"type":"object","properties":{},"description":"Billing address details"}],"payment_summary":[{"type":"object","properties":{"payment_type":[{"type":"string","description":"`\"ApplePay\"` for this gateway"}]},"description":"Summary of the Apple Pay payment"}],"total":[{"type":"object","properties":{},"description":"Grand total including all costs"}]}}],"examples":{"example":{"value":{"cart_id":"\u003cstring>","platform_order_number":"\u003cstring>","cart_status":"\u003cstring>","urls":{"thank_you_page":"\u003cstring>"},"line_items":[{}],"shipping_info":{},"billing_info":{},"payment_summary":{"payment_type":"\u003cstring>"},"total":{}}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"firmly","siteName":"Firmly API","title":"Complete Apple Pay Order - Firmly API","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-11-05T19:59:22.729Z","originalFileLocation":"api-reference/payment/express-checkout/complete-order-apple-pay.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=\"system\"}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=\"Places the order using the Apple Pay payment token\">\u003cmeta data-mint-head name=\"application-name\" content=\"Firmly API\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/firmly/omMJ0Oh207ksDHxO/_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/firmly/omMJ0Oh207ksDHxO/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/firmly/omMJ0Oh207ksDHxO/_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/firmly/omMJ0Oh207ksDHxO/_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/firmly/omMJ0Oh207ksDHxO/_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/firmly/omMJ0Oh207ksDHxO/_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/firmly/omMJ0Oh207ksDHxO/_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/firmly/omMJ0Oh207ksDHxO/_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/firmly/omMJ0Oh207ksDHxO/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Complete Apple Pay Order - Firmly API\">\u003cmeta data-mint-head property=\"og:description\" content=\"Places the order using the Apple Pay payment token\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Firmly API\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://firmly.mintlify.app/api-reference/payment/express-checkout/complete-order-apple-pay\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://firmly.mintlify.site/_mintlify/api/og/v2?division=Apple+Pay\u0026amp;title=Complete+Apple+Pay+Order\u0026amp;description=Places+the+order+using+the+Apple+Pay+payment+token\u0026amp;theme=80ac6b3e4d0c807596fd275f\u0026amp;signature=2e906123c58124d740c8a911d651facf7c8f7b90f32bd966b420116f97ff70b6\">\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=\"Complete Apple Pay Order - Firmly API\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Places the order using the Apple Pay payment token\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://firmly.mintlify.site/_mintlify/api/og/v2?division=Apple+Pay\u0026amp;title=Complete+Apple+Pay+Order\u0026amp;description=Places+the+order+using+the+Apple+Pay+payment+token\u0026amp;theme=80ac6b3e4d0c807596fd275f\u0026amp;signature=2e906123c58124d740c8a911d651facf7c8f7b90f32bd966b420116f97ff70b6\">\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/firmly/omMJ0Oh207ksDHxO/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Firmly API\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#0066FF\">\u003clink data-mint-head rel=\"canonical\" href=\"https://firmly.mintlify.app/api-reference/payment/express-checkout/complete-order-apple-pay\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/api-reference/payment/express-checkout/complete-order-apple-pay.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://firmly.mintlify.app/#organization\",\"name\":\"Firmly API\",\"url\":\"https://firmly.mintlify.app\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/firmly/r7dgvkipd3R1MD5w/logo/firmly-l.svg?fit=max\u0026auto=format\u0026n=r7dgvkipd3R1MD5w\u0026q=85\u0026s=8965271ce86f1ebdc22ec1c6cf6a2efb\"}},{\"@type\":\"WebSite\",\"@id\":\"https://firmly.mintlify.app#website\",\"name\":\"Firmly API\",\"url\":\"https://firmly.mintlify.app\",\"publisher\":{\"@id\":\"https://firmly.mintlify.app/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://firmly.mintlify.app/api-reference/payment/express-checkout/complete-order-apple-pay#webpage\",\"url\":\"https://firmly.mintlify.app/api-reference/payment/express-checkout/complete-order-apple-pay\",\"name\":\"Complete Apple Pay Order\",\"description\":\"Places the order using the Apple Pay payment token\",\"dateModified\":\"2026-11-05T19:59:22.729Z\",\"isPartOf\":{\"@id\":\"https://firmly.mintlify.app#website\"},\"breadcrumb\":{\"@id\":\"https://firmly.mintlify.app/api-reference/payment/express-checkout/complete-order-apple-pay#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://firmly.mintlify.app/api-reference/payment/express-checkout/complete-order-apple-pay#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"API Reference\",\"item\":\"https://firmly.mintlify.app/api-reference/overview\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Payment Processing\",\"item\":\"https://firmly.mintlify.app/api-reference/payment/get-public-key\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Express Checkout\",\"item\":\"https://firmly.mintlify.app/api-reference/payment/express-checkout/overview\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Apple Pay\",\"item\":\"https://firmly.mintlify.app/api-reference/payment/express-checkout/validate-merchant-apple-pay\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Complete Apple Pay Order\",\"item\":\"https://firmly.mintlify.app/api-reference/payment/express-checkout/complete-order-apple-pay\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://firmly.mintlify.app/api-reference/payment/express-checkout/complete-order-apple-pay#apireference\",\"headline\":\"Complete Apple Pay Order\",\"name\":\"Complete Apple Pay Order\",\"description\":\"Places the order using the Apple Pay payment token\",\"url\":\"https://firmly.mintlify.app/api-reference/payment/express-checkout/complete-order-apple-pay\",\"mainEntityOfPage\":{\"@id\":\"https://firmly.mintlify.app/api-reference/payment/express-checkout/complete-order-apple-pay#webpage\"},\"dateModified\":\"2026-11-05T19:59:22.729Z\",\"publisher\":{\"@id\":\"https://firmly.mintlify.app/#organization\"},\"isPartOf\":{\"@id\":\"https://firmly.mintlify.app#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Firmly API\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Firmly API\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/api-reference/payment/express-checkout/complete-order-apple-pay.md","siteName":"Firmly API","nav":{"global":null,"groups":[{"group":"Home","pages":[{"title":"Firmly API","href":"/introduction"}]},{"group":"Core Concepts","pages":[{"title":"How Firmly Works","href":"/concepts/how-firmly-works"},{"title":"Cart Lifecycle","href":"/concepts/cart-lifecycle"},{"title":"Multi-Shipment Structure","href":"/concepts/multi-shipment"}]},{"group":"Implementation Guides","pages":[{"title":"1-Step Checkout","icon":"bolt","href":"/guides/one-step-checkout"},{"title":"Choosing Your API","href":"/guides/choosing-your-api"},{"title":"Simple Cart API Implementation","href":"/guides/simple-cart-api-guide"},{"title":"Full Cart API Implementation","href":"/guides/full-cart-api-guide"}]},{"group":"Ask Agent SDK","pages":[{"title":"Ask Agent SDK","icon":"robot","href":"/ask-agent/overview"},{"title":"Quickstart","icon":"bolt","href":"/ask-agent/quickstart"},{"title":"SDK Reference","icon":"code","href":"/ask-agent/reference"}]},{"group":"API Reference","pages":[{"title":"API Reference","href":"/api-reference/overview"},{"group":"Authentication","pages":[{"title":"Browser Session","api":"POST https://api.firmly.work/api/v1/browser-session","href":"/api-reference/authentication/browser-session"},{"title":"Server-to-Server Authentication","sidebarTitle":"Server-to-Server","href":"/api-reference/authentication/server-to-server"}]},{"group":"Discovery","pages":[{"title":"Discovery API Overview","href":"/api-reference/discovery/overview"},{"title":"Search Products","api":"POST https://api.firmly.work/api/v1/discovery/search","href":"/api-reference/discovery/search"}]},{"group":"Catalog","pages":[{"title":"Catalog API Overview","href":"/api-reference/catalog/overview"},{"title":"Get a Product","api":"GET https://api.firmly.work/api/v1/domains-products/{merchant-domain}/{product-handle}","href":"/api-reference/catalog/get-product"},{"title":"Get All Products","api":"GET https://api.firmly.work/api/v1/domains-products/{merchant-domain}","href":"/api-reference/catalog/get-all-products"},{"title":"Get Product from URL","api":"GET https://api.firmly.work/api/v1/domains-pdp","href":"/api-reference/catalog/get-product-from-url"}]},{"group":"Simple Cart API (v1)","pages":[{"group":"Cart Operations","pages":[{"title":"Get Cart","api":"GET https://api.firmly.work/api/v1/domains/{domain}/cart","href":"/api-reference/simple-cart-api/cart/get-cart"},{"title":"Add Item to Cart","api":"POST https://api.firmly.work/api/v1/domains/{domain}/cart/line-items/{sku}/quantity/{quantity}","href":"/api-reference/simple-cart-api/cart/add-item"},{"title":"Update Item Quantity","api":"PUT https://api.firmly.work/api/v1/domains/{domain}/cart/line-items/{sku}","href":"/api-reference/simple-cart-api/cart/update-item"},{"title":"Clear Cart","api":"DELETE https://api.firmly.work/api/v1/domains/{domain}/cart/line-items","href":"/api-reference/simple-cart-api/cart/clear-cart"}]},{"group":"Checkout","pages":[{"title":"Set Shipping Info","api":"POST https://api.firmly.work/api/v1/domains/{domain}/cart/shipping-info","href":"/api-reference/simple-cart-api/checkout/set-shipping-info"},{"title":"Set Shipping Method","api":"POST https://api.firmly.work/api/v1/domains/{domain}/cart/shipping-method","href":"/api-reference/simple-cart-api/checkout/set-shipping-method"}]}]},{"group":"Cart Management","pages":[{"title":"Overview","href":"/api-reference/cart-management/overview"},{"title":"Get Cart","api":"GET https://api.firmly.work/api/v2/domains/{domain}/cart","href":"/api-reference/cart-management/get-cart"},{"title":"Add Line Item","api":"POST https://api.firmly.work/api/v2/domains/{domain}/cart/line-items","href":"/api-reference/cart-management/add-line-item"},{"title":"Update Line Item","api":"PUT https://api.firmly.work/api/v2/domains/{domain}/cart/line-items/{lineItemId}","href":"/api-reference/cart-management/update-line-item"},{"title":"Clear Cart","api":"DELETE https://api.firmly.work/api/v2/domains/{domain}/cart/line-items","href":"/api-reference/cart-management/clear-cart"}]},{"group":"Checkout","pages":[{"title":"Overview","href":"/api-reference/checkout/overview"},{"title":"Set Shipping Info","api":"POST https://api.firmly.work/api/v2/domains/{domain}/cart/shipping-info","href":"/api-reference/checkout/set-shipping-info"},{"title":"Set Billing Info","api":"POST https://api.firmly.work/api/v2/domains/{domain}/cart/billing-info","href":"/api-reference/checkout/set-billing-info"},{"title":"Get Consents","api":"GET https://api.firmly.work/api/v2/domains/{domain}/cart/consents","href":"/api-reference/checkout/get-consents"},{"title":"Set Consents","api":"POST https://api.firmly.work/api/v2/domains/{domain}/cart/consents","href":"/api-reference/checkout/set-consents"}]},{"group":"Shipment Configuration","pages":[{"title":"Overview","href":"/api-reference/shipment-configuration/overview"},{"title":"Set Fulfillment Type","api":"POST https://api.firmly.work/api/v2/domains/{domain}/cart/shipments/fulfillment-type","href":"/api-reference/shipment-configuration/set-fulfillment-type"},{"title":"Set Shipping Method","api":"POST https://api.firmly.work/api/v2/domains/{domain}/cart/shipment/methods","href":"/api-reference/shipment-configuration/set-shipping-method"},{"title":"Get Availability","api":"POST https://api.firmly.work/api/v2/domains/{domain}/cart/shipments/get-availability","href":"/api-reference/shipment-configuration/get-availability"}]},{"group":"Promotions","pages":[{"title":"Overview","href":"/api-reference/promotions/overview"},{"title":"Add Promo Codes","api":"POST https://api.firmly.work/api/v2/domains/{domain}/cart/promo-codes","href":"/api-reference/promotions/add-promo-codes"},{"title":"Clear Promo Codes","api":"DELETE https://api.firmly.work/api/v2/domains/{domain}/cart/promo-codes","href":"/api-reference/promotions/clear-promo-codes"}]},{"group":"Addon Management","pages":[{"title":"Overview","href":"/api-reference/addon-management/overview"},{"title":"Add Addon","api":"POST https://api.firmly.work/api/v2/domains/{domain}/cart/addons","href":"/api-reference/addon-management/add-addon"},{"title":"Remove Addon","api":"POST https://api.firmly.work/api/v2/domains/{domain}/cart/addons/_remove","href":"/api-reference/addon-management/remove-addon"}]},{"group":"Payment Processing","pages":[{"title":"Get Public Key","api":"GET https://cc.firmly.work/api/v1/payment/key","href":"/api-reference/payment/get-public-key"},{"group":"Simple Cart API (v1)","pages":[{"title":"Complete Order","api":"POST https://cc.firmly.work/api/v1/payment/domains/{domain}/complete-order","href":"/api-reference/payment/complete-order-v1"},{"title":"Place Order","api":"POST https://cc.firmly.work/api/v1/payment/domains/{domain}/place-order","href":"/api-reference/payment/place-order-v1"}]},{"group":"Full Cart API","pages":[{"title":"Complete Order","api":"POST https://cc.firmly.work/api/v2/payment/domains/{domain}/complete-order","href":"/api-reference/payment/complete-order-v2"},{"title":"Place Order","api":"POST https://cc.firmly.work/api/v2/payment/domains/{domain}/place-order","href":"/api-reference/payment/place-order-v2"}]},{"group":"Express Checkout","pages":[{"title":"Express Checkout","href":"/api-reference/payment/express-checkout/overview"},{"group":"Klarna","pages":[{"title":"Start Klarna Checkout","api":"POST https://api.firmly.work/api/v1/domains/{domain}/express/klarna/start","href":"/api-reference/payment/express-checkout/start-klarna"},{"title":"Authorize Klarna Checkout","api":"POST https://api.firmly.work/api/v1/domains/{domain}/express/klarna/authorize","href":"/api-reference/payment/express-checkout/authorize-klarna"},{"title":"Complete Klarna Order","api":"POST https://api.firmly.work/api/v1/domains/{domain}/express/klarna/complete-order","href":"/api-reference/payment/express-checkout/complete-order-klarna"}]},{"group":"PayPal","pages":[{"title":"Start PayPal Checkout","api":"POST https://api.firmly.work/api/v1/domains/{domain}/express/paypal/start","href":"/api-reference/payment/express-checkout/start-paypal"},{"title":"Authorize PayPal Checkout","api":"POST https://api.firmly.work/api/v1/domains/{domain}/express/paypal/authorize","href":"/api-reference/payment/express-checkout/authorize-paypal"},{"title":"Complete PayPal Order","api":"POST https://api.firmly.work/api/v1/domains/{domain}/express/paypal/complete-order","href":"/api-reference/payment/express-checkout/complete-order-paypal"}]},{"group":"Google Pay","pages":[{"title":"Integrate Google Pay","href":"/api-reference/payment/express-checkout/google-pay-integration"},{"title":"Complete Google Pay Order","api":"POST https://api.firmly.work/api/v1/domains/{domain}/express/google-pay/complete-order","href":"/api-reference/payment/express-checkout/complete-order-google-pay"}]},{"group":"Apple Pay","pages":[{"title":"Validate Apple Pay Merchant","api":"POST https://api.firmly.work/api/v1/wallets/apple-pay/validate-merchant","description":"Performs Apple Pay merchant validation and returns the merchant session","href":"/api-reference/payment/express-checkout/validate-merchant-apple-pay"},{"title":"Complete Apple Pay Order","api":"POST https://api.firmly.work/api/v1/domains/{domain}/express/apple-pay/complete-order","href":"/api-reference/payment/express-checkout/complete-order-apple-pay"}]}]}]},{"group":"Orders","pages":[{"title":"Get Order Status","api":"GET https://api.firmly.work/api/v1/orders/domains/{domain}/order/{orderId}/status","description":"Retrieves real-time order status including tracking, fulfillments, returns, and refunds from the merchant platform","href":"/api-reference/orders/get-order-status"}]},{"group":"Session","pages":[{"title":"Overview","href":"/api-reference/session/overview"},{"title":"Set Postal Code","api":"POST https://api.firmly.work/carts/postal-code","href":"/api-reference/session/set-postal-code"},{"title":"Get Postal Code","api":"GET https://api.firmly.work/carts/postal-code","href":"/api-reference/session/get-postal-code"},{"title":"Get Active Domains","api":"GET https://api.firmly.work/carts/active-domains","href":"/api-reference/session/get-active-domains"},{"title":"Get Active Carts","api":"GET https://api.firmly.work/carts/active","href":"/api-reference/session/get-active-carts"},{"title":"Session Transfer","api":"POST https://api.firmly.work/api/v2/domains/{domain}/session/transfer","href":"/api-reference/session/session-transfer"}]}]},{"group":"firmly Connect","pages":[{"group":"Merchant onboarding","pages":[{"title":"Merchant onboarding requirements","icon":"clipboard-check","href":"/firmly-connect/merchant-onboarding/requirements"},{"title":"Network access and allowlisting","icon":"shield-check","href":"/firmly-connect/merchant-onboarding/network-access"}]},{"group":"Single Sign-On (SSO)","pages":[{"title":"Overview","href":"/firmly-connect/sso/overview"},{"title":"Verify a Domain","icon":"at","href":"/firmly-connect/sso/domain-verification"},{"title":"Generic OIDC","icon":"fingerprint","href":"/firmly-connect/sso/generic-oidc"},{"title":"Generic SAML 2.0","icon":"shield","href":"/firmly-connect/sso/generic-saml"}]}]},{"group":"Resources","pages":[{"title":"Error Codes","href":"/resources/error-codes"}]}]},"basePath":"","title":"Complete Apple Pay Order - Firmly API","deploymentId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","buildId":"dpl_EwfxjeKENdVkfzdag8rM6mKzcTUJ","dynamics":["c2aa737661","b0f84f53ff","2b790eda92"],"chunks":["OpenApiReferenceProvider-B8kPdtB2.js","snippetPresets-C-p1aFQ1.js","utils-B9NnUZSZ.js","style-to-object-BY3JEAdk.js","utils-DFxl7cW2.js","v4-DIgz8zy6.js","addTypeLabelsToSchema-bSr9h7OB.js","conditional-requirements-CFM0id0Q.js","cloneDeep-Bw4Gcy_r.js","_Uint8Array-C68x8Gny.js","isObject-FP1Yky1u.js","Page-CeZ_ZB5X.js","api-description-markdown-DiOdv5rp.js","DynamicMarkdown-B_9ywLDq.js","CodeSnippet-6Cemznl-.js","use-playground-group-access-Cyy8SXp5.js","SectionHeading-Cc2r-uqU.js","ApiExamples-BXsp8PHs.js","usePlaygroundInputsStore-BlAOLmIF.js","shallow-C2F02mqa.js","isEqual-C8iG4q2G.js","CodeSnippets-45lHR04X.js","MethodPill-Df3Tcu4c.js","getPastedJson-B3vrV0wE.js","Check2Icon-YQhSFafd.js","axios-CsQoIw0U.js"]}