[{"data":1,"prerenderedAt":993},["ShallowReactive",2],{"navigation_docs":3,"-packages-fluent-php-customers":465,"-packages-fluent-php-customers-surround":988},[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":68,"body":467,"description":981,"extension":982,"links":983,"meta":984,"navigation":985,"path":181,"seo":986,"stem":182,"__hash__":987},"docs\u002F3.packages\u002F2.fluent-php\u002F03.customers.md",{"type":468,"value":469,"toc":977},"minimark",[470,487,765,781,786,797,812,816,819,936,948,962,973],[471,472,473,474,478,479,482,483,486],"p",{},"Create a Vatly customer for the account that pays, then save the link to your own ID. Here ",[475,476,477],"code",{},"$vatly"," has a ",[475,480,481],{},"CustomerBindingRepository"," wired in, and ",[475,484,485],{},"user_42"," is an authenticated account in your app:",[488,489,494],"pre",{"className":490,"code":491,"language":492,"meta":493,"style":493},"language-php shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","use Vatly\\Fluent\\CustomerProfile;\n\n$customer = $vatly->customers()->findByHostCustomerId('user_42');\nif ($customer === null) {\n    $customer = $vatly->customers()->createFor(\n        hostCustomerId: 'user_42',\n        profile: new CustomerProfile(email: 'buyer@example.com', name: 'Alex'),\n        additionalPayload: ['locale' => 'nl_NL'],\n    );\n}\n$profile = new CustomerProfile(vatlyId: $customer->id);\n","php","",[475,495,496,524,531,576,597,623,643,689,720,726,732],{"__ignoreMap":493},[497,498,501,505,509,513,516,518,521],"span",{"class":499,"line":500},"line",1,[497,502,504],{"class":503},"sbssI","use",[497,506,508],{"class":507},"sTEyZ"," Vatly",[497,510,512],{"class":511},"sMK4o","\\",[497,514,515],{"class":507},"Fluent",[497,517,512],{"class":511},[497,519,520],{"class":507},"CustomerProfile",[497,522,523],{"class":511},";\n",[497,525,527],{"class":499,"line":526},2,[497,528,530],{"emptyLinePlaceholder":529},true,"\n",[497,532,534,537,540,543,546,549,552,556,559,562,565,568,571,573],{"class":499,"line":533},3,[497,535,536],{"class":511},"$",[497,538,539],{"class":507},"customer ",[497,541,542],{"class":511},"=",[497,544,545],{"class":511}," $",[497,547,548],{"class":507},"vatly",[497,550,551],{"class":511},"->",[497,553,555],{"class":554},"s2Zo4","customers",[497,557,558],{"class":511},"()->",[497,560,561],{"class":554},"findByHostCustomerId",[497,563,564],{"class":511},"(",[497,566,567],{"class":511},"'",[497,569,485],{"class":570},"sfazB",[497,572,567],{"class":511},[497,574,575],{"class":511},");\n",[497,577,579,583,586,588,591,594],{"class":499,"line":578},4,[497,580,582],{"class":581},"s7zQu","if",[497,584,585],{"class":511}," ($",[497,587,539],{"class":507},[497,589,590],{"class":511},"===",[497,592,593],{"class":511}," null)",[497,595,596],{"class":511}," {\n",[497,598,600,603,605,607,609,611,613,615,617,620],{"class":499,"line":599},5,[497,601,602],{"class":511},"    $",[497,604,539],{"class":507},[497,606,542],{"class":511},[497,608,545],{"class":511},[497,610,548],{"class":507},[497,612,551],{"class":511},[497,614,555],{"class":554},[497,616,558],{"class":511},[497,618,619],{"class":554},"createFor",[497,621,622],{"class":511},"(\n",[497,624,626,630,633,636,638,640],{"class":499,"line":625},6,[497,627,629],{"class":628},"sBMFI","        hostCustomerId",[497,631,632],{"class":511},":",[497,634,635],{"class":511}," '",[497,637,485],{"class":570},[497,639,567],{"class":511},[497,641,642],{"class":511},",\n",[497,644,646,649,651,654,657,659,662,664,666,669,671,674,677,679,681,684,686],{"class":499,"line":645},7,[497,647,648],{"class":628},"        profile",[497,650,632],{"class":511},[497,652,653],{"class":503}," new",[497,655,656],{"class":628}," CustomerProfile",[497,658,564],{"class":511},[497,660,661],{"class":628},"email",[497,663,632],{"class":511},[497,665,635],{"class":511},[497,667,668],{"class":570},"buyer@example.com",[497,670,567],{"class":511},[497,672,673],{"class":511},",",[497,675,676],{"class":628}," name",[497,678,632],{"class":511},[497,680,635],{"class":511},[497,682,683],{"class":570},"Alex",[497,685,567],{"class":511},[497,687,688],{"class":511},"),\n",[497,690,692,695,697,700,702,705,707,710,712,715,717],{"class":499,"line":691},8,[497,693,694],{"class":628},"        additionalPayload",[497,696,632],{"class":511},[497,698,699],{"class":511}," [",[497,701,567],{"class":511},[497,703,704],{"class":570},"locale",[497,706,567],{"class":511},[497,708,709],{"class":511}," =>",[497,711,635],{"class":511},[497,713,714],{"class":570},"nl_NL",[497,716,567],{"class":511},[497,718,719],{"class":511},"],\n",[497,721,723],{"class":499,"line":722},9,[497,724,725],{"class":511},"    );\n",[497,727,729],{"class":499,"line":728},10,[497,730,731],{"class":511},"}\n",[497,733,735,737,740,742,744,746,748,751,753,755,758,760,763],{"class":499,"line":734},11,[497,736,536],{"class":511},[497,738,739],{"class":507},"profile ",[497,741,542],{"class":511},[497,743,653],{"class":503},[497,745,656],{"class":628},[497,747,564],{"class":511},[497,749,750],{"class":628},"vatlyId",[497,752,632],{"class":511},[497,754,545],{"class":511},[497,756,757],{"class":507},"customer",[497,759,551],{"class":511},[497,761,762],{"class":507},"id",[497,764,575],{"class":511},[471,766,767,768,771,772,776,777,780],{},"Use ",[475,769,770],{},"$profile"," in a ",[773,774,775],"a",{"href":184},"checkout",". ",[475,778,779],{},"createFor()"," always creates a new remote customer and then calls your binding repository. It throws if that host ID is already bound. Serialize concurrent creation for the same host account; a lookup followed by create is not an atomic lock. Remote creation and your database write are not one transaction. Reconcile the remote ID if binding fails rather than blindly creating again.",[782,783,785],"h2",{"id":784},"link-an-existing-customer","Link an existing customer",[471,787,788,789,792,793,796],{},"After checking ownership, call ",[475,790,791],{},"attribute($vatlyCustomerId, $hostCustomerId)",". Repeating the same pair is safe. Linking a host already bound to another customer raises ",[475,794,795],{},"CustomerAlreadyBoundException",". Your repository must also prevent one remote customer from being assigned to two host accounts.",[471,798,799,800,803,804,807,808,811],{},"For anonymous checkout, use ",[475,801,802],{},"new CustomerProfile()",". After payment you can call ",[475,805,806],{},"claimCustomerFromCheckout($checkoutId, $hostCustomerId)",": it returns ",[475,809,810],{},"false"," if no customer can be resolved yet. Only claim checkouts your server recorded for this user or session. A checkout ID supplied by a browser is not proof of ownership. Claiming the binding does not reassign earlier anonymous order rows; your driver must do that if needed.",[782,813,815],{"id":814},"update-account-identity","Update account identity",[471,817,818],{},"This uses the same authorized customer from above:",[488,820,822],{"className":490,"code":821,"language":492,"meta":493,"style":493},"use Vatly\\Fluent\\Data\\UpdateCustomerData;\n\n$handle = $vatly->customer($customer->id);\n$handle->update(new UpdateCustomerData(name: 'Alex Example'));\n$identity = $handle->identity();\n",[475,823,824,846,850,878,915],{"__ignoreMap":493},[497,825,826,828,830,832,834,836,839,841,844],{"class":499,"line":500},[497,827,504],{"class":503},[497,829,508],{"class":507},[497,831,512],{"class":511},[497,833,515],{"class":507},[497,835,512],{"class":511},[497,837,838],{"class":507},"Data",[497,840,512],{"class":511},[497,842,843],{"class":507},"UpdateCustomerData",[497,845,523],{"class":511},[497,847,848],{"class":499,"line":526},[497,849,530],{"emptyLinePlaceholder":529},[497,851,852,854,857,859,861,863,865,867,870,872,874,876],{"class":499,"line":533},[497,853,536],{"class":511},[497,855,856],{"class":507},"handle ",[497,858,542],{"class":511},[497,860,545],{"class":511},[497,862,548],{"class":507},[497,864,551],{"class":511},[497,866,757],{"class":554},[497,868,869],{"class":511},"($",[497,871,757],{"class":507},[497,873,551],{"class":511},[497,875,762],{"class":507},[497,877,575],{"class":511},[497,879,880,882,885,887,890,892,895,898,900,903,905,907,910,912],{"class":499,"line":578},[497,881,536],{"class":511},[497,883,884],{"class":507},"handle",[497,886,551],{"class":511},[497,888,889],{"class":554},"update",[497,891,564],{"class":511},[497,893,894],{"class":503},"new",[497,896,897],{"class":628}," UpdateCustomerData",[497,899,564],{"class":511},[497,901,902],{"class":628},"name",[497,904,632],{"class":511},[497,906,635],{"class":511},[497,908,909],{"class":570},"Alex Example",[497,911,567],{"class":511},[497,913,914],{"class":511},"));\n",[497,916,917,919,922,924,926,928,930,933],{"class":499,"line":599},[497,918,536],{"class":511},[497,920,921],{"class":507},"identity ",[497,923,542],{"class":511},[497,925,545],{"class":511},[497,927,884],{"class":507},[497,929,551],{"class":511},[497,931,932],{"class":554},"identity",[497,934,935],{"class":511},"();\n",[471,937,938,939,942,943,947],{},"Identity updates cover name and email. To clear a name explicitly, pass ",[475,940,941],{},"['name' => null]"," instead of a DTO. Billing addresses, company details, and VAT numbers go through the hosted ",[773,944,946],{"href":945},"\u002Fpackages\u002Ffluent-php\u002Fsubscriptions#update-billing","billing-update flow",".",[471,949,950,953,954,957,958,961],{},[475,951,952],{},"findByEmail()"," returns a collection, not a unique match. ",[475,955,956],{},"findOneByEmail()"," returns the first match or ",[475,959,960],{},"null",". Email search is a recovery tool, not authorization or an automatic binding rule.",[471,963,964,965,967,968,947],{},"Next: ",[773,966,193],{"href":194},". For field details, see the ",[773,969,280],{"href":970,"rel":971},"https:\u002F\u002Fdocs.vatly.com\u002Fapi-reference",[972],"nofollow",[974,975,976],"style",{},"html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}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 .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}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":493,"searchDepth":526,"depth":526,"links":978},[979,980],{"id":784,"depth":526,"text":785},{"id":814,"depth":526,"text":815},"Create a Vatly customer for the account that pays, then save the link to your own ID.","md",null,{},{"title":68},{"title":68,"description":981},"KZcokLSqKFC3azt7pKyh7sY81FTRnIi8hPi4NhDACbk",[989,991],{"title":177,"path":178,"stem":179,"description":990,"children":-1},"Connect Fluent to your database without replacing your models.",{"title":80,"path":184,"stem":185,"description":992,"children":-1},"Create a hosted payment page, then redirect the browser to its URL.",1794594927380]