[{"data":1,"prerenderedAt":1211},["ShallowReactive",2],{"navigation_docs":3,"-packages-fluent-php-configuration":465,"-packages-fluent-php-configuration-surround":1206},[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":173,"body":467,"description":1199,"extension":1200,"links":1201,"meta":1202,"navigation":1203,"path":174,"seo":1204,"stem":175,"__hash__":1205},"docs\u002F3.packages\u002F2.fluent-php\u002F01.configuration.md",{"type":468,"value":469,"toc":1194},"minimark",[470,474,503,512,515,520,543,786,796,821,825,832,853,860,864,874,1162,1180,1190],[471,472,473],"p",{},"Install Fluent on your server with PHP 8.1 or newer and Composer. Keep API keys out of browser code and source control.",[475,476,481],"pre",{"className":477,"code":478,"language":479,"meta":480,"style":480},"language-sh shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","composer require vatly\u002Fvatly-fluent-php:0.8.0-alpha.29 vatly\u002Fvatly-api-php:0.1.0-alpha.32\n","sh","",[482,483,484],"code",{"__ignoreMap":480},[485,486,489,493,497,500],"span",{"class":487,"line":488},"line",1,[485,490,492],{"class":491},"sBMFI","composer",[485,494,496],{"class":495},"sfazB"," require",[485,498,499],{"class":495}," vatly\u002Fvatly-fluent-php:0.8.0-alpha.29",[485,501,502],{"class":495}," vatly\u002Fvatly-api-php:0.1.0-alpha.32\n",[504,505,506],"blockquote",{},[471,507,508],{},[509,510,511],"strong",{},"Alpha — under active development. Every alpha release may include breaking changes. Pin exact versions during alpha.",[471,513,514],{},"Install both pins: Composer's default stable-only policy otherwise rejects the SDK's transitive alpha dependency. These examples use this released pair.",[516,517,519],"h2",{"id":518},"set-keys-and-return-urls","Set keys and return URLs",[471,521,522,523,526,527,530,531,534,535,542],{},"Load ",[482,524,525],{},"vendor\u002Fautoload.php"," at your application's entry point. Set ",[482,528,529],{},"VATLY_API_KEY"," and ",[482,532,533],{},"VATLY_WEBHOOK_SECRET"," in your server environment. Get a test key from the ",[536,537,541],"a",{"href":538,"rel":539},"https:\u002F\u002Fmy.vatly.com",[540],"nofollow","dashboard",".",[475,544,548],{"className":545,"code":546,"language":547,"meta":480,"style":480},"language-php shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","use Vatly\\Fluent\\Configuration\\ArrayConfiguration;\nuse Vatly\\Fluent\\Vatly;\nuse Vatly\\Fluent\\Wiring;\n\n$config = new ArrayConfiguration([\n    'api_key' => getenv('VATLY_API_KEY'),\n    'webhook_secret' => getenv('VATLY_WEBHOOK_SECRET'),\n    'redirect_url_success' => 'https:\u002F\u002Fapp.example.com\u002Fbilling\u002Freturn',\n    'redirect_url_canceled' => 'https:\u002F\u002Fapp.example.com\u002Fbilling\u002Fcanceled',\n]);\n$vatly = new Vatly(new Wiring(config: $config));\n","php",[482,549,550,579,597,615,622,643,674,698,721,742,748],{"__ignoreMap":480},[485,551,552,556,560,564,567,569,571,573,576],{"class":487,"line":488},[485,553,555],{"class":554},"sbssI","use",[485,557,559],{"class":558},"sTEyZ"," Vatly",[485,561,563],{"class":562},"sMK4o","\\",[485,565,566],{"class":558},"Fluent",[485,568,563],{"class":562},[485,570,173],{"class":558},[485,572,563],{"class":562},[485,574,575],{"class":558},"ArrayConfiguration",[485,577,578],{"class":562},";\n",[485,580,582,584,586,588,590,592,595],{"class":487,"line":581},2,[485,583,555],{"class":554},[485,585,559],{"class":558},[485,587,563],{"class":562},[485,589,566],{"class":558},[485,591,563],{"class":562},[485,593,594],{"class":558},"Vatly",[485,596,578],{"class":562},[485,598,600,602,604,606,608,610,613],{"class":487,"line":599},3,[485,601,555],{"class":554},[485,603,559],{"class":558},[485,605,563],{"class":562},[485,607,566],{"class":558},[485,609,563],{"class":562},[485,611,612],{"class":558},"Wiring",[485,614,578],{"class":562},[485,616,618],{"class":487,"line":617},4,[485,619,621],{"emptyLinePlaceholder":620},true,"\n",[485,623,625,628,631,634,637,640],{"class":487,"line":624},5,[485,626,627],{"class":562},"$",[485,629,630],{"class":558},"config ",[485,632,633],{"class":562},"=",[485,635,636],{"class":554}," new",[485,638,639],{"class":491}," ArrayConfiguration",[485,641,642],{"class":562},"([\n",[485,644,646,649,652,655,658,662,665,667,669,671],{"class":487,"line":645},6,[485,647,648],{"class":562},"    '",[485,650,651],{"class":495},"api_key",[485,653,654],{"class":562},"'",[485,656,657],{"class":562}," =>",[485,659,661],{"class":660},"s2Zo4"," getenv",[485,663,664],{"class":562},"(",[485,666,654],{"class":562},[485,668,529],{"class":495},[485,670,654],{"class":562},[485,672,673],{"class":562},"),\n",[485,675,677,679,682,684,686,688,690,692,694,696],{"class":487,"line":676},7,[485,678,648],{"class":562},[485,680,681],{"class":495},"webhook_secret",[485,683,654],{"class":562},[485,685,657],{"class":562},[485,687,661],{"class":660},[485,689,664],{"class":562},[485,691,654],{"class":562},[485,693,533],{"class":495},[485,695,654],{"class":562},[485,697,673],{"class":562},[485,699,701,703,706,708,710,713,716,718],{"class":487,"line":700},8,[485,702,648],{"class":562},[485,704,705],{"class":495},"redirect_url_success",[485,707,654],{"class":562},[485,709,657],{"class":562},[485,711,712],{"class":562}," '",[485,714,715],{"class":495},"https:\u002F\u002Fapp.example.com\u002Fbilling\u002Freturn",[485,717,654],{"class":562},[485,719,720],{"class":562},",\n",[485,722,724,726,729,731,733,735,738,740],{"class":487,"line":723},9,[485,725,648],{"class":562},[485,727,728],{"class":495},"redirect_url_canceled",[485,730,654],{"class":562},[485,732,657],{"class":562},[485,734,712],{"class":562},[485,736,737],{"class":495},"https:\u002F\u002Fapp.example.com\u002Fbilling\u002Fcanceled",[485,739,654],{"class":562},[485,741,720],{"class":562},[485,743,745],{"class":487,"line":744},10,[485,746,747],{"class":562},"]);\n",[485,749,751,753,756,758,760,762,764,767,770,772,775,778,781,783],{"class":487,"line":750},11,[485,752,627],{"class":562},[485,754,755],{"class":558},"vatly ",[485,757,633],{"class":562},[485,759,636],{"class":554},[485,761,559],{"class":491},[485,763,664],{"class":562},[485,765,766],{"class":554},"new",[485,768,769],{"class":491}," Wiring",[485,771,664],{"class":562},[485,773,774],{"class":491},"config",[485,776,777],{"class":562},":",[485,779,780],{"class":562}," $",[485,782,774],{"class":558},[485,784,785],{"class":562},"));\n",[471,787,788,791,792,795],{},[482,789,790],{},"test_"," keys use test mode; ",[482,793,794],{},"live_"," keys can charge real money. Keep products, customers, and local records separated by mode. Missing environment variables are configuration errors: validate them at application startup.",[471,797,798,799,802,803,806,807,809,810,530,813,816,817,820],{},"The default API URL is ",[482,800,801],{},"https:\u002F\u002Fapi.vatly.com"," and the version is ",[482,804,805],{},"v1",". ",[482,808,575],{}," also accepts ",[482,811,812],{},"api_url",[482,814,815],{},"api_version",". Implement ",[482,818,819],{},"ConfigurationInterface"," instead if your framework already owns configuration.",[516,822,824],{"id":823},"add-storage-only-when-you-need-it","Add storage only when you need it",[471,826,827,828,831],{},"The instance above can create checkouts, operate on products, and open customer portal sessions. ",[482,829,830],{},"Vatly::apiOnly($apiKey)"," is the shortcut when you do not need redirect defaults.",[471,833,834,837,838,841,842,845,846,849,850,852],{},[482,835,836],{},"customers()"," needs customer bindings. ",[482,839,840],{},"subscription($localSubscription)"," needs a subscription repository. ",[482,843,844],{},"webhookProcessor()"," needs subscription, order, binding, and webhook-call repositories plus an event dispatcher. Missing dependencies raise ",[482,847,848],{},"IncompleteWiringException","; see ",[536,851,177],{"href":178}," for the wiring example.",[471,854,855,856,859],{},"Subscription checkout and billing-update flows use configured redirect defaults. One-off ",[482,857,858],{},"CheckoutBuilder::create()"," takes both redirect URLs explicitly.",[516,861,863],{"id":862},"handle-a-failed-api-call","Handle a failed API call",[471,865,866,867,870,871,777],{},"This function accepts the configured ",[482,868,869],{},"$vatly",", an authorized customer ID, and a plan ID. Return a retry message to the customer when it returns ",[482,872,873],{},"null",[475,875,877],{"className":545,"code":876,"language":547,"meta":480,"style":480},"use Vatly\\Fluent\\CustomerProfile;\nuse Vatly\\Fluent\\Exceptions\\VatlyException;\nuse Vatly\\Fluent\\Vatly;\n\nfunction tryCheckout(Vatly $vatly, string $customerId, string $planId): ?string\n{\n    try {\n        $checkout = $vatly->subscriptionBuilder(new CustomerProfile(vatlyId: $customerId))\n            ->toPlan($planId)->create();\n        return $checkout->links->checkoutUrl->href;\n    } catch (VatlyException $error) {\n        error_log('Vatly checkout failed: ' . $error->getCode());\n        return null;\n    }\n}\n",[482,878,879,896,918,934,938,985,990,999,1040,1062,1089,1112,1142,1150,1156],{"__ignoreMap":480},[485,880,881,883,885,887,889,891,894],{"class":487,"line":488},[485,882,555],{"class":554},[485,884,559],{"class":558},[485,886,563],{"class":562},[485,888,566],{"class":558},[485,890,563],{"class":562},[485,892,893],{"class":558},"CustomerProfile",[485,895,578],{"class":562},[485,897,898,900,902,904,906,908,911,913,916],{"class":487,"line":581},[485,899,555],{"class":554},[485,901,559],{"class":558},[485,903,563],{"class":562},[485,905,566],{"class":558},[485,907,563],{"class":562},[485,909,910],{"class":558},"Exceptions",[485,912,563],{"class":562},[485,914,915],{"class":558},"VatlyException",[485,917,578],{"class":562},[485,919,920,922,924,926,928,930,932],{"class":487,"line":599},[485,921,555],{"class":554},[485,923,559],{"class":558},[485,925,563],{"class":562},[485,927,566],{"class":558},[485,929,563],{"class":562},[485,931,594],{"class":558},[485,933,578],{"class":562},[485,935,936],{"class":487,"line":617},[485,937,621],{"emptyLinePlaceholder":620},[485,939,940,944,947,949,951,953,956,959,962,964,967,969,971,973,976,979,982],{"class":487,"line":624},[485,941,943],{"class":942},"spNyl","function",[485,945,946],{"class":660}," tryCheckout",[485,948,664],{"class":562},[485,950,594],{"class":491},[485,952,780],{"class":562},[485,954,955],{"class":558},"vatly",[485,957,958],{"class":562},",",[485,960,961],{"class":554}," string",[485,963,780],{"class":562},[485,965,966],{"class":558},"customerId",[485,968,958],{"class":562},[485,970,961],{"class":554},[485,972,780],{"class":562},[485,974,975],{"class":558},"planId",[485,977,978],{"class":562},"):",[485,980,981],{"class":562}," ?",[485,983,984],{"class":554},"string\n",[485,986,987],{"class":487,"line":645},[485,988,989],{"class":562},"{\n",[485,991,992,996],{"class":487,"line":676},[485,993,995],{"class":994},"s7zQu","    try",[485,997,998],{"class":562}," {\n",[485,1000,1001,1004,1007,1009,1011,1013,1016,1019,1021,1023,1026,1028,1031,1033,1035,1037],{"class":487,"line":700},[485,1002,1003],{"class":562},"        $",[485,1005,1006],{"class":558},"checkout ",[485,1008,633],{"class":562},[485,1010,780],{"class":562},[485,1012,955],{"class":558},[485,1014,1015],{"class":562},"->",[485,1017,1018],{"class":660},"subscriptionBuilder",[485,1020,664],{"class":562},[485,1022,766],{"class":554},[485,1024,1025],{"class":491}," CustomerProfile",[485,1027,664],{"class":562},[485,1029,1030],{"class":491},"vatlyId",[485,1032,777],{"class":562},[485,1034,780],{"class":562},[485,1036,966],{"class":558},[485,1038,1039],{"class":562},"))\n",[485,1041,1042,1045,1048,1051,1053,1056,1059],{"class":487,"line":723},[485,1043,1044],{"class":562},"            ->",[485,1046,1047],{"class":660},"toPlan",[485,1049,1050],{"class":562},"($",[485,1052,975],{"class":558},[485,1054,1055],{"class":562},")->",[485,1057,1058],{"class":660},"create",[485,1060,1061],{"class":562},"();\n",[485,1063,1064,1067,1069,1072,1074,1077,1079,1082,1084,1087],{"class":487,"line":744},[485,1065,1066],{"class":994},"        return",[485,1068,780],{"class":562},[485,1070,1071],{"class":558},"checkout",[485,1073,1015],{"class":562},[485,1075,1076],{"class":558},"links",[485,1078,1015],{"class":562},[485,1080,1081],{"class":558},"checkoutUrl",[485,1083,1015],{"class":562},[485,1085,1086],{"class":558},"href",[485,1088,578],{"class":562},[485,1090,1091,1094,1097,1100,1102,1104,1107,1110],{"class":487,"line":750},[485,1092,1093],{"class":562},"    }",[485,1095,1096],{"class":994}," catch",[485,1098,1099],{"class":562}," (",[485,1101,915],{"class":491},[485,1103,780],{"class":562},[485,1105,1106],{"class":558},"error",[485,1108,1109],{"class":562},")",[485,1111,998],{"class":562},[485,1113,1115,1118,1120,1122,1125,1127,1130,1132,1134,1136,1139],{"class":487,"line":1114},12,[485,1116,1117],{"class":660},"        error_log",[485,1119,664],{"class":562},[485,1121,654],{"class":562},[485,1123,1124],{"class":495},"Vatly checkout failed: ",[485,1126,654],{"class":562},[485,1128,1129],{"class":562}," .",[485,1131,780],{"class":562},[485,1133,1106],{"class":558},[485,1135,1015],{"class":562},[485,1137,1138],{"class":660},"getCode",[485,1140,1141],{"class":562},"());\n",[485,1143,1145,1147],{"class":487,"line":1144},13,[485,1146,1066],{"class":994},[485,1148,1149],{"class":562}," null;\n",[485,1151,1153],{"class":487,"line":1152},14,[485,1154,1155],{"class":562},"    }\n",[485,1157,1159],{"class":487,"line":1158},15,[485,1160,1161],{"class":562},"}\n",[471,1163,1164,1165,1168,1169,1171,1172,1175,1176,1179],{},"Fluent wraps SDK failures in ",[482,1166,1167],{},"ApiCallFailedException",", which implements ",[482,1170,915],{}," and preserves the error code. ",[482,1173,1174],{},"apiException()"," gives you the original SDK exception. Calls made directly through ",[482,1177,1178],{},"getApiClient()"," use the SDK's own exception types instead.",[471,1181,1182,1183,1185,1186,542],{},"See ",[536,1184,80],{"href":184}," next. For field details, see the ",[536,1187,280],{"href":1188,"rel":1189},"https:\u002F\u002Fdocs.vatly.com\u002Fapi-reference",[540],[1191,1192,1193],"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 .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 .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 .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}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}",{"title":480,"searchDepth":581,"depth":581,"links":1195},[1196,1197,1198],{"id":518,"depth":581,"text":519},{"id":823,"depth":581,"text":824},{"id":862,"depth":581,"text":863},"Install Fluent on your server with PHP 8.1 or newer and Composer.","md",null,{},{"title":173},{"title":173,"description":1199},"EqfKIgevIZV2jhzJTsEdvtdQtUQTOyD4PuIirZ5bbGg",[1207,1209],{"title":128,"path":170,"stem":171,"description":1208,"children":-1},"Sell a download, start a subscription, and keep your app's billing records in step with Vatly.",{"title":177,"path":178,"stem":179,"description":1210,"children":-1},"Connect Fluent to your database without replacing your models.",1794594927087]