[{"data":1,"prerenderedAt":1262},["ShallowReactive",2],{"navigation_docs":3,"-docs-storefront-sdk-resources-checkout-shipping":357,"-docs-storefront-sdk-resources-checkout-shipping-surround":1257,"docs-site-config":1246},[4,74,135,139,161,195,273],{"title":5,"path":6,"stem":7,"children":8},"Assets API","\u002Fdocs\u002Fassets","docs\u002Fassets\u002Findex",[9,10,32,57],{"title":5,"path":6,"stem":7},{"title":11,"path":12,"stem":13,"children":14,"page":31},"Getting Started","\u002Fdocs\u002Fassets\u002Fgetting-started","docs\u002Fassets\u002F1.getting-started",[15,19,23,27],{"title":16,"path":17,"stem":18},"Base URL","\u002Fdocs\u002Fassets\u002Fgetting-started\u002Fbase-url","docs\u002Fassets\u002F1.getting-started\u002F1.base-url",{"title":20,"path":21,"stem":22},"Important Notes","\u002Fdocs\u002Fassets\u002Fgetting-started\u002Fimportant-notes","docs\u002Fassets\u002F1.getting-started\u002F2.important-notes",{"title":24,"path":25,"stem":26},"URL Format","\u002Fdocs\u002Fassets\u002Fgetting-started\u002Furl-format","docs\u002Fassets\u002F1.getting-started\u002F3.url-format",{"title":28,"path":29,"stem":30},"Custom Domains","\u002Fdocs\u002Fassets\u002Fgetting-started\u002Fcustom-domains","docs\u002Fassets\u002F1.getting-started\u002F4.custom-domains",false,{"title":33,"path":34,"stem":35,"children":36,"page":31},"Usage","\u002Fdocs\u002Fassets\u002Fusage","docs\u002Fassets\u002F2.usage",[37,41,45,49,53],{"title":38,"path":39,"stem":40},"Transforms","\u002Fdocs\u002Fassets\u002Fusage\u002Ftransforms","docs\u002Fassets\u002F2.usage\u002F1.transforms",{"title":42,"path":43,"stem":44},"Caching","\u002Fdocs\u002Fassets\u002Fusage\u002Fcaching","docs\u002Fassets\u002F2.usage\u002F2.caching",{"title":46,"path":47,"stem":48},"Recipes","\u002Fdocs\u002Fassets\u002Fusage\u002Frecipes","docs\u002Fassets\u002F2.usage\u002F3.recipes",{"title":50,"path":51,"stem":52},"Best Practices","\u002Fdocs\u002Fassets\u002Fusage\u002Fbest-practices","docs\u002Fassets\u002F2.usage\u002F4.best-practices",{"title":54,"path":55,"stem":56},"Reference","\u002Fdocs\u002Fassets\u002Fusage\u002Freference","docs\u002Fassets\u002F2.usage\u002F5.reference",{"title":58,"path":59,"stem":60,"children":61,"page":31},"Integration","\u002Fdocs\u002Fassets\u002Fintegration","docs\u002Fassets\u002F3.integration",[62,66,70],{"title":63,"path":64,"stem":65},"Nuxt","\u002Fdocs\u002Fassets\u002Fintegration\u002Fnuxt","docs\u002Fassets\u002F3.integration\u002F1.nuxt",{"title":67,"path":68,"stem":69},"Next.js","\u002Fdocs\u002Fassets\u002Fintegration\u002Fnextjs","docs\u002Fassets\u002F3.integration\u002F2.nextjs",{"title":71,"path":72,"stem":73},"Plain HTML","\u002Fdocs\u002Fassets\u002Fintegration\u002Fhtml","docs\u002Fassets\u002F3.integration\u002F3.html",{"title":75,"path":76,"stem":77,"children":78},"Avvyr CMS","\u002Fdocs\u002Fcms","docs\u002Fcms\u002Findex",[79,80,92,105,118,131],{"title":75,"path":76,"stem":77},{"title":11,"path":81,"stem":82,"children":83,"page":31},"\u002Fdocs\u002Fcms\u002Fgetting-started","docs\u002Fcms\u002F1.getting-started",[84,88],{"title":85,"path":86,"stem":87},"Quickstart","\u002Fdocs\u002Fcms\u002Fgetting-started\u002Fquickstart","docs\u002Fcms\u002F1.getting-started\u002F1.quickstart",{"title":89,"path":90,"stem":91},"Keys and access","\u002Fdocs\u002Fcms\u002Fgetting-started\u002Fkeys-and-access","docs\u002Fcms\u002F1.getting-started\u002F2.keys-and-access",{"title":93,"path":94,"stem":95,"children":96,"page":31},"Content Model","\u002Fdocs\u002Fcms\u002Fcontent-model","docs\u002Fcms\u002F2.content-model",[97,101],{"title":98,"path":99,"stem":100},"Types and fields","\u002Fdocs\u002Fcms\u002Fcontent-model\u002Ftypes-and-fields","docs\u002Fcms\u002F2.content-model\u002F1.types-and-fields",{"title":102,"path":103,"stem":104},"Entries and publishing","\u002Fdocs\u002Fcms\u002Fcontent-model\u002Fentries-and-publishing","docs\u002Fcms\u002F2.content-model\u002F2.entries-and-publishing",{"title":106,"path":107,"stem":108,"children":109,"page":31},"Delivery","\u002Fdocs\u002Fcms\u002Fdelivery","docs\u002Fcms\u002F3.delivery",[110,114],{"title":111,"path":112,"stem":113},"Delivery API","\u002Fdocs\u002Fcms\u002Fdelivery\u002Fdelivery-api","docs\u002Fcms\u002F3.delivery\u002F1.delivery-api",{"title":115,"path":116,"stem":117},"Preview and live editing","\u002Fdocs\u002Fcms\u002Fdelivery\u002Fpreview","docs\u002Fcms\u002F3.delivery\u002F2.preview",{"title":119,"path":120,"stem":121,"children":122,"page":31},"Frameworks","\u002Fdocs\u002Fcms\u002Fframeworks","docs\u002Fcms\u002F4.frameworks",[123,127],{"title":124,"path":125,"stem":126},"JavaScript client","\u002Fdocs\u002Fcms\u002Fframeworks\u002Fjavascript-client","docs\u002Fcms\u002F4.frameworks\u002F1.javascript-client",{"title":128,"path":129,"stem":130},"Nuxt layer","\u002Fdocs\u002Fcms\u002Fframeworks\u002Fnuxt","docs\u002Fcms\u002F4.frameworks\u002F2.nuxt",{"title":132,"path":133,"stem":134},"Management API","\u002Fdocs\u002Fcms\u002Fmanagement-api","docs\u002Fcms\u002F5.management-api",{"title":136,"path":137,"stem":138},"Early Access","\u002Fdocs\u002Fearly-access","docs\u002Fearly-access",{"title":140,"path":141,"stem":142,"children":143},"Events API","\u002Fdocs\u002Fevents","docs\u002Fevents\u002Findex",[144,145],{"title":140,"path":141,"stem":142},{"title":11,"path":146,"stem":147,"children":148,"page":31},"\u002Fdocs\u002Fevents\u002Fgetting-started","docs\u002Fevents\u002F1.getting-started",[149,153,157],{"title":150,"path":151,"stem":152},"Subscribing","\u002Fdocs\u002Fevents\u002Fgetting-started\u002Fsubscribing","docs\u002Fevents\u002F1.getting-started\u002F1.subscribing",{"title":154,"path":155,"stem":156},"Event Delivery","\u002Fdocs\u002Fevents\u002Fgetting-started\u002Fevent-delivery","docs\u002Fevents\u002F1.getting-started\u002F2.event-delivery",{"title":158,"path":159,"stem":160},"Event Reference","\u002Fdocs\u002Fevents\u002Fgetting-started\u002Fevent-reference","docs\u002Fevents\u002F1.getting-started\u002F3.event-reference",{"title":162,"path":163,"stem":164,"children":165},"Integrations API","\u002Fdocs\u002Fintegrations","docs\u002Fintegrations\u002Findex",[166,167],{"title":162,"path":163,"stem":164},{"title":11,"path":168,"stem":169,"children":170,"page":31},"\u002Fdocs\u002Fintegrations\u002Fgetting-started","docs\u002Fintegrations\u002F1.getting-started",[171,175,179,183,187,191],{"title":172,"path":173,"stem":174},"Why Use It?","\u002Fdocs\u002Fintegrations\u002Fgetting-started\u002Fwhy-integrations-api","docs\u002Fintegrations\u002F1.getting-started\u002F1.why-integrations-api",{"title":176,"path":177,"stem":178},"Use Cases","\u002Fdocs\u002Fintegrations\u002Fgetting-started\u002Fwho-is-it-for","docs\u002Fintegrations\u002F1.getting-started\u002F2.who-is-it-for",{"title":180,"path":181,"stem":182},"Pre-built Connectors","\u002Fdocs\u002Fintegrations\u002Fgetting-started\u002Fpre-built-integrations","docs\u002Fintegrations\u002F1.getting-started\u002F3.pre-built-integrations",{"title":184,"path":185,"stem":186},"Custom Inbound","\u002Fdocs\u002Fintegrations\u002Fgetting-started\u002Fcustom-inbound-api","docs\u002Fintegrations\u002F1.getting-started\u002F4.custom-inbound-api",{"title":188,"path":189,"stem":190},"Event Lifecycle","\u002Fdocs\u002Fintegrations\u002Fgetting-started\u002Fevent-lifecycle","docs\u002Fintegrations\u002F1.getting-started\u002F5.event-lifecycle",{"title":192,"path":193,"stem":194},"API Endpoints","\u002Fdocs\u002Fintegrations\u002Fgetting-started\u002Fmanagement-api-endpoints","docs\u002Fintegrations\u002F1.getting-started\u002F6.management-api-endpoints",{"title":196,"path":197,"stem":198,"children":199},"MCP Server","\u002Fdocs\u002Fmcp","docs\u002Fmcp\u002Findex",[200,201,225,234,244],{"title":196,"path":197,"stem":198},{"title":11,"path":202,"stem":203,"children":204,"page":31},"\u002Fdocs\u002Fmcp\u002Fgetting-started","docs\u002Fmcp\u002F1.getting-started",[205,209,213,217,221],{"title":206,"path":207,"stem":208},"Claude","\u002Fdocs\u002Fmcp\u002Fgetting-started\u002Fclaude","docs\u002Fmcp\u002F1.getting-started\u002F1.claude",{"title":210,"path":211,"stem":212},"Claude Code","\u002Fdocs\u002Fmcp\u002Fgetting-started\u002Fclaude-code","docs\u002Fmcp\u002F1.getting-started\u002F2.claude-code",{"title":214,"path":215,"stem":216},"VS Code","\u002Fdocs\u002Fmcp\u002Fgetting-started\u002Fvscode","docs\u002Fmcp\u002F1.getting-started\u002F3.vscode",{"title":218,"path":219,"stem":220},"Cursor","\u002Fdocs\u002Fmcp\u002Fgetting-started\u002Fcursor","docs\u002Fmcp\u002F1.getting-started\u002F4.cursor",{"title":222,"path":223,"stem":224},"Verify the connection","\u002Fdocs\u002Fmcp\u002Fgetting-started\u002Fverify","docs\u002Fmcp\u002F1.getting-started\u002F5.verify",{"title":226,"path":227,"stem":228,"children":229,"page":31},"Docs Server","\u002Fdocs\u002Fmcp\u002Fdocs-server","docs\u002Fmcp\u002F2.docs-server",[230],{"title":231,"path":232,"stem":233},"Docs server tools","\u002Fdocs\u002Fmcp\u002Fdocs-server\u002Ftools","docs\u002Fmcp\u002F2.docs-server\u002F1.tools",{"title":235,"path":236,"stem":237,"children":238},"API Server","\u002Fdocs\u002Fmcp\u002Fapi-server","docs\u002Fmcp\u002F3.api-server\u002Findex",[239,240],{"title":235,"path":236,"stem":237},{"title":241,"path":242,"stem":243},"Available tools","\u002Fdocs\u002Fmcp\u002Fapi-server\u002Ftools","docs\u002Fmcp\u002F3.api-server\u002F1.tools",{"title":245,"path":246,"stem":247,"children":248,"page":31},"Examples","\u002Fdocs\u002Fmcp\u002Fexamples","docs\u002Fmcp\u002F4.examples",[249,253,257,261,265,269],{"title":250,"path":251,"stem":252},"Exploring an API","\u002Fdocs\u002Fmcp\u002Fexamples\u002Fexploring-an-api","docs\u002Fmcp\u002F4.examples\u002F1.exploring-an-api",{"title":254,"path":255,"stem":256},"Building a Feature","\u002Fdocs\u002Fmcp\u002Fexamples\u002Fbuilding-a-feature","docs\u002Fmcp\u002F4.examples\u002F2.building-a-feature",{"title":258,"path":259,"stem":260},"Understanding Models","\u002Fdocs\u002Fmcp\u002Fexamples\u002Funderstanding-models","docs\u002Fmcp\u002F4.examples\u002F3.understanding-models",{"title":262,"path":263,"stem":264},"Code Review","\u002Fdocs\u002Fmcp\u002Fexamples\u002Fcode-review","docs\u002Fmcp\u002F4.examples\u002F4.code-review",{"title":266,"path":267,"stem":268},"Combining MCP Servers","\u002Fdocs\u002Fmcp\u002Fexamples\u002Fmulti-mcp","docs\u002Fmcp\u002F4.examples\u002F5.multi-mcp",{"title":270,"path":271,"stem":272},"Tips","\u002Fdocs\u002Fmcp\u002Fexamples\u002Ftips","docs\u002Fmcp\u002F4.examples\u002F6.tips",{"title":274,"path":275,"stem":276,"children":277,"page":31},"Storefront SDK","\u002Fdocs\u002Fstorefront-sdk","docs\u002Fstorefront-sdk",[278,290,323,338],{"title":11,"path":279,"stem":280,"children":281,"page":31},"\u002Fdocs\u002Fstorefront-sdk\u002Fgetting-started","docs\u002Fstorefront-sdk\u002F1.getting-started",[282,286],{"title":283,"path":284,"stem":285},"Installation","\u002Fdocs\u002Fstorefront-sdk\u002Fgetting-started\u002Finstallation","docs\u002Fstorefront-sdk\u002F1.getting-started\u002F1.installation",{"title":287,"path":288,"stem":289},"Configuration","\u002Fdocs\u002Fstorefront-sdk\u002Fgetting-started\u002Fconfiguration","docs\u002Fstorefront-sdk\u002F1.getting-started\u002F2.configuration",{"title":291,"path":292,"stem":293,"children":294,"page":31},"Resources","\u002Fdocs\u002Fstorefront-sdk\u002Fresources","docs\u002Fstorefront-sdk\u002F2.resources",[295,299,303,307,311,315,319],{"title":296,"path":297,"stem":298},"Products","\u002Fdocs\u002Fstorefront-sdk\u002Fresources\u002Fproducts","docs\u002Fstorefront-sdk\u002F2.resources\u002F1.products",{"title":300,"path":301,"stem":302},"Cart","\u002Fdocs\u002Fstorefront-sdk\u002Fresources\u002Fcart","docs\u002Fstorefront-sdk\u002F2.resources\u002F2.cart",{"title":304,"path":305,"stem":306},"Auth","\u002Fdocs\u002Fstorefront-sdk\u002Fresources\u002Fauth","docs\u002Fstorefront-sdk\u002F2.resources\u002F3.auth",{"title":308,"path":309,"stem":310},"Checkout & Shipping","\u002Fdocs\u002Fstorefront-sdk\u002Fresources\u002Fcheckout-shipping","docs\u002Fstorefront-sdk\u002F2.resources\u002F4.checkout-shipping",{"title":312,"path":313,"stem":314},"Orders, Returns & Reviews","\u002Fdocs\u002Fstorefront-sdk\u002Fresources\u002Forders-returns-reviews","docs\u002Fstorefront-sdk\u002F2.resources\u002F5.orders-returns-reviews",{"title":316,"path":317,"stem":318},"Customer assistant","\u002Fdocs\u002Fstorefront-sdk\u002Fresources\u002Fassistant","docs\u002Fstorefront-sdk\u002F2.resources\u002F6.assistant",{"title":320,"path":321,"stem":322},"Products in images","\u002Fdocs\u002Fstorefront-sdk\u002Fresources\u002Fproducts-in-images","docs\u002Fstorefront-sdk\u002F2.resources\u002F7.products-in-images",{"title":128,"path":324,"stem":325,"children":326,"page":31},"\u002Fdocs\u002Fstorefront-sdk\u002Fnuxt-layer","docs\u002Fstorefront-sdk\u002F3.nuxt-layer",[327,331,335],{"title":328,"path":329,"stem":330},"Overview","\u002Fdocs\u002Fstorefront-sdk\u002Fnuxt-layer\u002Foverview","docs\u002Fstorefront-sdk\u002F3.nuxt-layer\u002F1.overview",{"title":332,"path":333,"stem":334},"Composables","\u002Fdocs\u002Fstorefront-sdk\u002Fnuxt-layer\u002Fcomposables","docs\u002Fstorefront-sdk\u002F3.nuxt-layer\u002F2.composables",{"title":316,"path":336,"stem":337},"\u002Fdocs\u002Fstorefront-sdk\u002Fnuxt-layer\u002Fassistant","docs\u002Fstorefront-sdk\u002F3.nuxt-layer\u002F3.assistant",{"title":67,"path":339,"stem":340,"children":341,"page":31},"\u002Fdocs\u002Fstorefront-sdk\u002Fnextjs","docs\u002Fstorefront-sdk\u002F4.nextjs",[342,345,349,353],{"title":328,"path":343,"stem":344},"\u002Fdocs\u002Fstorefront-sdk\u002Fnextjs\u002Foverview","docs\u002Fstorefront-sdk\u002F4.nextjs\u002F1.overview",{"title":346,"path":347,"stem":348},"Hooks","\u002Fdocs\u002Fstorefront-sdk\u002Fnextjs\u002Fhooks","docs\u002Fstorefront-sdk\u002F4.nextjs\u002F2.hooks",{"title":350,"path":351,"stem":352},"Server helpers and proxy","\u002Fdocs\u002Fstorefront-sdk\u002Fnextjs\u002Fserver","docs\u002Fstorefront-sdk\u002F4.nextjs\u002F3.server",{"title":354,"path":355,"stem":356},"Components","\u002Fdocs\u002Fstorefront-sdk\u002Fnextjs\u002Fcomponents","docs\u002Fstorefront-sdk\u002F4.nextjs\u002F4.components",{"id":358,"title":308,"body":359,"description":1244,"extension":1245,"links":1246,"meta":1247,"navigation":1254,"path":309,"seo":1255,"stem":310,"__hash__":1256},"docs\u002Fdocs\u002Fstorefront-sdk\u002F2.resources\u002F4.checkout-shipping.md",{"type":360,"value":361,"toc":1228},"minimark",[362,367,376,383,386,530,540,546,549,584,587,591,596,602,605,693,763,773,775,779,795,801,804,883,894,921,927,949,991,1001,1011,1188,1195,1199,1221,1224],[363,364,366],"h2",{"id":365},"checkout","Checkout",[368,369,370,371,375],"p",{},"Access via ",[372,373,374],"code",{},"client.checkout",".",[377,378,380],"h3",{"id":379},"initparams",[372,381,382],{},"init(params)",[368,384,385],{},"Initialize a payment session (Klarna, Stripe, etc.) from a completed cart.",[387,388,393],"pre",{"className":389,"code":390,"language":391,"meta":392,"style":392},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","const session = await client.checkout.init({\n  cartId: cart.id,\n  provider: 'klarna', \u002F\u002F or 'stripe'\n  successUrl: 'https:\u002F\u002Fmystore.com\u002Fcheckout\u002Fconfirmation\u002F{reference}',\n  cancelUrl: 'https:\u002F\u002Fmystore.com\u002Fcart',\n})\n\u002F\u002F → CheckoutResponse { sessionId, snippet?, redirectUrl? }\n","ts","",[372,394,395,435,456,481,498,515,524],{"__ignoreMap":392},[396,397,400,404,408,412,416,419,421,423,425,429,432],"span",{"class":398,"line":399},"line",1,[396,401,403],{"class":402},"spNyl","const",[396,405,407],{"class":406},"sTEyZ"," session ",[396,409,411],{"class":410},"sMK4o","=",[396,413,415],{"class":414},"s7zQu"," await",[396,417,418],{"class":406}," client",[396,420,375],{"class":410},[396,422,365],{"class":406},[396,424,375],{"class":410},[396,426,428],{"class":427},"s2Zo4","init",[396,430,431],{"class":406},"(",[396,433,434],{"class":410},"{\n",[396,436,438,442,445,448,450,453],{"class":398,"line":437},2,[396,439,441],{"class":440},"swJcz","  cartId",[396,443,444],{"class":410},":",[396,446,447],{"class":406}," cart",[396,449,375],{"class":410},[396,451,452],{"class":406},"id",[396,454,455],{"class":410},",\n",[396,457,459,462,464,467,471,474,477],{"class":398,"line":458},3,[396,460,461],{"class":440},"  provider",[396,463,444],{"class":410},[396,465,466],{"class":410}," '",[396,468,470],{"class":469},"sfazB","klarna",[396,472,473],{"class":410},"'",[396,475,476],{"class":410},",",[396,478,480],{"class":479},"sHwdD"," \u002F\u002F or 'stripe'\n",[396,482,484,487,489,491,494,496],{"class":398,"line":483},4,[396,485,486],{"class":440},"  successUrl",[396,488,444],{"class":410},[396,490,466],{"class":410},[396,492,493],{"class":469},"https:\u002F\u002Fmystore.com\u002Fcheckout\u002Fconfirmation\u002F{reference}",[396,495,473],{"class":410},[396,497,455],{"class":410},[396,499,501,504,506,508,511,513],{"class":398,"line":500},5,[396,502,503],{"class":440},"  cancelUrl",[396,505,444],{"class":410},[396,507,466],{"class":410},[396,509,510],{"class":469},"https:\u002F\u002Fmystore.com\u002Fcart",[396,512,473],{"class":410},[396,514,455],{"class":410},[396,516,518,521],{"class":398,"line":517},6,[396,519,520],{"class":410},"}",[396,522,523],{"class":406},")\n",[396,525,527],{"class":398,"line":526},7,[396,528,529],{"class":479},"\u002F\u002F → CheckoutResponse { sessionId, snippet?, redirectUrl? }\n",[368,531,532,533,536,537,375],{},"Embed Klarna's ",[372,534,535],{},"snippet"," HTML or redirect to Stripe's ",[372,538,539],{},"redirectUrl",[377,541,543],{"id":542},"getconfirmationreference",[372,544,545],{},"getConfirmation(reference)",[368,547,548],{},"Load the order confirmation after the customer returns from the payment provider.",[387,550,552],{"className":389,"code":551,"language":391,"meta":392,"style":392},"const confirmation = await client.checkout.getConfirmation(orderReference)\n\u002F\u002F → ConfirmationResponse { order, customer, lineItems, ... }\n",[372,553,554,579],{"__ignoreMap":392},[396,555,556,558,561,563,565,567,569,571,573,576],{"class":398,"line":399},[396,557,403],{"class":402},[396,559,560],{"class":406}," confirmation ",[396,562,411],{"class":410},[396,564,415],{"class":414},[396,566,418],{"class":406},[396,568,375],{"class":410},[396,570,365],{"class":406},[396,572,375],{"class":410},[396,574,575],{"class":427},"getConfirmation",[396,577,578],{"class":406},"(orderReference)\n",[396,580,581],{"class":398,"line":437},[396,582,583],{"class":479},"\u002F\u002F → ConfirmationResponse { order, customer, lineItems, ... }\n",[585,586],"hr",{},[363,588,590],{"id":589},"shipping","Shipping",[368,592,370,593,375],{},[372,594,595],{},"client.shipping",[377,597,599],{"id":598},"getoptionsparams",[372,600,601],{},"getOptions(params)",[368,603,604],{},"Fetch available shipping options for a cart's address and items.",[387,606,608],{"className":389,"code":607,"language":391,"meta":392,"style":392},"const options = await client.shipping.getOptions({\n  cartId: cart.id,\n  countryCode: 'SE',\n  postalCode: '11120',\n})\n\u002F\u002F → ShippingOption[]\n",[372,609,610,636,650,666,682,688],{"__ignoreMap":392},[396,611,612,614,617,619,621,623,625,627,629,632,634],{"class":398,"line":399},[396,613,403],{"class":402},[396,615,616],{"class":406}," options ",[396,618,411],{"class":410},[396,620,415],{"class":414},[396,622,418],{"class":406},[396,624,375],{"class":410},[396,626,589],{"class":406},[396,628,375],{"class":410},[396,630,631],{"class":427},"getOptions",[396,633,431],{"class":406},[396,635,434],{"class":410},[396,637,638,640,642,644,646,648],{"class":398,"line":437},[396,639,441],{"class":440},[396,641,444],{"class":410},[396,643,447],{"class":406},[396,645,375],{"class":410},[396,647,452],{"class":406},[396,649,455],{"class":410},[396,651,652,655,657,659,662,664],{"class":398,"line":458},[396,653,654],{"class":440},"  countryCode",[396,656,444],{"class":410},[396,658,466],{"class":410},[396,660,661],{"class":469},"SE",[396,663,473],{"class":410},[396,665,455],{"class":410},[396,667,668,671,673,675,678,680],{"class":398,"line":483},[396,669,670],{"class":440},"  postalCode",[396,672,444],{"class":410},[396,674,466],{"class":410},[396,676,677],{"class":469},"11120",[396,679,473],{"class":410},[396,681,455],{"class":410},[396,683,684,686],{"class":398,"line":500},[396,685,520],{"class":410},[396,687,523],{"class":406},[396,689,690],{"class":398,"line":517},[396,691,692],{"class":479},"\u002F\u002F → ShippingOption[]\n",[387,694,696],{"className":389,"code":695,"language":391,"meta":392,"style":392},"interface ShippingOption {\n  id: string\n  name: string\n  carrier: string\n  priceIncVat: number\n  estimatedDelivery?: string\n}\n",[372,697,698,710,720,729,738,748,758],{"__ignoreMap":392},[396,699,700,703,707],{"class":398,"line":399},[396,701,702],{"class":402},"interface",[396,704,706],{"class":705},"sBMFI"," ShippingOption",[396,708,709],{"class":410}," {\n",[396,711,712,715,717],{"class":398,"line":437},[396,713,714],{"class":440},"  id",[396,716,444],{"class":410},[396,718,719],{"class":705}," string\n",[396,721,722,725,727],{"class":398,"line":458},[396,723,724],{"class":440},"  name",[396,726,444],{"class":410},[396,728,719],{"class":705},[396,730,731,734,736],{"class":398,"line":483},[396,732,733],{"class":440},"  carrier",[396,735,444],{"class":410},[396,737,719],{"class":705},[396,739,740,743,745],{"class":398,"line":500},[396,741,742],{"class":440},"  priceIncVat",[396,744,444],{"class":410},[396,746,747],{"class":705}," number\n",[396,749,750,753,756],{"class":398,"line":517},[396,751,752],{"class":440},"  estimatedDelivery",[396,754,755],{"class":410},"?:",[396,757,719],{"class":705},[396,759,760],{"class":398,"line":526},[396,761,762],{"class":410},"}\n",[368,764,765,766,375],{},"Select an option with ",[767,768,770],"a",{"href":769},"\u002Fdocs\u002Fstorefront-sdk\u002Fresources\u002Fcart#setshippingcartid-shipping",[372,771,772],{},"client.cart.setShipping()",[585,774],{},[363,776,778],{"id":777},"split-shipments","Split shipments",[368,780,781,782,786,787,790,791,794],{},"When something in the cart is out of stock, the store can let the customer choose between one shipment when everything is available, or what is in stock now and the rest later. Each shipment then gets its own delivery method and its own shipping charge, so one part can be home delivered and another picked up in store. The store turns this on under ",[783,784,785],"strong",{},"Settings → Order routing",". When it is off, ",[372,788,789],{},"getShipmentOptions"," returns ",[372,792,793],{},"enabled: false"," and nothing changes.",[377,796,798],{"id":797},"cartgetshipmentoptionscartid",[372,799,800],{},"cart.getShipmentOptions(cartId)",[368,802,803],{},"What the customer can choose between, against current stock.",[387,805,807],{"className":389,"code":806,"language":391,"meta":392,"style":392},"const options = await client.cart.getShipmentOptions(cart.id)\nif (options.enabled && options.canSplit) {\n  \u002F\u002F options.complete.shipments: one shipment\n  \u002F\u002F options.split.shipments: e.g. [{ items, estimate: { date: '2026-10-02' } },\n  \u002F\u002F                                 { isBackorder: true, items, estimate: { date: '2026-10-20' } }]\n}\n",[372,808,809,838,864,869,874,879],{"__ignoreMap":392},[396,810,811,813,815,817,819,821,823,826,828,830,833,835],{"class":398,"line":399},[396,812,403],{"class":402},[396,814,616],{"class":406},[396,816,411],{"class":410},[396,818,415],{"class":414},[396,820,418],{"class":406},[396,822,375],{"class":410},[396,824,825],{"class":406},"cart",[396,827,375],{"class":410},[396,829,789],{"class":427},[396,831,832],{"class":406},"(cart",[396,834,375],{"class":410},[396,836,837],{"class":406},"id)\n",[396,839,840,843,846,848,851,854,857,859,862],{"class":398,"line":437},[396,841,842],{"class":414},"if",[396,844,845],{"class":406}," (options",[396,847,375],{"class":410},[396,849,850],{"class":406},"enabled ",[396,852,853],{"class":410},"&&",[396,855,856],{"class":406}," options",[396,858,375],{"class":410},[396,860,861],{"class":406},"canSplit) ",[396,863,434],{"class":410},[396,865,866],{"class":398,"line":458},[396,867,868],{"class":479},"  \u002F\u002F options.complete.shipments: one shipment\n",[396,870,871],{"class":398,"line":483},[396,872,873],{"class":479},"  \u002F\u002F options.split.shipments: e.g. [{ items, estimate: { date: '2026-10-02' } },\n",[396,875,876],{"class":398,"line":500},[396,877,878],{"class":479},"  \u002F\u002F                                 { isBackorder: true, items, estimate: { date: '2026-10-20' } }]\n",[396,880,881],{"class":398,"line":517},[396,882,762],{"class":410},[368,884,885,886,889,890,893],{},"Each shipment carries its items, an estimated date and ",[372,887,888],{},"pickupAvailable",". Pickup is only offered where every item in the shipment is on the shelf now, never on a backorder shipment. The dates are estimates; the delivery promise is set on the order when it is created. A date with ",[372,891,892],{},"source: \"stock\""," is the next working day and does not include transport time.",[368,895,896,897,900,901,904,905,908,909,912,913,916,917,920],{},"Free shipping is judged on the whole order's value for every shipment, so splitting never costs the customer free shipping. ",[372,898,899],{},"options.charge"," says what the backorder shipment costs: ",[372,902,903],{},"fixed"," (",[372,906,907],{},"amountIncVat",", even when the order ships free), ",[372,910,911],{},"same-as-order"," (the shipping method's price, free when the order ships free) or ",[372,914,915],{},"free",". The first shipment always costs what its shipping method costs. The options from ",[372,918,919],{},"getShipmentShippingOptions"," for a backorder shipment already carry that price.",[377,922,924],{"id":923},"cartsetshipmentpreferencecartid-preference",[372,925,926],{},"cart.setShipmentPreference(cartId, preference)",[368,928,929,930,933,934,937,938,941,942,945,946,948],{},"Record the choice. ",[372,931,932],{},"\"split\""," splits the cart into ",[372,935,936],{},"cart.shipmentOrders",", one per shipment. ",[372,939,940],{},"\"complete\""," or ",[372,943,944],{},"null"," goes back to one shipment. Changing the cart's contents afterwards (a new line, another quantity) resets the choice, so call ",[372,947,789],{}," again.",[387,950,952],{"className":389,"code":951,"language":391,"meta":392,"style":392},"cart = await client.cart.setShipmentPreference(cart.id, 'split')\n",[372,953,954],{"__ignoreMap":392},[396,955,956,959,961,963,965,967,969,971,974,976,978,980,982,984,987,989],{"class":398,"line":399},[396,957,958],{"class":406},"cart ",[396,960,411],{"class":410},[396,962,415],{"class":414},[396,964,418],{"class":406},[396,966,375],{"class":410},[396,968,825],{"class":406},[396,970,375],{"class":410},[396,972,973],{"class":427},"setShipmentPreference",[396,975,832],{"class":406},[396,977,375],{"class":410},[396,979,452],{"class":406},[396,981,476],{"class":410},[396,983,466],{"class":410},[396,985,986],{"class":469},"split",[396,988,473],{"class":410},[396,990,523],{"class":406},[377,992,994,997,998],{"id":993},"cartgetshipmentshippingoptionscartid-shipmentorderid-postalcode-and-cartsetshipmentshippingcartid-shipmentorderid-params",[372,995,996],{},"cart.getShipmentShippingOptions(cartId, shipmentOrderId, postalCode)"," and ",[372,999,1000],{},"cart.setShipmentShipping(cartId, shipmentOrderId, params)",[368,1002,1003,1004,1007,1008,375],{},"Shipping is chosen per shipment, priced on that shipment's items. In a split cart, ",[372,1005,1006],{},"cart.setShipping"," answers 409 ",[372,1009,1010],{},"CART_IS_SPLIT",[387,1012,1014],{"className":389,"code":1013,"language":391,"meta":392,"style":392},"for (const shipment of cart.shipmentOrders) {\n  const { options, pickupWarehouse } = await client.cart.getShipmentShippingOptions(cart.id, shipment._id, '11120')\n  cart = await client.cart.setShipmentShipping(cart.id, shipment._id, { shippingOptionId: options[0].id, postalCode: '11120' })\n}\n\u002F\u002F cart.shippingLines: one line per shipment, each with its shipmentOrderId\n",[372,1015,1016,1040,1101,1179,1183],{"__ignoreMap":392},[396,1017,1018,1021,1023,1025,1028,1031,1033,1035,1038],{"class":398,"line":399},[396,1019,1020],{"class":414},"for",[396,1022,904],{"class":406},[396,1024,403],{"class":402},[396,1026,1027],{"class":406}," shipment ",[396,1029,1030],{"class":410},"of",[396,1032,447],{"class":406},[396,1034,375],{"class":410},[396,1036,1037],{"class":406},"shipmentOrders) ",[396,1039,434],{"class":410},[396,1041,1042,1045,1048,1050,1052,1055,1058,1061,1063,1065,1067,1069,1071,1073,1075,1077,1079,1081,1083,1086,1088,1091,1093,1095,1097,1099],{"class":398,"line":437},[396,1043,1044],{"class":402},"  const",[396,1046,1047],{"class":410}," {",[396,1049,856],{"class":406},[396,1051,476],{"class":410},[396,1053,1054],{"class":406}," pickupWarehouse",[396,1056,1057],{"class":410}," }",[396,1059,1060],{"class":410}," =",[396,1062,415],{"class":414},[396,1064,418],{"class":406},[396,1066,375],{"class":410},[396,1068,825],{"class":406},[396,1070,375],{"class":410},[396,1072,919],{"class":427},[396,1074,431],{"class":440},[396,1076,825],{"class":406},[396,1078,375],{"class":410},[396,1080,452],{"class":406},[396,1082,476],{"class":410},[396,1084,1085],{"class":406}," shipment",[396,1087,375],{"class":410},[396,1089,1090],{"class":406},"_id",[396,1092,476],{"class":410},[396,1094,466],{"class":410},[396,1096,677],{"class":469},[396,1098,473],{"class":410},[396,1100,523],{"class":440},[396,1102,1103,1106,1108,1110,1112,1114,1116,1118,1121,1123,1125,1127,1129,1131,1133,1135,1137,1139,1141,1144,1146,1148,1151,1155,1158,1160,1162,1164,1167,1169,1171,1173,1175,1177],{"class":398,"line":458},[396,1104,1105],{"class":406},"  cart",[396,1107,1060],{"class":410},[396,1109,415],{"class":414},[396,1111,418],{"class":406},[396,1113,375],{"class":410},[396,1115,825],{"class":406},[396,1117,375],{"class":410},[396,1119,1120],{"class":427},"setShipmentShipping",[396,1122,431],{"class":440},[396,1124,825],{"class":406},[396,1126,375],{"class":410},[396,1128,452],{"class":406},[396,1130,476],{"class":410},[396,1132,1085],{"class":406},[396,1134,375],{"class":410},[396,1136,1090],{"class":406},[396,1138,476],{"class":410},[396,1140,1047],{"class":410},[396,1142,1143],{"class":440}," shippingOptionId",[396,1145,444],{"class":410},[396,1147,856],{"class":406},[396,1149,1150],{"class":440},"[",[396,1152,1154],{"class":1153},"sbssI","0",[396,1156,1157],{"class":440},"]",[396,1159,375],{"class":410},[396,1161,452],{"class":406},[396,1163,476],{"class":410},[396,1165,1166],{"class":440}," postalCode",[396,1168,444],{"class":410},[396,1170,466],{"class":410},[396,1172,677],{"class":469},[396,1174,473],{"class":410},[396,1176,1057],{"class":410},[396,1178,523],{"class":440},[396,1180,1181],{"class":398,"line":483},[396,1182,762],{"class":410},[396,1184,1185],{"class":398,"line":500},[396,1186,1187],{"class":479},"\u002F\u002F cart.shippingLines: one line per shipment, each with its shipmentOrderId\n",[368,1189,1190,1191,1194],{},"A pickup option is only accepted at the shipment's own warehouse (",[372,1192,1193],{},"pickupWarehouse",").",[377,1196,1198],{"id":1197},"at-checkout","At checkout",[368,1200,1201,1204,1205,1208,1209,1212,1213,1216,1217,1220],{},[372,1202,1203],{},"checkout.init"," answers 400 ",[372,1206,1207],{},"SHIPPING_METHOD_REQUIRED"," with ",[372,1210,1211],{},"details.shipmentOrderIds"," when a shipment has no shipping method. If stock changed so that the split no longer holds, it answers 409 ",[372,1214,1215],{},"SHIPMENT_PLAN_CHANGED"," with the new options in ",[372,1218,1219],{},"details.options",": show them to the customer again.",[368,1222,1223],{},"With payment on shipment, each shipment is charged when it ships.",[1225,1226,1227],"style",{},"html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":392,"searchDepth":437,"depth":437,"links":1229},[1230,1234,1237],{"id":365,"depth":437,"text":366,"children":1231},[1232,1233],{"id":379,"depth":458,"text":382},{"id":542,"depth":458,"text":545},{"id":589,"depth":437,"text":590,"children":1235},[1236],{"id":598,"depth":458,"text":601},{"id":777,"depth":437,"text":778,"children":1238},[1239,1240,1241,1243],{"id":797,"depth":458,"text":800},{"id":923,"depth":458,"text":926},{"id":993,"depth":458,"text":1242},"cart.getShipmentShippingOptions(cartId, shipmentOrderId, postalCode) and cart.setShipmentShipping(cartId, shipmentOrderId, params)",{"id":1197,"depth":458,"text":1198},"Payment session initialization and shipping option resolution","md",null,{"questions":1248},{"en":1249},[1250,1251,1252,1253],"How do I start a Klarna or Stripe payment session?","How do I fetch shipping options for a postal code?","How do I let the customer split a cart into several shipments?","What does SHIPMENT_PLAN_CHANGED mean at checkout?",true,{"title":308,"description":1244},"eef7sQa7qGXn0N6EQjVxBRYh82WbCE8vgnN79fnlLcw",[1258,1260],{"title":304,"path":305,"stem":306,"description":1259,"children":-1},"Customer login, registration, magic links, and session management",{"title":312,"path":313,"stem":314,"description":1261,"children":-1},"Order history, self-service returns, and product reviews",1793388940913]