[{"data":1,"prerenderedAt":1103},["ShallowReactive",2],{"navigation_docs":3,"-packages-fluent-js-testing":465,"-packages-fluent-js-testing-surround":1098},[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":58,"body":467,"description":1091,"extension":1092,"links":1093,"meta":1094,"navigation":1095,"path":316,"seo":1096,"stem":317,"__hash__":1097},"docs\u002F3.packages\u002F5.fluent-js\u002F11.testing.md",{"type":468,"value":469,"toc":1086},"minimark",[470,479,960,963,968,979,986,990,1029,1060,1064,1067,1082],[471,472,473,474,478],"p",{},"Test API calls without a network by injecting the SDK's ",[475,476,477],"code",{},"fetch",":",[480,481,486],"pre",{"className":482,"code":483,"language":484,"meta":485,"style":485},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { VatlyClient } from '@getvatly\u002Fsdk';\nimport { Vatly } from '@getvatly\u002Ffluent';\n\nexport async function testCheckoutLookup() {\n  const vatly = new Vatly({\n    api: new VatlyClient({\n      apiKey: 'test_local_fixture_not_a_real_key',\n      maxRetries: 0,\n      fetch: async (input, init) => {\n        if (new URL(String(input)).pathname !== '\u002Fv1\u002Fcheckouts\u002Fcheckout_fixture'\n          || init?.method !== 'GET') throw new Error('Unexpected request');\n        return new Response(JSON.stringify({ customerId: 'customer_fixture' }), {\n          headers: { 'content-type': 'application\u002Fjson' },\n        });\n      },\n    }),\n  });\n  const id = await vatly.customerIdFromCheckout('checkout_fixture');\n  if (id !== 'customer_fixture') throw new Error('Incorrect customer');\n}\n","ts","",[475,487,488,524,547,554,577,601,617,635,649,680,723,770,816,845,855,861,871,881,914,954],{"__ignoreMap":485},[489,490,493,497,501,505,508,511,514,518,521],"span",{"class":491,"line":492},"line",1,[489,494,496],{"class":495},"s7zQu","import",[489,498,500],{"class":499},"sMK4o"," {",[489,502,504],{"class":503},"sTEyZ"," VatlyClient",[489,506,507],{"class":499}," }",[489,509,510],{"class":495}," from",[489,512,513],{"class":499}," '",[489,515,517],{"class":516},"sfazB","@getvatly\u002Fsdk",[489,519,520],{"class":499},"'",[489,522,523],{"class":499},";\n",[489,525,527,529,531,534,536,538,540,543,545],{"class":491,"line":526},2,[489,528,496],{"class":495},[489,530,500],{"class":499},[489,532,533],{"class":503}," Vatly",[489,535,507],{"class":499},[489,537,510],{"class":495},[489,539,513],{"class":499},[489,541,542],{"class":516},"@getvatly\u002Ffluent",[489,544,520],{"class":499},[489,546,523],{"class":499},[489,548,550],{"class":491,"line":549},3,[489,551,553],{"emptyLinePlaceholder":552},true,"\n",[489,555,557,560,564,567,571,574],{"class":491,"line":556},4,[489,558,559],{"class":495},"export",[489,561,563],{"class":562},"spNyl"," async",[489,565,566],{"class":562}," function",[489,568,570],{"class":569},"s2Zo4"," testCheckoutLookup",[489,572,573],{"class":499},"()",[489,575,576],{"class":499}," {\n",[489,578,580,583,586,589,592,594,598],{"class":491,"line":579},5,[489,581,582],{"class":562},"  const",[489,584,585],{"class":503}," vatly",[489,587,588],{"class":499}," =",[489,590,591],{"class":499}," new",[489,593,533],{"class":569},[489,595,597],{"class":596},"swJcz","(",[489,599,600],{"class":499},"{\n",[489,602,604,607,609,611,613,615],{"class":491,"line":603},6,[489,605,606],{"class":596},"    api",[489,608,478],{"class":499},[489,610,591],{"class":499},[489,612,504],{"class":569},[489,614,597],{"class":596},[489,616,600],{"class":499},[489,618,620,623,625,627,630,632],{"class":491,"line":619},7,[489,621,622],{"class":596},"      apiKey",[489,624,478],{"class":499},[489,626,513],{"class":499},[489,628,629],{"class":516},"test_local_fixture_not_a_real_key",[489,631,520],{"class":499},[489,633,634],{"class":499},",\n",[489,636,638,641,643,647],{"class":491,"line":637},8,[489,639,640],{"class":596},"      maxRetries",[489,642,478],{"class":499},[489,644,646],{"class":645},"sbssI"," 0",[489,648,634],{"class":499},[489,650,652,655,657,659,662,666,669,672,675,678],{"class":491,"line":651},9,[489,653,654],{"class":569},"      fetch",[489,656,478],{"class":499},[489,658,563],{"class":562},[489,660,661],{"class":499}," (",[489,663,665],{"class":664},"sHdIc","input",[489,667,668],{"class":499},",",[489,670,671],{"class":664}," init",[489,673,674],{"class":499},")",[489,676,677],{"class":562}," =>",[489,679,576],{"class":499},[489,681,683,686,688,691,694,696,699,701,703,706,709,712,715,717,720],{"class":491,"line":682},10,[489,684,685],{"class":495},"        if",[489,687,661],{"class":596},[489,689,690],{"class":499},"new",[489,692,693],{"class":569}," URL",[489,695,597],{"class":596},[489,697,698],{"class":569},"String",[489,700,597],{"class":596},[489,702,665],{"class":503},[489,704,705],{"class":596},"))",[489,707,708],{"class":499},".",[489,710,711],{"class":503},"pathname",[489,713,714],{"class":499}," !==",[489,716,513],{"class":499},[489,718,719],{"class":516},"\u002Fv1\u002Fcheckouts\u002Fcheckout_fixture",[489,721,722],{"class":499},"'\n",[489,724,726,729,731,734,737,739,741,744,746,749,752,754,757,759,761,764,766,768],{"class":491,"line":725},11,[489,727,728],{"class":499},"          ||",[489,730,671],{"class":503},[489,732,733],{"class":499},"?.",[489,735,736],{"class":503},"method",[489,738,714],{"class":499},[489,740,513],{"class":499},[489,742,743],{"class":516},"GET",[489,745,520],{"class":499},[489,747,748],{"class":596},") ",[489,750,751],{"class":495},"throw",[489,753,591],{"class":499},[489,755,756],{"class":569}," Error",[489,758,597],{"class":596},[489,760,520],{"class":499},[489,762,763],{"class":516},"Unexpected request",[489,765,520],{"class":499},[489,767,674],{"class":596},[489,769,523],{"class":499},[489,771,773,776,778,781,783,786,788,791,793,796,799,801,803,806,808,810,812,814],{"class":491,"line":772},12,[489,774,775],{"class":495},"        return",[489,777,591],{"class":499},[489,779,780],{"class":569}," Response",[489,782,597],{"class":596},[489,784,785],{"class":503},"JSON",[489,787,708],{"class":499},[489,789,790],{"class":569},"stringify",[489,792,597],{"class":596},[489,794,795],{"class":499},"{",[489,797,798],{"class":596}," customerId",[489,800,478],{"class":499},[489,802,513],{"class":499},[489,804,805],{"class":516},"customer_fixture",[489,807,520],{"class":499},[489,809,507],{"class":499},[489,811,674],{"class":596},[489,813,668],{"class":499},[489,815,576],{"class":499},[489,817,819,822,824,826,828,831,833,835,837,840,842],{"class":491,"line":818},13,[489,820,821],{"class":596},"          headers",[489,823,478],{"class":499},[489,825,500],{"class":499},[489,827,513],{"class":499},[489,829,830],{"class":596},"content-type",[489,832,520],{"class":499},[489,834,478],{"class":499},[489,836,513],{"class":499},[489,838,839],{"class":516},"application\u002Fjson",[489,841,520],{"class":499},[489,843,844],{"class":499}," },\n",[489,846,848,851,853],{"class":491,"line":847},14,[489,849,850],{"class":499},"        }",[489,852,674],{"class":596},[489,854,523],{"class":499},[489,856,858],{"class":491,"line":857},15,[489,859,860],{"class":499},"      },\n",[489,862,864,867,869],{"class":491,"line":863},16,[489,865,866],{"class":499},"    }",[489,868,674],{"class":596},[489,870,634],{"class":499},[489,872,874,877,879],{"class":491,"line":873},17,[489,875,876],{"class":499},"  }",[489,878,674],{"class":596},[489,880,523],{"class":499},[489,882,884,886,889,891,894,896,898,901,903,905,908,910,912],{"class":491,"line":883},18,[489,885,582],{"class":562},[489,887,888],{"class":503}," id",[489,890,588],{"class":499},[489,892,893],{"class":495}," await",[489,895,585],{"class":503},[489,897,708],{"class":499},[489,899,900],{"class":569},"customerIdFromCheckout",[489,902,597],{"class":596},[489,904,520],{"class":499},[489,906,907],{"class":516},"checkout_fixture",[489,909,520],{"class":499},[489,911,674],{"class":596},[489,913,523],{"class":499},[489,915,917,920,922,925,927,929,931,933,935,937,939,941,943,945,948,950,952],{"class":491,"line":916},19,[489,918,919],{"class":495},"  if",[489,921,661],{"class":596},[489,923,924],{"class":503},"id",[489,926,714],{"class":499},[489,928,513],{"class":499},[489,930,805],{"class":516},[489,932,520],{"class":499},[489,934,748],{"class":596},[489,936,751],{"class":495},[489,938,591],{"class":499},[489,940,756],{"class":569},[489,942,597],{"class":596},[489,944,520],{"class":499},[489,946,947],{"class":516},"Incorrect customer",[489,949,520],{"class":499},[489,951,674],{"class":596},[489,953,523],{"class":499},[489,955,957],{"class":491,"line":956},20,[489,958,959],{"class":499},"}\n",[471,961,962],{},"This fixture tests only customer lookup. Use full resource fixtures for other\noperations; SDK types do not validate them at runtime.",[964,965,967],"h2",{"id":966},"test-your-storage-boundary","Test your storage boundary",[471,969,970,971,975,976,708],{},"Check the ",[972,973,974],"a",{"href":295},"storage contracts",": uniqueness under concurrency,\ntest\u002Flive separation, omitted versus null updates, and a declined ",[475,977,978],{},"store",[471,980,981,982,985],{},"For ",[972,983,984],{"href":313},"webhooks",", test valid, invalid, stale, and rotated signatures\nusing an independent HMAC signer. Concurrent copies must commit once. A failed\nreaction must roll back rows, audit markers, and outbox work, then succeed on retry.\nAlso test unknown events and out-of-order snapshots. Keep timestamp checks enabled.",[964,987,989],{"id":988},"live-test-mode-workflow","Live test-mode workflow",[991,992,993,1005,1011,1026],"ol",{},[994,995,996,997,1000,1001,1004],"li",{},"Set ",[475,998,999],{},"VATLY_API_KEY"," to a real ",[475,1002,1003],{},"test_"," key. Use customer and catalogue IDs from\nits storefront and mode. Test keys do not create real charges.",[994,1006,1007,1008,708],{},"Expose your local webhook route through an HTTPS tunnel. Register the public\nURL and save its signing secret as ",[475,1009,1010],{},"VATLY_WEBHOOK_SECRET",[994,1012,1013,1014,1017,1018,1021,1022,1025],{},"Pay through a ",[972,1015,1016],{"href":301},"hosted checkout",". Save the checkout\u002Forder IDs and\nconfirm signed ",[475,1019,1020],{},"checkout.paid"," and ",[475,1023,1024],{},"order.paid"," deliveries.",[994,1027,1028],{},"Check duplicate and failed deliveries. Delete or disable temporary endpoints\nbefore closing the tunnel; record any resources you create.",[471,1030,1031,1034,1035,1038,1039,634,1042,1038,1045,1038,1048,1051,1052,1055,1056,1059],{},[475,1032,1033],{},"vatly.testHelpers()"," exposes ",[475,1036,1037],{},"advanceRenewal",", ",[475,1040,1041],{},"forceRenewalPaid",[475,1043,1044],{},"forceRenewalFailed",[475,1046,1047],{},"forceOrderPaymentPaid",[475,1049,1050],{},"forceOrderPaymentFailed",", and the\nSDK-style ",[475,1053,1054],{},"fastForwardRenewal","\u002F",[475,1057,1058],{},"simulateOrderPayment",". These mutate account data.\nUse them only with permission and disposable test resources, not existing\nsubscriptions or orders just because the key is in test mode.",[964,1061,1063],{"id":1062},"test-your-edge-runtime","Test your edge runtime",[471,1065,1066],{},"For edge hosts, also run your app in the local edge runtime with its storage adapter.\nNode tests alone do not check edge compatibility.",[471,1068,1069,1070,1076,1077,708],{},"See the ",[972,1071,1075],{"href":1072,"rel":1073},"https:\u002F\u002Fdocs.vatly.com\u002Fguides\u002Ftesting",[1074],"nofollow","testing guide"," and\n",[972,1078,1081],{"href":1079,"rel":1080},"https:\u002F\u002Fdocs.vatly.com\u002Fapi-reference\u002Ftest-helpers",[1074],"Test Helpers API reference",[1083,1084,1085],"style",{},"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 .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}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 .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--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);}",{"title":485,"searchDepth":526,"depth":526,"links":1087},[1088,1089,1090],{"id":966,"depth":526,"text":967},{"id":988,"depth":526,"text":989},{"id":1062,"depth":526,"text":1063},"Test API calls without a network by injecting the SDK's fetch.","md",null,{},{"title":58},{"title":58,"description":1091},"bco3stTRC-C22USikgw0KIPsyTulB9ATr97yfbw-RAk",[1099,1101],{"title":50,"path":313,"stem":314,"description":1100,"children":-1},"Record payments and subscription changes from signed webhooks, not checkout redirects.",{"title":128,"path":324,"stem":325,"description":1102,"children":-1},"Vatly is the European Merchant of Record for AI, software and digital products.",1794594925188]