[{"data":1,"prerenderedAt":1298},["ShallowReactive",2],{"navigation_docs":3,"-packages-fluent-php-checkouts":465,"-packages-fluent-php-checkouts-surround":1293},[4,8,62,115,450],{"title":5,"path":6,"stem":7},"Introduction","\u002Fintroduction","0.introduction",{"title":9,"path":10,"stem":11,"children":12,"page":61},"Guides","\u002Fguides","1.guides",[13,17,21,25,29,33,37,41,45,49,53,57],{"title":14,"path":15,"stem":16},"Quickstart","\u002Fguides\u002Fquickstart","1.guides\u002F1.quickstart",{"title":18,"path":19,"stem":20},"Payouts & Settlement","\u002Fguides\u002Fpayouts","1.guides\u002F10.payouts",{"title":22,"path":23,"stem":24},"Customer Emails","\u002Fguides\u002Fcustomer-emails","1.guides\u002F11.customer-emails",{"title":26,"path":27,"stem":28},"Build your own integration","\u002Fguides\u002Fbuild-your-own-integration","1.guides\u002F2.build-your-own-integration",{"title":30,"path":31,"stem":32},"Selling Workflow","\u002Fguides\u002Fselling-workflow","1.guides\u002F2.selling-workflow",{"title":34,"path":35,"stem":36},"Vatly SDKs","\u002Fguides\u002Fsdks","1.guides\u002F3.sdks",{"title":38,"path":39,"stem":40},"Authentication","\u002Fguides\u002Fauthentication","1.guides\u002F4.authentication",{"title":42,"path":43,"stem":44},"Pagination","\u002Fguides\u002Fpagination","1.guides\u002F5.pagination",{"title":46,"path":47,"stem":48},"Errors","\u002Fguides\u002Ferrors","1.guides\u002F6.errors",{"title":50,"path":51,"stem":52},"Webhooks","\u002Fguides\u002Fwebhooks","1.guides\u002F7.webhooks",{"title":54,"path":55,"stem":56},"Idempotency","\u002Fguides\u002Fidempotency","1.guides\u002F8.idempotency",{"title":58,"path":59,"stem":60},"Testing","\u002Fguides\u002Ftesting","1.guides\u002F9.testing",false,{"title":63,"path":64,"stem":65,"children":66,"page":61},"Api Reference","\u002Fapi-reference","2.api-reference",[67,71,75,79,83,87,91,95,99,103,107,111],{"title":68,"path":69,"stem":70},"Customers","\u002Fapi-reference\u002Fcustomers","2.api-reference\u002F1.customers",{"title":72,"path":73,"stem":74},"Webhook Endpoints","\u002Fapi-reference\u002Fwebhook-endpoints","2.api-reference\u002F10.webhook-endpoints",{"title":76,"path":77,"stem":78},"Test helpers","\u002Fapi-reference\u002Ftest-helpers","2.api-reference\u002F11.test-helpers",{"title":80,"path":81,"stem":82},"Checkouts","\u002Fapi-reference\u002Fcheckouts","2.api-reference\u002F2.checkouts",{"title":84,"path":85,"stem":86},"One-off Products","\u002Fapi-reference\u002Fone-off-products","2.api-reference\u002F3.one-off-products",{"title":88,"path":89,"stem":90},"Subscriptions","\u002Fapi-reference\u002Fsubscriptions","2.api-reference\u002F4.subscriptions",{"title":92,"path":93,"stem":94},"Subscription Plans","\u002Fapi-reference\u002Fsubscription-plans","2.api-reference\u002F5.subscription-plans",{"title":96,"path":97,"stem":98},"Orders","\u002Fapi-reference\u002Forders","2.api-reference\u002F6.orders",{"title":100,"path":101,"stem":102},"Order Refunds","\u002Fapi-reference\u002Frefunds","2.api-reference\u002F7.refunds",{"title":104,"path":105,"stem":106},"Refunds","\u002Fapi-reference\u002Fglobal-refunds","2.api-reference\u002F8.global-refunds",{"title":108,"path":109,"stem":110},"Chargebacks","\u002Fapi-reference\u002Fchargebacks","2.api-reference\u002F9.chargebacks",{"title":112,"path":113,"stem":114},"Webhook Events","\u002Fapi-reference\u002Fwebhook-events","2.api-reference\u002F99.webhook-events",{"title":116,"path":117,"stem":118,"children":119},"Packages","\u002Fpackages","3.packages",[120,122,164,210,244,283,318,366,408],{"title":116,"path":117,"stem":121},"3.packages\u002Findex",{"title":123,"path":124,"stem":125,"children":126,"page":61},"PHP SDK","\u002Fpackages\u002Fphp","3.packages\u002F1.php",[127,131,134,137,140,144,147,151,154,157,160],{"title":128,"path":129,"stem":130},"Getting started","\u002Fpackages\u002Fphp\u002Freadme","3.packages\u002F1.php\u002F00.readme",{"title":68,"path":132,"stem":133},"\u002Fpackages\u002Fphp\u002Fcustomers","3.packages\u002F1.php\u002F02.customers",{"title":80,"path":135,"stem":136},"\u002Fpackages\u002Fphp\u002Fcheckouts","3.packages\u002F1.php\u002F03.checkouts",{"title":88,"path":138,"stem":139},"\u002Fpackages\u002Fphp\u002Fsubscriptions","3.packages\u002F1.php\u002F04.subscriptions",{"title":141,"path":142,"stem":143},"Subscription plans","\u002Fpackages\u002Fphp\u002Fsubscriptionplans","3.packages\u002F1.php\u002F05.subscriptionplans",{"title":96,"path":145,"stem":146},"\u002Fpackages\u002Fphp\u002Forders","3.packages\u002F1.php\u002F06.orders",{"title":148,"path":149,"stem":150},"One-off products","\u002Fpackages\u002Fphp\u002Foneoffproducts","3.packages\u002F1.php\u002F07.oneoffproducts",{"title":104,"path":152,"stem":153},"\u002Fpackages\u002Fphp\u002Frefunds","3.packages\u002F1.php\u002F08.refunds",{"title":108,"path":155,"stem":156},"\u002Fpackages\u002Fphp\u002Fchargebacks","3.packages\u002F1.php\u002F09.chargebacks",{"title":50,"path":158,"stem":159},"\u002Fpackages\u002Fphp\u002Fwebhooks","3.packages\u002F1.php\u002F10.webhooks",{"title":161,"path":162,"stem":163},"Webhook URLs","\u002Fpackages\u002Fphp\u002Fwebhookendpoints","3.packages\u002F1.php\u002F11.webhookendpoints",{"title":165,"path":166,"stem":167,"children":168,"page":61},"PHP Fluent","\u002Fpackages\u002Ffluent-php","3.packages\u002F2.fluent-php",[169,172,176,180,183,186,189,192,196,199,203,207],{"title":128,"path":170,"stem":171},"\u002Fpackages\u002Ffluent-php\u002Freadme","3.packages\u002F2.fluent-php\u002F00.readme",{"title":173,"path":174,"stem":175},"Configuration","\u002Fpackages\u002Ffluent-php\u002Fconfiguration","3.packages\u002F2.fluent-php\u002F01.configuration",{"title":177,"path":178,"stem":179},"Core concepts","\u002Fpackages\u002Ffluent-php\u002Fcoreconcepts","3.packages\u002F2.fluent-php\u002F02.coreconcepts",{"title":68,"path":181,"stem":182},"\u002Fpackages\u002Ffluent-php\u002Fcustomers","3.packages\u002F2.fluent-php\u002F03.customers",{"title":80,"path":184,"stem":185},"\u002Fpackages\u002Ffluent-php\u002Fcheckouts","3.packages\u002F2.fluent-php\u002F04.checkouts",{"title":88,"path":187,"stem":188},"\u002Fpackages\u002Ffluent-php\u002Fsubscriptions","3.packages\u002F2.fluent-php\u002F05.subscriptions",{"title":96,"path":190,"stem":191},"\u002Fpackages\u002Ffluent-php\u002Forders","3.packages\u002F2.fluent-php\u002F06.orders",{"title":193,"path":194,"stem":195},"Customer portal","\u002Fpackages\u002Ffluent-php\u002Fcustomerportal","3.packages\u002F2.fluent-php\u002F07.customerportal",{"title":50,"path":197,"stem":198},"\u002Fpackages\u002Ffluent-php\u002Fwebhooks","3.packages\u002F2.fluent-php\u002F08.webhooks",{"title":200,"path":201,"stem":202},"Webhook event flow","\u002Fpackages\u002Ffluent-php\u002Fwebhook-flow","3.packages\u002F2.fluent-php\u002F09.webhook-flow",{"title":204,"path":205,"stem":206},"Existing tables","\u002Fpackages\u002Ffluent-php\u002Fhost-owns-its-tables","3.packages\u002F2.fluent-php\u002F10.host-owns-its-tables",{"title":58,"path":208,"stem":209},"\u002Fpackages\u002Ffluent-php\u002Ftesting","3.packages\u002F2.fluent-php\u002F11.testing",{"title":211,"path":212,"stem":213,"children":214,"page":61},"Laravel","\u002Fpackages\u002Flaravel","3.packages\u002F3.laravel",[215,218,221,224,227,230,233,236,240],{"title":128,"path":216,"stem":217},"\u002Fpackages\u002Flaravel\u002Freadme","3.packages\u002F3.laravel\u002F00.readme",{"title":173,"path":219,"stem":220},"\u002Fpackages\u002Flaravel\u002Fconfiguration","3.packages\u002F3.laravel\u002F01.configuration",{"title":68,"path":222,"stem":223},"\u002Fpackages\u002Flaravel\u002Fcustomers","3.packages\u002F3.laravel\u002F02.customers",{"title":80,"path":225,"stem":226},"\u002Fpackages\u002Flaravel\u002Fcheckouts","3.packages\u002F3.laravel\u002F03.checkouts",{"title":88,"path":228,"stem":229},"\u002Fpackages\u002Flaravel\u002Fsubscriptions","3.packages\u002F3.laravel\u002F04.subscriptions",{"title":96,"path":231,"stem":232},"\u002Fpackages\u002Flaravel\u002Forders","3.packages\u002F3.laravel\u002F05.orders",{"title":50,"path":234,"stem":235},"\u002Fpackages\u002Flaravel\u002Fwebhooks","3.packages\u002F3.laravel\u002F06.webhooks",{"title":237,"path":238,"stem":239},"Comparison","\u002Fpackages\u002Flaravel\u002Fcomparison","3.packages\u002F3.laravel\u002F07.comparison",{"title":241,"path":242,"stem":243},"Migrating from Cashier","\u002Fpackages\u002Flaravel\u002Fmigrating-to-vatly","3.packages\u002F3.laravel\u002F08.migrating-to-vatly",{"title":245,"path":246,"stem":247,"children":248,"page":61},"JavaScript SDK","\u002Fpackages\u002Fjavascript","3.packages\u002F4.javascript",[249,252,255,258,261,264,267,270,273,276,279],{"title":128,"path":250,"stem":251},"\u002Fpackages\u002Fjavascript\u002Freadme","3.packages\u002F4.javascript\u002F00.readme",{"title":68,"path":253,"stem":254},"\u002Fpackages\u002Fjavascript\u002Fcustomers","3.packages\u002F4.javascript\u002F02.customers",{"title":80,"path":256,"stem":257},"\u002Fpackages\u002Fjavascript\u002Fcheckouts","3.packages\u002F4.javascript\u002F03.checkouts",{"title":88,"path":259,"stem":260},"\u002Fpackages\u002Fjavascript\u002Fsubscriptions","3.packages\u002F4.javascript\u002F04.subscriptions",{"title":141,"path":262,"stem":263},"\u002Fpackages\u002Fjavascript\u002Fsubscriptionplans","3.packages\u002F4.javascript\u002F05.subscriptionplans",{"title":96,"path":265,"stem":266},"\u002Fpackages\u002Fjavascript\u002Forders","3.packages\u002F4.javascript\u002F06.orders",{"title":148,"path":268,"stem":269},"\u002Fpackages\u002Fjavascript\u002Foneoffproducts","3.packages\u002F4.javascript\u002F07.oneoffproducts",{"title":104,"path":271,"stem":272},"\u002Fpackages\u002Fjavascript\u002Frefunds","3.packages\u002F4.javascript\u002F08.refunds",{"title":108,"path":274,"stem":275},"\u002Fpackages\u002Fjavascript\u002Fchargebacks","3.packages\u002F4.javascript\u002F09.chargebacks",{"title":50,"path":277,"stem":278},"\u002Fpackages\u002Fjavascript\u002Fwebhooks","3.packages\u002F4.javascript\u002F10.webhooks",{"title":280,"path":281,"stem":282},"API reference","\u002Fpackages\u002Fjavascript\u002Fapi","3.packages\u002F4.javascript\u002F12.api",{"title":284,"path":285,"stem":286,"children":287,"page":61},"JavaScript Fluent","\u002Fpackages\u002Ffluent-js","3.packages\u002F5.fluent-js",[288,291,294,297,300,303,306,309,312,315],{"title":128,"path":289,"stem":290},"\u002Fpackages\u002Ffluent-js\u002Freadme","3.packages\u002F5.fluent-js\u002F00.readme",{"title":173,"path":292,"stem":293},"\u002Fpackages\u002Ffluent-js\u002Fconfiguration","3.packages\u002F5.fluent-js\u002F01.configuration",{"title":177,"path":295,"stem":296},"\u002Fpackages\u002Ffluent-js\u002Fcoreconcepts","3.packages\u002F5.fluent-js\u002F02.coreconcepts",{"title":68,"path":298,"stem":299},"\u002Fpackages\u002Ffluent-js\u002Fcustomers","3.packages\u002F5.fluent-js\u002F03.customers",{"title":80,"path":301,"stem":302},"\u002Fpackages\u002Ffluent-js\u002Fcheckouts","3.packages\u002F5.fluent-js\u002F04.checkouts",{"title":88,"path":304,"stem":305},"\u002Fpackages\u002Ffluent-js\u002Fsubscriptions","3.packages\u002F5.fluent-js\u002F05.subscriptions",{"title":96,"path":307,"stem":308},"\u002Fpackages\u002Ffluent-js\u002Forders","3.packages\u002F5.fluent-js\u002F06.orders",{"title":193,"path":310,"stem":311},"\u002Fpackages\u002Ffluent-js\u002Fcustomerportal","3.packages\u002F5.fluent-js\u002F07.customerportal",{"title":50,"path":313,"stem":314},"\u002Fpackages\u002Ffluent-js\u002Fwebhooks","3.packages\u002F5.fluent-js\u002F08.webhooks",{"title":58,"path":316,"stem":317},"\u002Fpackages\u002Ffluent-js\u002Ftesting","3.packages\u002F5.fluent-js\u002F11.testing",{"title":319,"path":320,"stem":321,"children":322,"page":61},"Python SDK","\u002Fpackages\u002Fpython","3.packages\u002F6.python",[323,326,329,332,335,338,341,344,347,350,353,356,359,362],{"title":128,"path":324,"stem":325},"\u002Fpackages\u002Fpython\u002Freadme","3.packages\u002F6.python\u002F00.readme",{"title":173,"path":327,"stem":328},"\u002Fpackages\u002Fpython\u002Fconfiguration","3.packages\u002F6.python\u002F01.configuration",{"title":68,"path":330,"stem":331},"\u002Fpackages\u002Fpython\u002Fcustomers","3.packages\u002F6.python\u002F02.customers",{"title":80,"path":333,"stem":334},"\u002Fpackages\u002Fpython\u002Fcheckouts","3.packages\u002F6.python\u002F03.checkouts",{"title":88,"path":336,"stem":337},"\u002Fpackages\u002Fpython\u002Fsubscriptions","3.packages\u002F6.python\u002F04.subscriptions",{"title":141,"path":339,"stem":340},"\u002Fpackages\u002Fpython\u002Fsubscriptionplans","3.packages\u002F6.python\u002F05.subscriptionplans",{"title":96,"path":342,"stem":343},"\u002Fpackages\u002Fpython\u002Forders","3.packages\u002F6.python\u002F06.orders",{"title":148,"path":345,"stem":346},"\u002Fpackages\u002Fpython\u002Foneoffproducts","3.packages\u002F6.python\u002F07.oneoffproducts",{"title":104,"path":348,"stem":349},"\u002Fpackages\u002Fpython\u002Frefunds","3.packages\u002F6.python\u002F08.refunds",{"title":108,"path":351,"stem":352},"\u002Fpackages\u002Fpython\u002Fchargebacks","3.packages\u002F6.python\u002F09.chargebacks",{"title":50,"path":354,"stem":355},"\u002Fpackages\u002Fpython\u002Fwebhooks","3.packages\u002F6.python\u002F10.webhooks",{"title":161,"path":357,"stem":358},"\u002Fpackages\u002Fpython\u002Fwebhookendpoints","3.packages\u002F6.python\u002F11.webhookendpoints",{"title":280,"path":360,"stem":361},"\u002Fpackages\u002Fpython\u002Fapi","3.packages\u002F6.python\u002F12.api",{"title":363,"path":364,"stem":365},"Development","\u002Fpackages\u002Fpython\u002Fdevelopment","3.packages\u002F6.python\u002F13.development",{"title":367,"path":368,"stem":369,"children":370,"page":61},"Python Fluent","\u002Fpackages\u002Ffluent-python","3.packages\u002F7.fluent-python",[371,374,377,380,383,386,389,392,395,398,401,405],{"title":128,"path":372,"stem":373},"\u002Fpackages\u002Ffluent-python\u002Freadme","3.packages\u002F7.fluent-python\u002F00.readme",{"title":173,"path":375,"stem":376},"\u002Fpackages\u002Ffluent-python\u002Fconfiguration","3.packages\u002F7.fluent-python\u002F01.configuration",{"title":177,"path":378,"stem":379},"\u002Fpackages\u002Ffluent-python\u002Fcoreconcepts","3.packages\u002F7.fluent-python\u002F02.coreconcepts",{"title":68,"path":381,"stem":382},"\u002Fpackages\u002Ffluent-python\u002Fcustomers","3.packages\u002F7.fluent-python\u002F03.customers",{"title":80,"path":384,"stem":385},"\u002Fpackages\u002Ffluent-python\u002Fcheckouts","3.packages\u002F7.fluent-python\u002F04.checkouts",{"title":88,"path":387,"stem":388},"\u002Fpackages\u002Ffluent-python\u002Fsubscriptions","3.packages\u002F7.fluent-python\u002F05.subscriptions",{"title":96,"path":390,"stem":391},"\u002Fpackages\u002Ffluent-python\u002Forders","3.packages\u002F7.fluent-python\u002F06.orders",{"title":193,"path":393,"stem":394},"\u002Fpackages\u002Ffluent-python\u002Fcustomerportal","3.packages\u002F7.fluent-python\u002F07.customerportal",{"title":50,"path":396,"stem":397},"\u002Fpackages\u002Ffluent-python\u002Fwebhooks","3.packages\u002F7.fluent-python\u002F08.webhooks",{"title":58,"path":399,"stem":400},"\u002Fpackages\u002Ffluent-python\u002Ftesting","3.packages\u002F7.fluent-python\u002F11.testing",{"title":402,"path":403,"stem":404},"Porting","\u002Fpackages\u002Ffluent-python\u002Fporting","3.packages\u002F7.fluent-python\u002F12.porting",{"title":363,"path":406,"stem":407},"\u002Fpackages\u002Ffluent-python\u002Fdevelopment","3.packages\u002F7.fluent-python\u002F13.development",{"title":409,"path":410,"stem":411,"children":412,"page":61},"Django","\u002Fpackages\u002Fdjango","3.packages\u002F8.django",[413,416,420,423,427,431,434,437,440,444,447],{"title":128,"path":414,"stem":415},"\u002Fpackages\u002Fdjango\u002Freadme","3.packages\u002F8.django\u002F00.readme",{"title":417,"path":418,"stem":419},"Installation","\u002Fpackages\u002Fdjango\u002Finstallation","3.packages\u002F8.django\u002F01.installation",{"title":173,"path":421,"stem":422},"\u002Fpackages\u002Fdjango\u002Fconfiguration","3.packages\u002F8.django\u002F02.configuration",{"title":424,"path":425,"stem":426},"Billable models","\u002Fpackages\u002Fdjango\u002Fbillablemodels","3.packages\u002F8.django\u002F03.billablemodels",{"title":428,"path":429,"stem":430},"Checkout","\u002Fpackages\u002Fdjango\u002Fcheckout","3.packages\u002F8.django\u002F04.checkout",{"title":88,"path":432,"stem":433},"\u002Fpackages\u002Fdjango\u002Fbilling","3.packages\u002F8.django\u002F05.billing",{"title":193,"path":435,"stem":436},"\u002Fpackages\u002Fdjango\u002Fcustomerportal","3.packages\u002F8.django\u002F06.customerportal",{"title":50,"path":438,"stem":439},"\u002Fpackages\u002Fdjango\u002Fwebhooks","3.packages\u002F8.django\u002F07.webhooks",{"title":441,"path":442,"stem":443},"Admin","\u002Fpackages\u002Fdjango\u002Fadmin","3.packages\u002F8.django\u002F08.admin",{"title":58,"path":445,"stem":446},"\u002Fpackages\u002Fdjango\u002Ftesting","3.packages\u002F8.django\u002F09.testing",{"title":363,"path":448,"stem":449},"\u002Fpackages\u002Fdjango\u002Fdevelopment","3.packages\u002F8.django\u002F10.development",{"title":451,"path":452,"stem":453,"children":454},"Integrations","\u002Fintegrations","4.integrations",[455,457,461],{"title":451,"path":452,"stem":456},"4.integrations\u002Findex",{"title":458,"path":459,"stem":460},"Lovable payments with Vatly","\u002Fintegrations\u002Flovable","4.integrations\u002F1.lovable",{"title":462,"path":463,"stem":464},"Bolt payments with Vatly","\u002Fintegrations\u002Fbolt","4.integrations\u002F2.bolt",{"id":466,"title":80,"body":467,"description":1286,"extension":1287,"links":1288,"meta":1289,"navigation":1290,"path":184,"seo":1291,"stem":185,"__hash__":1292},"docs\u002F3.packages\u002F2.fluent-php\u002F04.checkouts.md",{"type":468,"value":469,"toc":1280},"minimark",[470,479,484,751,762,769,773,780,1030,1045,1055,1059,1062,1249,1258,1262,1276],[471,472,473,474,478],"p",{},"Create a hosted payment page, then redirect the browser to its URL. These examples use a configured ",[475,476,477],"code",{},"$vatly"," and a customer your signed-in user is allowed to use.",[480,481,483],"h2",{"id":482},"sell-a-one-off-product","Sell a one-off product",[485,486,491],"pre",{"className":487,"code":488,"language":489,"meta":490,"style":490},"language-php shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","use Vatly\\Fluent\\CustomerProfile;\n\n$checkout = $vatly->checkoutBuilder(new CustomerProfile(vatlyId: 'customer_example'))\n    ->withLocale('nl')\n    ->withMetadata(['host_order_id' => 'order_42'])\n    ->create(\n        [['id' => 'one_off_product_example', 'quantity' => 2]],\n        'https:\u002F\u002Fapp.example.com\u002Forders\u002Freturn',\n        'https:\u002F\u002Fapp.example.com\u002Fcart',\n    );\n$url = $checkout->links->checkoutUrl->href;\n","php","",[475,492,493,521,528,584,605,636,647,687,701,713,719],{"__ignoreMap":490},[494,495,498,502,506,510,513,515,518],"span",{"class":496,"line":497},"line",1,[494,499,501],{"class":500},"sbssI","use",[494,503,505],{"class":504},"sTEyZ"," Vatly",[494,507,509],{"class":508},"sMK4o","\\",[494,511,512],{"class":504},"Fluent",[494,514,509],{"class":508},[494,516,517],{"class":504},"CustomerProfile",[494,519,520],{"class":508},";\n",[494,522,524],{"class":496,"line":523},2,[494,525,527],{"emptyLinePlaceholder":526},true,"\n",[494,529,531,534,537,540,543,546,549,553,556,559,563,565,568,571,574,578,581],{"class":496,"line":530},3,[494,532,533],{"class":508},"$",[494,535,536],{"class":504},"checkout ",[494,538,539],{"class":508},"=",[494,541,542],{"class":508}," $",[494,544,545],{"class":504},"vatly",[494,547,548],{"class":508},"->",[494,550,552],{"class":551},"s2Zo4","checkoutBuilder",[494,554,555],{"class":508},"(",[494,557,558],{"class":500},"new",[494,560,562],{"class":561},"sBMFI"," CustomerProfile",[494,564,555],{"class":508},[494,566,567],{"class":561},"vatlyId",[494,569,570],{"class":508},":",[494,572,573],{"class":508}," '",[494,575,577],{"class":576},"sfazB","customer_example",[494,579,580],{"class":508},"'",[494,582,583],{"class":508},"))\n",[494,585,587,590,593,595,597,600,602],{"class":496,"line":586},4,[494,588,589],{"class":508},"    ->",[494,591,592],{"class":551},"withLocale",[494,594,555],{"class":508},[494,596,580],{"class":508},[494,598,599],{"class":576},"nl",[494,601,580],{"class":508},[494,603,604],{"class":508},")\n",[494,606,608,610,613,616,618,621,623,626,628,631,633],{"class":496,"line":607},5,[494,609,589],{"class":508},[494,611,612],{"class":551},"withMetadata",[494,614,615],{"class":508},"([",[494,617,580],{"class":508},[494,619,620],{"class":576},"host_order_id",[494,622,580],{"class":508},[494,624,625],{"class":508}," =>",[494,627,573],{"class":508},[494,629,630],{"class":576},"order_42",[494,632,580],{"class":508},[494,634,635],{"class":508},"])\n",[494,637,639,641,644],{"class":496,"line":638},6,[494,640,589],{"class":508},[494,642,643],{"class":551},"create",[494,645,646],{"class":508},"(\n",[494,648,650,653,655,658,660,662,664,667,669,672,674,677,679,681,684],{"class":496,"line":649},7,[494,651,652],{"class":508},"        [[",[494,654,580],{"class":508},[494,656,657],{"class":576},"id",[494,659,580],{"class":508},[494,661,625],{"class":508},[494,663,573],{"class":508},[494,665,666],{"class":576},"one_off_product_example",[494,668,580],{"class":508},[494,670,671],{"class":508},",",[494,673,573],{"class":508},[494,675,676],{"class":576},"quantity",[494,678,580],{"class":508},[494,680,625],{"class":508},[494,682,683],{"class":500}," 2",[494,685,686],{"class":508},"]],\n",[494,688,690,693,696,698],{"class":496,"line":689},8,[494,691,692],{"class":508},"        '",[494,694,695],{"class":576},"https:\u002F\u002Fapp.example.com\u002Forders\u002Freturn",[494,697,580],{"class":508},[494,699,700],{"class":508},",\n",[494,702,704,706,709,711],{"class":496,"line":703},9,[494,705,692],{"class":508},[494,707,708],{"class":576},"https:\u002F\u002Fapp.example.com\u002Fcart",[494,710,580],{"class":508},[494,712,700],{"class":508},[494,714,716],{"class":496,"line":715},10,[494,717,718],{"class":508},"    );\n",[494,720,722,724,727,729,731,734,736,739,741,744,746,749],{"class":496,"line":721},11,[494,723,533],{"class":508},[494,725,726],{"class":504},"url ",[494,728,539],{"class":508},[494,730,542],{"class":508},[494,732,733],{"class":504},"checkout",[494,735,548],{"class":508},[494,737,738],{"class":504},"links",[494,740,548],{"class":508},[494,742,743],{"class":504},"checkoutUrl",[494,745,548],{"class":508},[494,747,748],{"class":504},"href",[494,750,520],{"class":508},[471,752,753,754,757,758,761],{},"Replace the example product and customer IDs with records from your storefront and mode. Product IDs refer to configured products, not names or arbitrary SKUs. Create products in the dashboard or through ",[475,755,756],{},"oneOffProducts()"," and ",[475,759,760],{},"subscriptionPlans()",".",[471,763,764,765,768],{},"The ",[475,766,767],{},"create()"," URLs are required even if you set configuration defaults. Build a fresh builder for each checkout; reusing one can accumulate items. Metadata should contain server-chosen routing IDs, not secrets or untrusted ownership claims.",[480,770,772],{"id":771},"start-a-subscription","Start a subscription",[471,774,775,776,779],{},"Set redirect defaults in ",[777,778,173],"a",{"href":174},", or override them on the builder:",[485,781,783],{"className":487,"code":782,"language":489,"meta":490,"style":490},"use Vatly\\Fluent\\CustomerProfile;\n\n$checkout = $vatly->subscriptionBuilder(new CustomerProfile(vatlyId: 'customer_example'))\n    ->toPlan('subscription_plan_example')\n    ->withQuantity(3)\n    ->withTrialDays(14)\n    ->withBillingAddress([\n        'companyName' => 'Example BV',\n        'city' => 'Amsterdam',\n        'country' => 'NL',\n    ])\n    ->create(['metadata' => ['host_account_id' => 'team_42']]);\n$url = $checkout->links->checkoutUrl->href;\n",[475,784,785,801,805,842,860,874,888,898,918,938,958,963,1003],{"__ignoreMap":490},[494,786,787,789,791,793,795,797,799],{"class":496,"line":497},[494,788,501],{"class":500},[494,790,505],{"class":504},[494,792,509],{"class":508},[494,794,512],{"class":504},[494,796,509],{"class":508},[494,798,517],{"class":504},[494,800,520],{"class":508},[494,802,803],{"class":496,"line":523},[494,804,527],{"emptyLinePlaceholder":526},[494,806,807,809,811,813,815,817,819,822,824,826,828,830,832,834,836,838,840],{"class":496,"line":530},[494,808,533],{"class":508},[494,810,536],{"class":504},[494,812,539],{"class":508},[494,814,542],{"class":508},[494,816,545],{"class":504},[494,818,548],{"class":508},[494,820,821],{"class":551},"subscriptionBuilder",[494,823,555],{"class":508},[494,825,558],{"class":500},[494,827,562],{"class":561},[494,829,555],{"class":508},[494,831,567],{"class":561},[494,833,570],{"class":508},[494,835,573],{"class":508},[494,837,577],{"class":576},[494,839,580],{"class":508},[494,841,583],{"class":508},[494,843,844,846,849,851,853,856,858],{"class":496,"line":586},[494,845,589],{"class":508},[494,847,848],{"class":551},"toPlan",[494,850,555],{"class":508},[494,852,580],{"class":508},[494,854,855],{"class":576},"subscription_plan_example",[494,857,580],{"class":508},[494,859,604],{"class":508},[494,861,862,864,867,869,872],{"class":496,"line":607},[494,863,589],{"class":508},[494,865,866],{"class":551},"withQuantity",[494,868,555],{"class":508},[494,870,871],{"class":500},"3",[494,873,604],{"class":508},[494,875,876,878,881,883,886],{"class":496,"line":638},[494,877,589],{"class":508},[494,879,880],{"class":551},"withTrialDays",[494,882,555],{"class":508},[494,884,885],{"class":500},"14",[494,887,604],{"class":508},[494,889,890,892,895],{"class":496,"line":649},[494,891,589],{"class":508},[494,893,894],{"class":551},"withBillingAddress",[494,896,897],{"class":508},"([\n",[494,899,900,902,905,907,909,911,914,916],{"class":496,"line":689},[494,901,692],{"class":508},[494,903,904],{"class":576},"companyName",[494,906,580],{"class":508},[494,908,625],{"class":508},[494,910,573],{"class":508},[494,912,913],{"class":576},"Example BV",[494,915,580],{"class":508},[494,917,700],{"class":508},[494,919,920,922,925,927,929,931,934,936],{"class":496,"line":703},[494,921,692],{"class":508},[494,923,924],{"class":576},"city",[494,926,580],{"class":508},[494,928,625],{"class":508},[494,930,573],{"class":508},[494,932,933],{"class":576},"Amsterdam",[494,935,580],{"class":508},[494,937,700],{"class":508},[494,939,940,942,945,947,949,951,954,956],{"class":496,"line":715},[494,941,692],{"class":508},[494,943,944],{"class":576},"country",[494,946,580],{"class":508},[494,948,625],{"class":508},[494,950,573],{"class":508},[494,952,953],{"class":576},"NL",[494,955,580],{"class":508},[494,957,700],{"class":508},[494,959,960],{"class":496,"line":721},[494,961,962],{"class":508},"    ])\n",[494,964,966,968,970,972,974,977,979,981,984,986,989,991,993,995,998,1000],{"class":496,"line":965},12,[494,967,589],{"class":508},[494,969,643],{"class":551},[494,971,615],{"class":508},[494,973,580],{"class":508},[494,975,976],{"class":576},"metadata",[494,978,580],{"class":508},[494,980,625],{"class":508},[494,982,983],{"class":508}," [",[494,985,580],{"class":508},[494,987,988],{"class":576},"host_account_id",[494,990,580],{"class":508},[494,992,625],{"class":508},[494,994,573],{"class":508},[494,996,997],{"class":576},"team_42",[494,999,580],{"class":508},[494,1001,1002],{"class":508},"]]);\n",[494,1004,1006,1008,1010,1012,1014,1016,1018,1020,1022,1024,1026,1028],{"class":496,"line":1005},13,[494,1007,533],{"class":508},[494,1009,726],{"class":504},[494,1011,539],{"class":508},[494,1013,542],{"class":508},[494,1015,733],{"class":504},[494,1017,548],{"class":508},[494,1019,738],{"class":504},[494,1021,548],{"class":508},[494,1023,743],{"class":504},[494,1025,548],{"class":508},[494,1027,748],{"class":504},[494,1029,520],{"class":508},[471,1031,1032,1033,1036,1037,1040,1041,1044],{},"The result is a checkout, not a local subscription. ",[475,1034,1035],{},"subscription.started"," creates the local record through your repository. ",[475,1038,1039],{},"withTrialDays()"," requires a positive whole number. ",[475,1042,1043],{},"withTrialEndsAt()"," rounds a future end time up to whole days. If you omit the trial, the API applies any plan-level default.",[471,1046,1047,1048,757,1051,1054],{},"Both builders support ",[475,1049,1050],{},"withLocale()",[475,1052,1053],{},"withBillingAddress()",". Address values prefill hosted fields; the customer can still edit them. A supplied country takes precedence over IP detection. A supplied tax ID is registered only when checkout is submitted.",[480,1056,1058],{"id":1057},"override-a-price","Override a price",[471,1060,1061],{},"Use decimal strings, not floats or integer cents, in an API product price:",[485,1063,1065],{"className":487,"code":1064,"language":489,"meta":490,"style":490},"use Vatly\\Fluent\\CustomerProfile;\n\n$checkout = $vatly->checkoutBuilder(new CustomerProfile(vatlyId: 'customer_example'))\n    ->create(\n        [[\n            'id' => 'one_off_product_example',\n            'quantity' => 1,\n            'price' => ['value' => '49.99', 'currency' => 'EUR'],\n        ]],\n        'https:\u002F\u002Fapp.example.com\u002Forders\u002Freturn',\n        'https:\u002F\u002Fapp.example.com\u002Fcart',\n    );\n",[475,1066,1067,1083,1087,1123,1131,1136,1155,1170,1220,1225,1235,1245],{"__ignoreMap":490},[494,1068,1069,1071,1073,1075,1077,1079,1081],{"class":496,"line":497},[494,1070,501],{"class":500},[494,1072,505],{"class":504},[494,1074,509],{"class":508},[494,1076,512],{"class":504},[494,1078,509],{"class":508},[494,1080,517],{"class":504},[494,1082,520],{"class":508},[494,1084,1085],{"class":496,"line":523},[494,1086,527],{"emptyLinePlaceholder":526},[494,1088,1089,1091,1093,1095,1097,1099,1101,1103,1105,1107,1109,1111,1113,1115,1117,1119,1121],{"class":496,"line":530},[494,1090,533],{"class":508},[494,1092,536],{"class":504},[494,1094,539],{"class":508},[494,1096,542],{"class":508},[494,1098,545],{"class":504},[494,1100,548],{"class":508},[494,1102,552],{"class":551},[494,1104,555],{"class":508},[494,1106,558],{"class":500},[494,1108,562],{"class":561},[494,1110,555],{"class":508},[494,1112,567],{"class":561},[494,1114,570],{"class":508},[494,1116,573],{"class":508},[494,1118,577],{"class":576},[494,1120,580],{"class":508},[494,1122,583],{"class":508},[494,1124,1125,1127,1129],{"class":496,"line":586},[494,1126,589],{"class":508},[494,1128,643],{"class":551},[494,1130,646],{"class":508},[494,1132,1133],{"class":496,"line":607},[494,1134,1135],{"class":508},"        [[\n",[494,1137,1138,1141,1143,1145,1147,1149,1151,1153],{"class":496,"line":638},[494,1139,1140],{"class":508},"            '",[494,1142,657],{"class":576},[494,1144,580],{"class":508},[494,1146,625],{"class":508},[494,1148,573],{"class":508},[494,1150,666],{"class":576},[494,1152,580],{"class":508},[494,1154,700],{"class":508},[494,1156,1157,1159,1161,1163,1165,1168],{"class":496,"line":649},[494,1158,1140],{"class":508},[494,1160,676],{"class":576},[494,1162,580],{"class":508},[494,1164,625],{"class":508},[494,1166,1167],{"class":500}," 1",[494,1169,700],{"class":508},[494,1171,1172,1174,1177,1179,1181,1183,1185,1188,1190,1192,1194,1197,1199,1201,1203,1206,1208,1210,1212,1215,1217],{"class":496,"line":689},[494,1173,1140],{"class":508},[494,1175,1176],{"class":576},"price",[494,1178,580],{"class":508},[494,1180,625],{"class":508},[494,1182,983],{"class":508},[494,1184,580],{"class":508},[494,1186,1187],{"class":576},"value",[494,1189,580],{"class":508},[494,1191,625],{"class":508},[494,1193,573],{"class":508},[494,1195,1196],{"class":576},"49.99",[494,1198,580],{"class":508},[494,1200,671],{"class":508},[494,1202,573],{"class":508},[494,1204,1205],{"class":576},"currency",[494,1207,580],{"class":508},[494,1209,625],{"class":508},[494,1211,573],{"class":508},[494,1213,1214],{"class":576},"EUR",[494,1216,580],{"class":508},[494,1218,1219],{"class":508},"],\n",[494,1221,1222],{"class":496,"line":703},[494,1223,1224],{"class":508},"        ]],\n",[494,1226,1227,1229,1231,1233],{"class":496,"line":715},[494,1228,692],{"class":508},[494,1230,695],{"class":576},[494,1232,580],{"class":508},[494,1234,700],{"class":508},[494,1236,1237,1239,1241,1243],{"class":496,"line":721},[494,1238,692],{"class":508},[494,1240,708],{"class":576},[494,1242,580],{"class":508},[494,1244,700],{"class":508},[494,1246,1247],{"class":496,"line":965},[494,1248,718],{"class":508},[471,1250,1251,1252,1257],{},"Choose amounts on the server. An override still needs a configured product. Use the ",[777,1253,280],{"href":1254,"rel":1255},"https:\u002F\u002Fdocs.vatly.com\u002Fapi-reference",[1256],"nofollow"," for allowed product combinations and fields.",[480,1259,1261],{"id":1260},"confirm-payment-not-the-redirect","Confirm payment, not the redirect",[471,1263,1264,1265,1267,1268,1271,1272,1275],{},"Keep the checkout ID against your server-side cart or session. The success page may load before a webhook, or never load at all. Confirm payment through ",[777,1266,50],{"href":197},", then fulfill once. ",[475,1269,1270],{},"checkout.paid"," is useful for checkout analytics; ",[475,1273,1274],{},"order.paid"," supplies the order and tax data for persistence and fulfillment.",[1277,1278,1279],"style",{},"html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}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 .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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);}",{"title":490,"searchDepth":523,"depth":523,"links":1281},[1282,1283,1284,1285],{"id":482,"depth":523,"text":483},{"id":771,"depth":523,"text":772},{"id":1057,"depth":523,"text":1058},{"id":1260,"depth":523,"text":1261},"Create a hosted payment page, then redirect the browser to its URL.","md",null,{},{"title":80},{"title":80,"description":1286},"DkmijCMAKkF1IFyhLU_XgP3BV5RiPBHdCkKJ_q8DvuI",[1294,1296],{"title":68,"path":181,"stem":182,"description":1295,"children":-1},"Create a Vatly customer for the account that pays, then save the link to your own ID.",{"title":88,"path":187,"stem":188,"description":1297,"children":-1},"Change a subscription using a local record that implements SubscriptionInterface.",1794594927496]