[{"data":1,"prerenderedAt":1165},["ShallowReactive",2],{"navigation_docs":3,"-packages-django-billing":465,"-packages-django-billing-surround":1160},[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":467,"body":468,"description":1153,"extension":1154,"links":1155,"meta":1156,"navigation":1157,"path":432,"seo":1158,"stem":433,"__hash__":1159},"docs\u002F3.packages\u002F8.django\u002F05.billing.md","Manage owned subscriptions",{"type":469,"value":470,"toc":1148},"minimark",[471,475,480,633,697,703,707,710,789,859,920,923,927,1025,1028,1035,1109,1122,1137,1144],[472,473,474],"p",{},"Use the facade with a saved, authorized billable. It checks local ownership before\nsubscription mutations. A raw Vatly customer ID is never enough to authorize one.",[476,477,479],"h2",{"id":478},"read-current-local-subscriptions","Read current local subscriptions",[481,482,487],"pre",{"className":483,"code":484,"language":485,"meta":486,"style":486},"language-python shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","from vatly_django.billing import Billing\n\n\ndef example(billable):\n    return list(\n        Billing().resources(billable, \"subscription\").values(\"vatly_id\", \"snapshot\", \"ends_at\")\n    )\n","python","",[488,489,490,516,523,528,549,562,627],"code",{"__ignoreMap":486},[491,492,495,499,503,507,510,513],"span",{"class":493,"line":494},"line",1,[491,496,498],{"class":497},"s7zQu","from",[491,500,502],{"class":501},"sTEyZ"," vatly_django",[491,504,506],{"class":505},"sMK4o",".",[491,508,509],{"class":501},"billing ",[491,511,512],{"class":497},"import",[491,514,515],{"class":501}," Billing\n",[491,517,519],{"class":493,"line":518},2,[491,520,522],{"emptyLinePlaceholder":521},true,"\n",[491,524,526],{"class":493,"line":525},3,[491,527,522],{"emptyLinePlaceholder":521},[491,529,531,535,539,542,546],{"class":493,"line":530},4,[491,532,534],{"class":533},"spNyl","def",[491,536,538],{"class":537},"s2Zo4"," example",[491,540,541],{"class":505},"(",[491,543,545],{"class":544},"sHdIc","billable",[491,547,548],{"class":505},"):\n",[491,550,552,555,559],{"class":493,"line":551},5,[491,553,554],{"class":497},"    return",[491,556,558],{"class":557},"sBMFI"," list",[491,560,561],{"class":505},"(\n",[491,563,565,568,571,574,576,578,581,584,588,591,594,597,599,601,604,606,608,610,613,615,617,619,622,624],{"class":493,"line":564},6,[491,566,567],{"class":537},"        Billing",[491,569,570],{"class":505},"().",[491,572,573],{"class":537},"resources",[491,575,541],{"class":505},[491,577,545],{"class":537},[491,579,580],{"class":505},",",[491,582,583],{"class":505}," \"",[491,585,587],{"class":586},"sfazB","subscription",[491,589,590],{"class":505},"\"",[491,592,593],{"class":505},").",[491,595,596],{"class":537},"values",[491,598,541],{"class":505},[491,600,590],{"class":505},[491,602,603],{"class":586},"vatly_id",[491,605,590],{"class":505},[491,607,580],{"class":505},[491,609,583],{"class":505},[491,611,612],{"class":586},"snapshot",[491,614,590],{"class":505},[491,616,580],{"class":505},[491,618,583],{"class":505},[491,620,621],{"class":586},"ends_at",[491,623,590],{"class":505},[491,625,626],{"class":505},")\n",[491,628,630],{"class":493,"line":629},7,[491,631,632],{"class":505},"    )\n",[634,635,636,649],"table",{},[637,638,639],"thead",{},[640,641,642,646],"tr",{},[643,644,645],"th",{},"Stored field",[643,647,648],{},"Meaning",[650,651,652,662,671,680],"tbody",{},[640,653,654,659],{},[655,656,657],"td",{},[488,658,603],{},[655,660,661],{},"Subscription identifier",[640,663,664,668],{},[655,665,666],{},[488,667,612],{},[655,669,670],{},"Full Vatly resource using wire keys, including status",[640,672,673,677],{},[655,674,675],{},[488,676,621],{},[655,678,679],{},"Derived expiry, not cancellation request time",[640,681,682,694],{},[655,683,684,687,688,687,691],{},[488,685,686],{},"entity_kind",", ",[488,689,690],{},"entity_id",[488,692,693],{},"scope",[655,695,696],{},"Host ownership and tenant\u002Fstorefront\u002Fmode",[472,698,699,702],{},[488,700,701],{},"BillableMixin.subscribed()"," requires active\u002Ftrial\u002Fon_grace_period status and no\nexpired local end. It is a convenience policy, not your complete entitlement rule.\nFailed or stale synchronization must not be treated as proof of access.",[476,704,706],{"id":705},"cancel-or-resume-from-a-user-action","Cancel or resume from a user action",[472,708,709],{},"These functions belong in authenticated, CSRF-protected POST handlers:",[481,711,713],{"className":483,"code":712,"language":485,"meta":486,"style":486},"from vatly_django.billing import Billing\n\n\ndef example(billable):\n    Billing().subscription_action(billable, \"subscription_example\", \"cancel\", immediately=False)\n",[488,714,715,729,733,737,749],{"__ignoreMap":486},[491,716,717,719,721,723,725,727],{"class":493,"line":494},[491,718,498],{"class":497},[491,720,502],{"class":501},[491,722,506],{"class":505},[491,724,509],{"class":501},[491,726,512],{"class":497},[491,728,515],{"class":501},[491,730,731],{"class":493,"line":518},[491,732,522],{"emptyLinePlaceholder":521},[491,734,735],{"class":493,"line":525},[491,736,522],{"emptyLinePlaceholder":521},[491,738,739,741,743,745,747],{"class":493,"line":530},[491,740,534],{"class":533},[491,742,538],{"class":537},[491,744,541],{"class":505},[491,746,545],{"class":544},[491,748,548],{"class":505},[491,750,751,754,756,759,761,763,765,767,770,772,774,776,779,781,783,786],{"class":493,"line":551},[491,752,753],{"class":537},"    Billing",[491,755,570],{"class":505},[491,757,758],{"class":537},"subscription_action",[491,760,541],{"class":505},[491,762,545],{"class":537},[491,764,580],{"class":505},[491,766,583],{"class":505},[491,768,769],{"class":586},"subscription_example",[491,771,590],{"class":505},[491,773,580],{"class":505},[491,775,583],{"class":505},[491,777,778],{"class":586},"cancel",[491,780,590],{"class":505},[491,782,580],{"class":505},[491,784,785],{"class":544}," immediately",[491,787,788],{"class":505},"=False)\n",[481,790,792],{"className":483,"code":791,"language":485,"meta":486,"style":486},"from vatly_django.billing import Billing\n\n\ndef example(billable):\n    Billing().subscription_action(billable, \"subscription_example\", \"resume\")\n",[488,793,794,808,812,816,828],{"__ignoreMap":486},[491,795,796,798,800,802,804,806],{"class":493,"line":494},[491,797,498],{"class":497},[491,799,502],{"class":501},[491,801,506],{"class":505},[491,803,509],{"class":501},[491,805,512],{"class":497},[491,807,515],{"class":501},[491,809,810],{"class":493,"line":518},[491,811,522],{"emptyLinePlaceholder":521},[491,813,814],{"class":493,"line":525},[491,815,522],{"emptyLinePlaceholder":521},[491,817,818,820,822,824,826],{"class":493,"line":530},[491,819,534],{"class":533},[491,821,538],{"class":537},[491,823,541],{"class":505},[491,825,545],{"class":544},[491,827,548],{"class":505},[491,829,830,832,834,836,838,840,842,844,846,848,850,852,855,857],{"class":493,"line":551},[491,831,753],{"class":537},[491,833,570],{"class":505},[491,835,758],{"class":537},[491,837,541],{"class":505},[491,839,545],{"class":537},[491,841,580],{"class":505},[491,843,583],{"class":505},[491,845,769],{"class":586},[491,847,590],{"class":505},[491,849,580],{"class":505},[491,851,583],{"class":505},[491,853,854],{"class":586},"resume",[491,856,590],{"class":505},[491,858,626],{"class":505},[634,860,861,871],{},[637,862,863],{},[640,864,865,868],{},[643,866,867],{},"Action",[643,869,870],{},"Behavior",[650,872,873,882,891,901],{},[640,874,875,879],{},[655,876,877],{},[488,878,778],{},[655,880,881],{},"Request cancellation; signed events update local state",[640,883,884,888],{},[655,885,886],{},[488,887,854],{},[655,889,890],{},"Resume during grace and persist the API response",[640,892,893,898],{},[655,894,895],{},[488,896,897],{},"sync",[655,899,900],{},"Refresh a subscription snapshot",[640,902,903,914],{},[655,904,905,687,908,687,911],{},[488,906,907],{},"swap",[488,909,910],{},"swap_and_invoice",[488,912,913],{},"swap_without_charge",[655,915,916,917],{},"Plan-change policies; pass ",[488,918,919],{},"plan_id",[472,921,922],{},"The facade's action helper returns None. Use Fluent\u002FSDK RequestOptions directly\nwhen your mutation workflow needs an explicit stable idempotency key.",[476,924,926],{"id":925},"reconcile-a-known-checkout","Reconcile a known checkout",[481,928,930],{"className":483,"code":929,"language":485,"meta":486,"style":486},"from vatly_django.billing import Billing\n\n\ndef example(billable):\n    result = Billing().reconcile(billable, \"checkout_example\")\n    # Schedule a bounded later reconcile while either tuple is not empty.\n    return result.unresolved_line_ids, result.pending_subscription_ids\n",[488,931,932,946,950,954,966,997,1003],{"__ignoreMap":486},[491,933,934,936,938,940,942,944],{"class":493,"line":494},[491,935,498],{"class":497},[491,937,502],{"class":501},[491,939,506],{"class":505},[491,941,509],{"class":501},[491,943,512],{"class":497},[491,945,515],{"class":501},[491,947,948],{"class":493,"line":518},[491,949,522],{"emptyLinePlaceholder":521},[491,951,952],{"class":493,"line":525},[491,953,522],{"emptyLinePlaceholder":521},[491,955,956,958,960,962,964],{"class":493,"line":530},[491,957,534],{"class":533},[491,959,538],{"class":537},[491,961,541],{"class":505},[491,963,545],{"class":544},[491,965,548],{"class":505},[491,967,968,971,974,977,979,982,984,986,988,990,993,995],{"class":493,"line":551},[491,969,970],{"class":501},"    result ",[491,972,973],{"class":505},"=",[491,975,976],{"class":537}," Billing",[491,978,570],{"class":505},[491,980,981],{"class":537},"reconcile",[491,983,541],{"class":505},[491,985,545],{"class":537},[491,987,580],{"class":505},[491,989,583],{"class":505},[491,991,992],{"class":586},"checkout_example",[491,994,590],{"class":505},[491,996,626],{"class":505},[491,998,999],{"class":493,"line":564},[491,1000,1002],{"class":1001},"sHwdD","    # Schedule a bounded later reconcile while either tuple is not empty.\n",[491,1004,1005,1007,1010,1012,1016,1018,1020,1022],{"class":493,"line":629},[491,1006,554],{"class":497},[491,1008,1009],{"class":501}," result",[491,1011,506],{"class":505},[491,1013,1015],{"class":1014},"swJcz","unresolved_line_ids",[491,1017,580],{"class":505},[491,1019,1009],{"class":501},[491,1021,506],{"class":505},[491,1023,1024],{"class":1014},"pending_subscription_ids\n",[472,1026,1027],{},"The facade checks the checkout's host record, performs bounded API reads and\npersists snapshots\u002Flinks transactionally. This may hold the scope lock during\nreads; run it in a worker for busy deployments. It emits no created outbox event.",[472,1029,1030,1031,1034],{},"Signup lines reference their plan and name their subscription in\n",[488,1032,1033],{},"relatedResources.subscriptionId","; renewal lines reference the subscription as\ntheir product. Both link the subscription to the checkout's billable.",[634,1036,1037,1049],{},[637,1038,1039],{},[640,1040,1041,1044,1046],{},[643,1042,1043],{},"Result field",[643,1045,648],{},[643,1047,1048],{},"What to do",[650,1050,1051,1064,1077,1093],{},[640,1052,1053,1058,1061],{},[655,1054,1055],{},[488,1056,1057],{},"subscriptions",[655,1059,1060],{},"Linked and stored subscriptions",[655,1062,1063],{},"Nothing",[640,1065,1066,1071,1074],{},[655,1067,1068],{},[488,1069,1070],{},"pending_subscription_ids",[655,1072,1073],{},"Referenced, but not readable yet",[655,1075,1076],{},"Reconcile again later",[640,1078,1079,1083,1090],{},[655,1080,1081],{},[488,1082,1015],{},[655,1084,1085,1086,1089],{},"Signup lines whose ",[488,1087,1088],{},"subscriptionId"," is still null",[655,1091,1092],{},"Reconcile again later; it may never resolve",[640,1094,1095,1100,1106],{},[655,1096,1097],{},[488,1098,1099],{},"legacy_plan_ids",[655,1101,1102,1103],{},"Plan lines on historical orders without ",[488,1104,1105],{},"relatedResources",[655,1107,1108],{},"Resolve manually",[472,1110,1111,1112,1115,1116,1118,1119,1121],{},"A signed ",[488,1113,1114],{},"order.paid"," snapshot is frozen when it is sent and can carry a null\n",[488,1117,1088],{},", so the first order may still need an explicit reconcile. Schedule\na bounded number of later reconciles while ",[488,1120,1015],{}," is not empty.\nNever guess by customer\u002Fplan\u002Fquantity. Missing subscription IDs remain pending,\nnot entitled. Trial flows may lack an order.paid event.",[472,1123,1124,1125,1128,1129,1136],{},"Grace expiry uses Fluent's shared mapper. ",[488,1126,1127],{},"canceledAt"," is the request time.\nMissing or ambiguous period deadlines raise and retain the prior committed state;\nmonitor and reconcile instead of inventing an expiry. Active snapshots clear stale\nends after resume. ",[1130,1131,1135],"a",{"href":1132,"rel":1133},"https:\u002F\u002Fdocs.vatly.com\u002Fpackages\u002Ffluent-python\u002Fsubscriptions",[1134],"nofollow","Fluent's guide","\ndescribes this policy and its limits.",[472,1138,1139],{},[1130,1140,1143],{"href":1141,"rel":1142},"https:\u002F\u002Fdocs.vatly.com\u002Fapi-reference\u002Fsubscriptions",[1134],"Subscription API reference",[1145,1146,1147],"style",{},"html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .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 .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 .sHdIc, html code.shiki .sHdIc{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#EEFFFF;--shiki-default-font-style:italic;--shiki-dark:#BABED8;--shiki-dark-font-style:italic}html 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 .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 pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}",{"title":486,"searchDepth":518,"depth":518,"links":1149},[1150,1151,1152],{"id":478,"depth":518,"text":479},{"id":705,"depth":518,"text":706},{"id":925,"depth":518,"text":926},"Use the facade with a saved, authorized billable.","md",null,{},{"title":88},{"title":467,"description":1153},"dX0DA2DdakcKtlv7tyJVfnjmnxJ9I2wQUepu5p2EuCM",[1161,1163],{"title":428,"path":429,"stem":430,"description":1162,"children":-1},"Configure a book offer in settings, then POST to the built-in checkout route as an authenticated user.",{"title":193,"path":435,"stem":436,"description":1164,"children":-1},"The portal lets buyers manage billing, invoices and subscriptions in Vatly.",1794594934226]