[{"data":1,"prerenderedAt":1978},["ShallowReactive",2],{"navigation_docs":3,"-packages-javascript-readme":465,"-packages-javascript-readme-surround":1973},[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":245,"body":467,"description":1966,"extension":1967,"links":1968,"meta":1969,"navigation":1970,"path":250,"seo":1971,"stem":251,"__hash__":1972},"docs\u002F3.packages\u002F4.javascript\u002F00.readme.md",{"type":468,"value":469,"toc":1950},"minimark",[470,478,487,490,506,510,513,549,568,572,575,580,593,645,660,941,959,962,980,983,987,994,1109,1113,1200,1204,1238,1241,1255,1361,1365,1371,1466,1470,1476,1622,1632,1792,1796,1821,1929,1933,1946],[471,472,473],"p",{},[474,475],"img",{"alt":476,"src":477},"Vatly SDK for JavaScript & TypeScript","https:\u002F\u002Fraw.githubusercontent.com\u002Fvatly\u002Fvatly-api-js\u002Fmain\u002Fart\u002Fbanner.png",[479,480,481],"blockquote",{},[471,482,483],{},[484,485,486],"strong",{},"Alpha — under active development. Every alpha release may include breaking changes. Pin exact versions during alpha.",[471,488,489],{},"Official TypeScript SDK for Vatly, the European Merchant of Record for AI, software and digital products. Create checkouts and manage customers, subscriptions, and orders from your server.",[471,491,492,493,499,500,505],{},"For all endpoint fields and options, see the ",[494,495,280],"a",{"href":496,"rel":497},"https:\u002F\u002Fdocs.vatly.com\u002Fapi-reference",[498],"nofollow",". The ",[494,501,504],{"href":502,"rel":503},"https:\u002F\u002Fdocs.vatly.com\u002Fopenapi.yaml",[498],"OpenAPI spec"," is also available for tooling.",[507,508,417],"h2",{"id":509},"installation",[471,511,512],{},"Pin the published alpha version:",[514,515,520],"pre",{"className":516,"code":517,"language":518,"meta":519,"style":519},"language-bash shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","npm install --save-exact @getvatly\u002Fsdk@0.3.0-alpha.4\n# or: pnpm add --save-exact @getvatly\u002Fsdk@0.3.0-alpha.4\n","bash","",[521,522,523,542],"code",{"__ignoreMap":519},[524,525,528,532,536,539],"span",{"class":526,"line":527},"line",1,[524,529,531],{"class":530},"sBMFI","npm",[524,533,535],{"class":534},"sfazB"," install",[524,537,538],{"class":534}," --save-exact",[524,540,541],{"class":534}," @getvatly\u002Fsdk@0.3.0-alpha.4\n",[524,543,545],{"class":526,"line":544},2,[524,546,548],{"class":547},"sHwdD","# or: pnpm add --save-exact @getvatly\u002Fsdk@0.3.0-alpha.4\n",[471,550,551,552,555,556,559,560,563,564,567],{},"The package ships ESM + CommonJS builds and its own TypeScript types. It uses the\nplatform ",[521,553,554],{},"fetch"," and Web Crypto — no ",[521,557,558],{},"axios",", ",[521,561,562],{},"node-fetch",", or ",[521,565,566],{},"node:crypto"," — so\nit can run on Node and modern edge hosts. Keep API keys on the server.",[507,569,571],{"id":570},"quick-start","Quick start",[471,573,574],{},"Initialize the client with your API key and create a checkout.",[576,577,579],"h3",{"id":578},"api-keys","API Keys",[471,581,582,583,588,589,592],{},"Get your API keys from the ",[494,584,587],{"href":585,"rel":586},"https:\u002F\u002Fmy.vatly.com",[498],"Vatly Dashboard"," under ",[484,590,591],{},"Settings > API",".",[594,595,596,612],"table",{},[597,598,599],"thead",{},[600,601,602,606,609],"tr",{},[603,604,605],"th",{},"Name",[603,607,608],{},"Type",[603,610,611],{},"Description",[613,614,615,631],"tbody",{},[600,616,617,623,628],{},[618,619,620],"td",{},[521,621,622],{},"live_",[618,624,625],{},[521,626,627],{},"prefix",[618,629,630],{},"Production transactions, real charges.",[600,632,633,638,642],{},[618,634,635],{},[521,636,637],{},"test_",[618,639,640],{},[521,641,627],{},[618,643,644],{},"Sandbox testing, no real charges.",[471,646,647,648,651,652,655,656,659],{},"The client validates the key format at construction and exposes the detected\nmode on ",[521,649,650],{},"client.mode"," (",[521,653,654],{},"\"live\""," or ",[521,657,658],{},"\"test\"",").",[514,661,665],{"className":662,"code":663,"language":664,"meta":519,"style":519},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","import { VatlyClient } from \"@getvatly\u002Fsdk\";\n\nconst vatly = new VatlyClient({\n  apiKey: process.env.VATLY_API_KEY, \u002F\u002F live_… or test_…\n});\n\n\u002F\u002F Create a checkout\nconst checkout = await vatly.checkouts.create({\n  redirectUrlSuccess: \"https:\u002F\u002Fyourapp.com\u002Fsuccess\",\n  redirectUrlCanceled: \"https:\u002F\u002Fyourapp.com\u002Fcanceled\",\n  products: [{ id: \"subscription_plan_abc123\", quantity: 1 }],\n});\n\n\u002F\u002F Redirect the customer to the hosted checkout page\nconsole.log(checkout.links.checkoutUrl.href);\n","ts",[521,666,667,699,705,730,759,770,775,781,811,829,846,890,899,904,910],{"__ignoreMap":519},[524,668,669,673,677,681,684,687,690,693,696],{"class":526,"line":527},[524,670,672],{"class":671},"s7zQu","import",[524,674,676],{"class":675},"sMK4o"," {",[524,678,680],{"class":679},"sTEyZ"," VatlyClient",[524,682,683],{"class":675}," }",[524,685,686],{"class":671}," from",[524,688,689],{"class":675}," \"",[524,691,692],{"class":534},"@getvatly\u002Fsdk",[524,694,695],{"class":675},"\"",[524,697,698],{"class":675},";\n",[524,700,701],{"class":526,"line":544},[524,702,704],{"emptyLinePlaceholder":703},true,"\n",[524,706,708,712,715,718,721,724,727],{"class":526,"line":707},3,[524,709,711],{"class":710},"spNyl","const",[524,713,714],{"class":679}," vatly ",[524,716,717],{"class":675},"=",[524,719,720],{"class":675}," new",[524,722,680],{"class":723},"s2Zo4",[524,725,726],{"class":679},"(",[524,728,729],{"class":675},"{\n",[524,731,733,737,740,743,745,748,750,753,756],{"class":526,"line":732},4,[524,734,736],{"class":735},"swJcz","  apiKey",[524,738,739],{"class":675},":",[524,741,742],{"class":679}," process",[524,744,592],{"class":675},[524,746,747],{"class":679},"env",[524,749,592],{"class":675},[524,751,752],{"class":679},"VATLY_API_KEY",[524,754,755],{"class":675},",",[524,757,758],{"class":547}," \u002F\u002F live_… or test_…\n",[524,760,762,765,768],{"class":526,"line":761},5,[524,763,764],{"class":675},"}",[524,766,767],{"class":679},")",[524,769,698],{"class":675},[524,771,773],{"class":526,"line":772},6,[524,774,704],{"emptyLinePlaceholder":703},[524,776,778],{"class":526,"line":777},7,[524,779,780],{"class":547},"\u002F\u002F Create a checkout\n",[524,782,784,786,789,791,794,797,799,802,804,807,809],{"class":526,"line":783},8,[524,785,711],{"class":710},[524,787,788],{"class":679}," checkout ",[524,790,717],{"class":675},[524,792,793],{"class":671}," await",[524,795,796],{"class":679}," vatly",[524,798,592],{"class":675},[524,800,801],{"class":679},"checkouts",[524,803,592],{"class":675},[524,805,806],{"class":723},"create",[524,808,726],{"class":679},[524,810,729],{"class":675},[524,812,814,817,819,821,824,826],{"class":526,"line":813},9,[524,815,816],{"class":735},"  redirectUrlSuccess",[524,818,739],{"class":675},[524,820,689],{"class":675},[524,822,823],{"class":534},"https:\u002F\u002Fyourapp.com\u002Fsuccess",[524,825,695],{"class":675},[524,827,828],{"class":675},",\n",[524,830,832,835,837,839,842,844],{"class":526,"line":831},10,[524,833,834],{"class":735},"  redirectUrlCanceled",[524,836,739],{"class":675},[524,838,689],{"class":675},[524,840,841],{"class":534},"https:\u002F\u002Fyourapp.com\u002Fcanceled",[524,843,695],{"class":675},[524,845,828],{"class":675},[524,847,849,852,854,857,860,863,865,867,870,872,874,877,879,883,885,888],{"class":526,"line":848},11,[524,850,851],{"class":735},"  products",[524,853,739],{"class":675},[524,855,856],{"class":679}," [",[524,858,859],{"class":675},"{",[524,861,862],{"class":735}," id",[524,864,739],{"class":675},[524,866,689],{"class":675},[524,868,869],{"class":534},"subscription_plan_abc123",[524,871,695],{"class":675},[524,873,755],{"class":675},[524,875,876],{"class":735}," quantity",[524,878,739],{"class":675},[524,880,882],{"class":881},"sbssI"," 1",[524,884,683],{"class":675},[524,886,887],{"class":679},"]",[524,889,828],{"class":675},[524,891,893,895,897],{"class":526,"line":892},12,[524,894,764],{"class":675},[524,896,767],{"class":679},[524,898,698],{"class":675},[524,900,902],{"class":526,"line":901},13,[524,903,704],{"emptyLinePlaceholder":703},[524,905,907],{"class":526,"line":906},14,[524,908,909],{"class":547},"\u002F\u002F Redirect the customer to the hosted checkout page\n",[524,911,913,916,918,921,924,926,929,931,934,936,939],{"class":526,"line":912},15,[524,914,915],{"class":679},"console",[524,917,592],{"class":675},[524,919,920],{"class":723},"log",[524,922,923],{"class":679},"(checkout",[524,925,592],{"class":675},[524,927,928],{"class":679},"links",[524,930,592],{"class":675},[524,932,933],{"class":679},"checkoutUrl",[524,935,592],{"class":675},[524,937,938],{"class":679},"href)",[524,940,698],{"class":675},[471,942,943,944,946,947,950,951,954,955,958],{},"On Node, ",[521,945,752],{}," is read from ",[521,948,949],{},"process.env"," as a fallback. On edge\nruntimes without ",[521,952,953],{},"process",", pass ",[521,956,957],{},"apiKey"," explicitly.",[507,960,54],{"id":961},"idempotency",[471,963,964,965,968,969,828,972,975,976,979],{},"The SDK automatically attaches an ",[521,966,967],{},"Idempotency-Key"," header to every ",[521,970,971],{},"POST",[521,973,974],{},"PATCH",", and ",[521,977,978],{},"DELETE"," request (a UUID v4). Checkout creation, subscription\nupdates, and refund cancellations are protected out of the box, and the key is\nreused across automatic retries so a retried call is deduped server-side.",[471,981,982],{},"Separate method calls generate separate keys. Reuse an explicit key when your\napplication retries the same operation after an uncertain result.",[576,984,986],{"id":985},"override-the-key-per-call","Override the key per call",[471,988,989,990,993],{},"Pass ",[521,991,992],{},"idempotencyKey"," in the request options when you have your own request ID:",[514,995,997],{"className":662,"code":996,"language":664,"meta":519,"style":519},"await vatly.checkouts.create(body, { idempotencyKey: \"checkout-create-123\" });\n\nawait vatly.subscriptions.update(\"subscription_123\", { quantity: 2 }, {\n  idempotencyKey: \"subscription-update-123\",\n});\n",[521,998,999,1039,1043,1085,1101],{"__ignoreMap":519},[524,1000,1001,1004,1006,1008,1010,1012,1014,1017,1019,1021,1024,1026,1028,1031,1033,1035,1037],{"class":526,"line":527},[524,1002,1003],{"class":671},"await",[524,1005,796],{"class":679},[524,1007,592],{"class":675},[524,1009,801],{"class":679},[524,1011,592],{"class":675},[524,1013,806],{"class":723},[524,1015,1016],{"class":679},"(body",[524,1018,755],{"class":675},[524,1020,676],{"class":675},[524,1022,1023],{"class":735}," idempotencyKey",[524,1025,739],{"class":675},[524,1027,689],{"class":675},[524,1029,1030],{"class":534},"checkout-create-123",[524,1032,695],{"class":675},[524,1034,683],{"class":675},[524,1036,767],{"class":679},[524,1038,698],{"class":675},[524,1040,1041],{"class":526,"line":544},[524,1042,704],{"emptyLinePlaceholder":703},[524,1044,1045,1047,1049,1051,1054,1056,1059,1061,1063,1066,1068,1070,1072,1074,1076,1079,1082],{"class":526,"line":707},[524,1046,1003],{"class":671},[524,1048,796],{"class":679},[524,1050,592],{"class":675},[524,1052,1053],{"class":679},"subscriptions",[524,1055,592],{"class":675},[524,1057,1058],{"class":723},"update",[524,1060,726],{"class":679},[524,1062,695],{"class":675},[524,1064,1065],{"class":534},"subscription_123",[524,1067,695],{"class":675},[524,1069,755],{"class":675},[524,1071,676],{"class":675},[524,1073,876],{"class":735},[524,1075,739],{"class":675},[524,1077,1078],{"class":881}," 2",[524,1080,1081],{"class":675}," },",[524,1083,1084],{"class":675}," {\n",[524,1086,1087,1090,1092,1094,1097,1099],{"class":526,"line":732},[524,1088,1089],{"class":735},"  idempotencyKey",[524,1091,739],{"class":675},[524,1093,689],{"class":675},[524,1095,1096],{"class":534},"subscription-update-123",[524,1098,695],{"class":675},[524,1100,828],{"class":675},[524,1102,1103,1105,1107],{"class":526,"line":761},[524,1104,764],{"class":675},[524,1106,767],{"class":679},[524,1108,698],{"class":675},[576,1110,1112],{"id":1111},"custom-generator-or-disable-auto-generation","Custom generator or disable auto-generation",[514,1114,1116],{"className":662,"code":1115,"language":664,"meta":519,"style":519},"\u002F\u002F Custom generator (e.g. tie keys to a tracing span)\nnew VatlyClient({ idempotencyKeyGenerator: () => span.context().traceId });\n\n\u002F\u002F Disable entirely — caller must supply opts.idempotencyKey for retries to work\nnew VatlyClient({ idempotencyKeyGenerator: false });\n",[521,1117,1118,1123,1167,1171,1176],{"__ignoreMap":519},[524,1119,1120],{"class":526,"line":527},[524,1121,1122],{"class":547},"\u002F\u002F Custom generator (e.g. tie keys to a tracing span)\n",[524,1124,1125,1128,1130,1132,1134,1137,1139,1142,1145,1148,1150,1153,1156,1158,1161,1163,1165],{"class":526,"line":544},[524,1126,1127],{"class":675},"new",[524,1129,680],{"class":723},[524,1131,726],{"class":679},[524,1133,859],{"class":675},[524,1135,1136],{"class":723}," idempotencyKeyGenerator",[524,1138,739],{"class":675},[524,1140,1141],{"class":675}," ()",[524,1143,1144],{"class":710}," =>",[524,1146,1147],{"class":679}," span",[524,1149,592],{"class":675},[524,1151,1152],{"class":723},"context",[524,1154,1155],{"class":679},"()",[524,1157,592],{"class":675},[524,1159,1160],{"class":679},"traceId ",[524,1162,764],{"class":675},[524,1164,767],{"class":679},[524,1166,698],{"class":675},[524,1168,1169],{"class":526,"line":707},[524,1170,704],{"emptyLinePlaceholder":703},[524,1172,1173],{"class":526,"line":732},[524,1174,1175],{"class":547},"\u002F\u002F Disable entirely — caller must supply opts.idempotencyKey for retries to work\n",[524,1177,1178,1180,1182,1184,1186,1188,1190,1194,1196,1198],{"class":526,"line":761},[524,1179,1127],{"class":675},[524,1181,680],{"class":723},[524,1183,726],{"class":679},[524,1185,859],{"class":675},[524,1187,1136],{"class":735},[524,1189,739],{"class":675},[524,1191,1193],{"class":1192},"sfNiH"," false",[524,1195,683],{"class":675},[524,1197,767],{"class":679},[524,1199,698],{"class":675},[507,1201,1203],{"id":1202},"retries","Retries",[471,1205,1206,1207,559,1210,1213,1214,1217,1218,1221,1222,1225,1226,1229,1230,1233,1234,1237],{},"GETs and keyed mutations retry ",[521,1208,1209],{},"429",[521,1211,1212],{},"5xx",", timeouts, and network failures\nwith exponential backoff and jitter (default ",[521,1215,1216],{},"maxRetries: 2","), honoring\n",[521,1219,1220],{},"Retry-After",". Keyed ",[521,1223,1224],{},"409"," errors retry only when\n",[521,1227,1228],{},"details.idempotency_outcome"," is ",[521,1231,1232],{},"in_progress",". An ",[521,1235,1236],{},"unknown"," outcome requires\nreading\u002Freconciling the resource before any further mutation.",[507,1239,42],{"id":1240},"pagination",[471,1242,1243,1244,1247,1248,1251,1252,739],{},"List endpoints are cursor-paginated. Use ",[521,1245,1246],{},"list()"," for a single page or\n",[521,1249,1250],{},"listAll()"," to walk every page with ",[521,1253,1254],{},"for await",[514,1256,1258],{"className":662,"code":1257,"language":664,"meta":519,"style":519},"const page = await vatly.orders.list({ limit: 25 });\n\nfor await (const order of vatly.orders.listAll({ limit: 100 })) {\n  \u002F\u002F ...\n}\n",[521,1259,1260,1301,1305,1351,1356],{"__ignoreMap":519},[524,1261,1262,1264,1267,1269,1271,1273,1275,1278,1280,1283,1285,1287,1290,1292,1295,1297,1299],{"class":526,"line":527},[524,1263,711],{"class":710},[524,1265,1266],{"class":679}," page ",[524,1268,717],{"class":675},[524,1270,793],{"class":671},[524,1272,796],{"class":679},[524,1274,592],{"class":675},[524,1276,1277],{"class":679},"orders",[524,1279,592],{"class":675},[524,1281,1282],{"class":723},"list",[524,1284,726],{"class":679},[524,1286,859],{"class":675},[524,1288,1289],{"class":735}," limit",[524,1291,739],{"class":675},[524,1293,1294],{"class":881}," 25",[524,1296,683],{"class":675},[524,1298,767],{"class":679},[524,1300,698],{"class":675},[524,1302,1303],{"class":526,"line":544},[524,1304,704],{"emptyLinePlaceholder":703},[524,1306,1307,1310,1312,1314,1316,1319,1322,1324,1326,1328,1330,1333,1335,1337,1339,1341,1344,1346,1349],{"class":526,"line":707},[524,1308,1309],{"class":671},"for",[524,1311,793],{"class":671},[524,1313,651],{"class":679},[524,1315,711],{"class":710},[524,1317,1318],{"class":679}," order ",[524,1320,1321],{"class":675},"of",[524,1323,796],{"class":679},[524,1325,592],{"class":675},[524,1327,1277],{"class":679},[524,1329,592],{"class":675},[524,1331,1332],{"class":723},"listAll",[524,1334,726],{"class":679},[524,1336,859],{"class":675},[524,1338,1289],{"class":735},[524,1340,739],{"class":675},[524,1342,1343],{"class":881}," 100",[524,1345,683],{"class":675},[524,1347,1348],{"class":679},")) ",[524,1350,729],{"class":675},[524,1352,1353],{"class":526,"line":732},[524,1354,1355],{"class":547},"  \u002F\u002F ...\n",[524,1357,1358],{"class":526,"line":761},[524,1359,1360],{"class":675},"}\n",[507,1362,1364],{"id":1363},"resources","Resources",[471,1366,1367,1368,592],{},"The SDK provides access to all Vatly API resources. The complete method and\nreturn-type inventory is in the ",[494,1369,1370],{"href":281},"operation reference",[594,1372,1373,1382],{},[597,1374,1375],{},[600,1376,1377,1380],{},[603,1378,1379],{},"Resource",[603,1381,611],{},[613,1383,1384,1393,1402,1411,1420,1430,1439,1448,1457],{},[600,1385,1386,1390],{},[618,1387,1388],{},[494,1389,80],{"href":256},[618,1391,1392],{},"Create hosted payment pages",[600,1394,1395,1399],{},[618,1396,1397],{},[494,1398,68],{"href":253},[618,1400,1401],{},"Manage customer records",[600,1403,1404,1408],{},[618,1405,1406],{},[494,1407,88],{"href":259},[618,1409,1410],{},"Recurring billing",[600,1412,1413,1417],{},[618,1414,1415],{},[494,1416,92],{"href":262},[618,1418,1419],{},"Define subscription products",[600,1421,1422,1427],{},[618,1423,1424],{},[494,1425,1426],{"href":268},"One-Off Products",[618,1428,1429],{},"Single-purchase products",[600,1431,1432,1436],{},[618,1433,1434],{},[494,1435,96],{"href":265},[618,1437,1438],{},"Transaction records",[600,1440,1441,1445],{},[618,1442,1443],{},[494,1444,104],{"href":271},[618,1446,1447],{},"Process refunds",[600,1449,1450,1454],{},[618,1451,1452],{},[494,1453,108],{"href":274},[618,1455,1456],{},"Handle disputes",[600,1458,1459,1463],{},[618,1460,1461],{},[494,1462,50],{"href":277},[618,1464,1465],{},"Endpoint management and real-time event notifications",[507,1467,1469],{"id":1468},"error-handling","Error handling",[471,1471,1472,1473,592],{},"Every non-2xx response maps to a typed error extending ",[521,1474,1475],{},"VatlyError",[594,1477,1478,1489],{},[597,1479,1480],{},[600,1481,1482,1484,1487],{},[603,1483,605],{},[603,1485,1486],{},"Status",[603,1488,611],{},[613,1490,1491,1506,1521,1536,1557,1575,1592,1605],{},[600,1492,1493,1498,1503],{},[618,1494,1495],{},[521,1496,1497],{},"VatlyAuthError",[618,1499,1500],{},[521,1501,1502],{},"401",[618,1504,1505],{},"Missing or invalid API key.",[600,1507,1508,1513,1518],{},[618,1509,1510],{},[521,1511,1512],{},"VatlyForbiddenError",[618,1514,1515],{},[521,1516,1517],{},"403",[618,1519,1520],{},"Authenticated but not allowed.",[600,1522,1523,1528,1533],{},[618,1524,1525],{},[521,1526,1527],{},"VatlyNotFoundError",[618,1529,1530],{},[521,1531,1532],{},"404",[618,1534,1535],{},"Resource does not exist.",[600,1537,1538,1543,1547],{},[618,1539,1540],{},[521,1541,1542],{},"VatlyConflictError",[618,1544,1545],{},[521,1546,1224],{},[618,1548,1549,1550,1553,1554,592],{},"Conflict; inspect ",[521,1551,1552],{},".details"," and ",[521,1555,1556],{},".retryAfter",[600,1558,1559,1564,1569],{},[618,1560,1561],{},[521,1562,1563],{},"VatlyValidationError",[618,1565,1566],{},[521,1567,1568],{},"422",[618,1570,1571,1572,592],{},"Invalid request; exposes ",[521,1573,1574],{},".errors: Record\u003Cstring, string[]>",[600,1576,1577,1582,1586],{},[618,1578,1579],{},[521,1580,1581],{},"VatlyRateLimitError",[618,1583,1584],{},[521,1585,1209],{},[618,1587,1588,1589,1591],{},"Rate limited; exposes ",[521,1590,1556],{}," (seconds).",[600,1593,1594,1599,1602],{},[618,1595,1596],{},[521,1597,1598],{},"VatlyApiError",[618,1600,1601],{},"other",[618,1603,1604],{},"Any other API error.",[600,1606,1607,1616,1619],{},[618,1608,1609,1612,1613],{},[521,1610,1611],{},"VatlyConnectionError"," \u002F ",[521,1614,1615],{},"VatlyTimeoutError",[618,1617,1618],{},"—",[618,1620,1621],{},"Network failure \u002F timeout.",[471,1623,1624,1625,1627,1628,1631],{},"Errors include the request method and URL. Resource and list methods also raise\n",[521,1626,1598],{}," for malformed JSON, empty bodies, unexpected 204 responses, or\nJSON ",[521,1629,1630],{},"null",". Documented no-content operations accept empty success responses;\nother resource fields are not runtime schema-validated.",[514,1633,1635],{"className":662,"code":1634,"language":664,"meta":519,"style":519},"import { VatlyValidationError } from \"@getvatly\u002Fsdk\";\n\ntry {\n  await vatly.customers.create({ email: \"\" });\n} catch (err) {\n  if (err instanceof VatlyValidationError) {\n    console.error(err.errors.email);\n  } else {\n    throw err;\n  }\n}\n",[521,1636,1637,1658,1662,1669,1703,1715,1735,1763,1773,1783,1788],{"__ignoreMap":519},[524,1638,1639,1641,1643,1646,1648,1650,1652,1654,1656],{"class":526,"line":527},[524,1640,672],{"class":671},[524,1642,676],{"class":675},[524,1644,1645],{"class":679}," VatlyValidationError",[524,1647,683],{"class":675},[524,1649,686],{"class":671},[524,1651,689],{"class":675},[524,1653,692],{"class":534},[524,1655,695],{"class":675},[524,1657,698],{"class":675},[524,1659,1660],{"class":526,"line":544},[524,1661,704],{"emptyLinePlaceholder":703},[524,1663,1664,1667],{"class":526,"line":707},[524,1665,1666],{"class":671},"try",[524,1668,1084],{"class":675},[524,1670,1671,1674,1676,1678,1681,1683,1685,1687,1689,1692,1694,1697,1699,1701],{"class":526,"line":732},[524,1672,1673],{"class":671},"  await",[524,1675,796],{"class":679},[524,1677,592],{"class":675},[524,1679,1680],{"class":679},"customers",[524,1682,592],{"class":675},[524,1684,806],{"class":723},[524,1686,726],{"class":735},[524,1688,859],{"class":675},[524,1690,1691],{"class":735}," email",[524,1693,739],{"class":675},[524,1695,1696],{"class":675}," \"\"",[524,1698,683],{"class":675},[524,1700,767],{"class":735},[524,1702,698],{"class":675},[524,1704,1705,1707,1710,1713],{"class":526,"line":761},[524,1706,764],{"class":675},[524,1708,1709],{"class":671}," catch",[524,1711,1712],{"class":679}," (err) ",[524,1714,729],{"class":675},[524,1716,1717,1720,1722,1725,1728,1730,1733],{"class":526,"line":772},[524,1718,1719],{"class":671},"  if",[524,1721,651],{"class":735},[524,1723,1724],{"class":679},"err",[524,1726,1727],{"class":675}," instanceof",[524,1729,1645],{"class":530},[524,1731,1732],{"class":735},") ",[524,1734,729],{"class":675},[524,1736,1737,1740,1742,1745,1747,1749,1751,1754,1756,1759,1761],{"class":526,"line":777},[524,1738,1739],{"class":679},"    console",[524,1741,592],{"class":675},[524,1743,1744],{"class":723},"error",[524,1746,726],{"class":735},[524,1748,1724],{"class":679},[524,1750,592],{"class":675},[524,1752,1753],{"class":679},"errors",[524,1755,592],{"class":675},[524,1757,1758],{"class":679},"email",[524,1760,767],{"class":735},[524,1762,698],{"class":675},[524,1764,1765,1768,1771],{"class":526,"line":783},[524,1766,1767],{"class":675},"  }",[524,1769,1770],{"class":671}," else",[524,1772,1084],{"class":675},[524,1774,1775,1778,1781],{"class":526,"line":813},[524,1776,1777],{"class":671},"    throw",[524,1779,1780],{"class":679}," err",[524,1782,698],{"class":675},[524,1784,1785],{"class":526,"line":831},[524,1786,1787],{"class":675},"  }\n",[524,1789,1790],{"class":526,"line":848},[524,1791,1360],{"class":675},[507,1793,1795],{"id":1794},"money","Money",[471,1797,1798,1799,1801,1802,1805,1806,1809,1810,1813,1814,1816,1817,1820],{},"Monetary amounts are ",[521,1800,1795],{}," objects — ",[521,1803,1804],{},"{ value, currency }"," where ",[521,1807,1808],{},"value"," is a\n",[484,1811,1812],{},"decimal string"," to preserve precision. Never coerce ",[521,1815,1808],{}," to a JavaScript\n",[521,1818,1819],{},"number",". Helpers convert to\u002Ffrom integer minor units:",[514,1822,1824],{"className":662,"code":1823,"language":664,"meta":519,"style":519},"import { toMinorUnits, fromMinorUnits } from \"@getvatly\u002Fsdk\";\n\ntoMinorUnits({ value: \"29.00\", currency: \"EUR\" }); \u002F\u002F → 2900n\nfromMinorUnits(2900n, \"EUR\");                       \u002F\u002F → { value: \"29.00\", currency: \"EUR\" }\n",[521,1825,1826,1852,1856,1901],{"__ignoreMap":519},[524,1827,1828,1830,1832,1835,1837,1840,1842,1844,1846,1848,1850],{"class":526,"line":527},[524,1829,672],{"class":671},[524,1831,676],{"class":675},[524,1833,1834],{"class":679}," toMinorUnits",[524,1836,755],{"class":675},[524,1838,1839],{"class":679}," fromMinorUnits",[524,1841,683],{"class":675},[524,1843,686],{"class":671},[524,1845,689],{"class":675},[524,1847,692],{"class":534},[524,1849,695],{"class":675},[524,1851,698],{"class":675},[524,1853,1854],{"class":526,"line":544},[524,1855,704],{"emptyLinePlaceholder":703},[524,1857,1858,1861,1863,1865,1868,1870,1872,1875,1877,1879,1882,1884,1886,1889,1891,1893,1895,1898],{"class":526,"line":707},[524,1859,1860],{"class":723},"toMinorUnits",[524,1862,726],{"class":679},[524,1864,859],{"class":675},[524,1866,1867],{"class":735}," value",[524,1869,739],{"class":675},[524,1871,689],{"class":675},[524,1873,1874],{"class":534},"29.00",[524,1876,695],{"class":675},[524,1878,755],{"class":675},[524,1880,1881],{"class":735}," currency",[524,1883,739],{"class":675},[524,1885,689],{"class":675},[524,1887,1888],{"class":534},"EUR",[524,1890,695],{"class":675},[524,1892,683],{"class":675},[524,1894,767],{"class":679},[524,1896,1897],{"class":675},";",[524,1899,1900],{"class":547}," \u002F\u002F → 2900n\n",[524,1902,1903,1906,1908,1911,1914,1916,1918,1920,1922,1924,1926],{"class":526,"line":732},[524,1904,1905],{"class":723},"fromMinorUnits",[524,1907,726],{"class":679},[524,1909,1910],{"class":881},"2900",[524,1912,1913],{"class":710},"n",[524,1915,755],{"class":675},[524,1917,689],{"class":675},[524,1919,1888],{"class":534},[524,1921,695],{"class":675},[524,1923,767],{"class":679},[524,1925,1897],{"class":675},[524,1927,1928],{"class":547},"                       \u002F\u002F → { value: \"29.00\", currency: \"EUR\" }\n",[507,1930,1932],{"id":1931},"requirements","Requirements",[1934,1935,1936,1940],"ul",{},[1937,1938,1939],"li",{},"Node 20+, Cloudflare Workers, Vercel Edge, Deno, or Bun",[1937,1941,1942,1943,1945],{},"Platform ",[521,1944,554],{}," and Web Crypto (built in on all supported runtimes)",[1947,1948,1949],"style",{},"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 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 .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 .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 .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}",{"title":519,"searchDepth":544,"depth":544,"links":1951},[1952,1953,1956,1960,1961,1962,1963,1964,1965],{"id":509,"depth":544,"text":417},{"id":570,"depth":544,"text":571,"children":1954},[1955],{"id":578,"depth":707,"text":579},{"id":961,"depth":544,"text":54,"children":1957},[1958,1959],{"id":985,"depth":707,"text":986},{"id":1111,"depth":707,"text":1112},{"id":1202,"depth":544,"text":1203},{"id":1240,"depth":544,"text":42},{"id":1363,"depth":544,"text":1364},{"id":1468,"depth":544,"text":1469},{"id":1794,"depth":544,"text":1795},{"id":1931,"depth":544,"text":1932},"Official TypeScript SDK for Vatly, the European Merchant of Record for AI, software and digital products.","md",null,{},{"title":128},{"title":245,"description":1966},"E3wj8fY5HgxUwHBEHejIV49RUbkdC_imzfZuLrBsQAU",[1974,1976],{"title":241,"path":242,"stem":243,"description":1975,"children":-1},"You don't swap a Merchant of Record overnight.",{"title":68,"path":253,"stem":254,"description":1977,"children":-1},"Customers represent the end users who purchase products through Vatly.",1794594923943]