[{"data":1,"prerenderedAt":1888},["ShallowReactive",2],{"navigation":3,"/integrations/controllers/subscriptions":310,"/integrations/controllers/subscriptions-surround":1756,"/types/pagination-query.type":1761,"T8X8wEDTTq":1778,"RlQfeeH749":1788,"/types/pagination-response.type":1798,"R6VCIDBMAK":1810,"wYpKjgCnmI":1838},[4,13,161,197,211,236,290,300],{"title":5,"_path":6,"children":7,"_id":12,"description":11},"Getting Started","/getting-started",[8],{"title":9,"_path":6,"_id":10,"description":11},"Overview","content:1.getting-started:1.index.md","Everything you need to know about integrating Churnkey with your product and billing stack.","content:1.getting-started:_dir.yml",{"title":14,"_path":15,"children":16,"_id":160},"Cancel Flows","/cancel-flows",[17,22,27,32,37,42,47,52,57,62,67,72,116,130],{"title":18,"_path":19,"_id":20,"description":21},"Quick Start Guide","/cancel-flows/quick-start-guide","content:2.cancel-flows:1.quick-start-guide.md","A 3-step guide on how to implement Cancel Flows in your website",{"title":23,"_path":24,"_id":25,"description":26},"Cancel Flow Structure","/cancel-flows/flow-configuration","content:2.cancel-flows:2.flow configuration.md","Learn about the available components that make up a Cancel Flow, from initial offers to cancellation confirmation, and how each step contributes to the overall flow.",{"title":28,"_path":29,"_id":30,"description":31},"Configuration Options","/cancel-flows/further-configuration","content:2.cancel-flows:3.further-configuration.md","Additional details for all of the following options are included below.",{"title":33,"_path":34,"_id":35,"description":36},"Custom Styling","/cancel-flows/custom-styling","content:2.cancel-flows:4.custom-styling.md","Brand your Churnkey Cancel Flow with your own CSS",{"title":38,"_path":39,"_id":40,"description":41},"Managed Email Flow","/cancel-flows/email-verified-cancel-flow","content:2.cancel-flows:6.email-verified-cancel-flow.md","Our managed email based setup takes care of customer verification for you with an email verification code.",{"title":43,"_path":44,"_id":45,"description":46},"A/B Testing","/cancel-flows/a-b-testing","content:2.cancel-flows:7.a-b-testing.md","Run controlled experiments to optimize your Cancel Flows and maximize customer retention.",{"title":48,"_path":49,"_id":50,"description":51},"Testing","/cancel-flows/cancel-flow-testing","content:2.cancel-flows:8.cancel-flow-testing.md","Ensure that your Cancel Flow is working as intended before going live.",{"title":53,"_path":54,"_id":55,"description":56},"Pause Wall","/cancel-flows/pause-wall","content:2.cancel-flows:9.pause-wall.md","Block access to your application during subscription pauses",{"title":58,"_path":59,"_id":60,"description":61},"Click-to-Cancel Compliance","/cancel-flows/click-to-cancel","content:2.cancel-flows:10.click-to-cancel.md","Implement automatic compliance with global subscription cancellation requirements",{"title":63,"_path":64,"_id":65,"description":66},"Structured Follow-Up Questions","/cancel-flows/structured-follow-up-questions","content:2.cancel-flows:11.structured-follow-up-questions.md","Collect deeper cancellation insights and deliver targeted retention offers with a second layer of predefined follow-up options in your cancel flow survey.",{"title":68,"_path":69,"_id":70,"description":71},"Adaptive Offers","/cancel-flows/adaptive-offers","content:2.cancel-flows:adaptive-offers.md","AI-powered discount optimization that automatically finds the perfect offer for each customer",{"title":73,"_path":74,"children":75},"Analytics","/cancel-flows/analytics",[76,81,86,91,96,101,106,111],{"title":77,"_path":78,"_id":79,"description":80},"Boosted Revenue","/cancel-flows/analytics/average-boosted-revenue","content:2.cancel-flows:analytics:1.average-boosted-revenue.md","Measure the long-term value of retained subscribers",{"title":82,"_path":83,"_id":84,"description":85},"Save Rate","/cancel-flows/analytics/save-rate","content:2.cancel-flows:analytics:2.save-rate.md","The percentage of customers that your Cancel Flows saved from cancellation",{"title":87,"_path":88,"_id":89,"description":90},"Reactivation Rate","/cancel-flows/analytics/reactivation-rate","content:2.cancel-flows:analytics:3.reactivation-rate.md","The percentage of customers who pay at least one invoice after being saved",{"title":92,"_path":93,"_id":94,"description":95},"Sessions","/cancel-flows/analytics/session-outcomes","content:2.cancel-flows:analytics:4.session-outcomes.md","Track each interaction that a customer has with your Cancel Flows",{"title":97,"_path":98,"_id":99,"description":100},"Cancellation Trends","/cancel-flows/analytics/cancellation-trends","content:2.cancel-flows:analytics:5.cancellation-trends.md","Analyze and interpret the selection rates and trends for cancellation reasons in your Cancel Flows.",{"title":102,"_path":103,"_id":104,"description":105},"Feedback AI","/cancel-flows/analytics/feedback-ai","content:2.cancel-flows:analytics:6.feedback-ai.md","Transform customer feedback into actionable insights with AI-powered categorization and analysis",{"title":107,"_path":108,"_id":109,"description":110},"Response Flow","/cancel-flows/analytics/response-flow","content:2.cancel-flows:analytics:7.response-flow.md","Visualize how customers move from primary cancellation reasons to specific follow-up selections with the Sankey diagram",{"title":112,"_path":113,"_id":114,"description":115},"Response Explorer","/cancel-flows/analytics/response-explorer","content:2.cancel-flows:analytics:8.response-explorer.md","Drill into individual follow-up responses with the Treemap visualization, search, trend analysis, and MRR impact sorting",{"title":117,"_path":118,"children":119},"Multi Language Support","/cancel-flows/multi-language-support",[120,125],{"title":121,"_path":122,"_id":123,"description":124},"Manual Translations","/cancel-flows/multi-language-support/multi-language-support","content:2.cancel-flows:multi-language-support:5.multi-language-support.md","Support multiple languages.",{"title":126,"_path":127,"_id":128,"description":129},"Automatic Translations","/cancel-flows/multi-language-support/automatic-translation","content:2.cancel-flows:multi-language-support:automatic-translation.md","Enable AI-powered multilingual support for your Cancel Flows with a single toggle.",{"title":131,"_path":132,"children":133,"_id":159},"Offers","/cancel-flows/offers",[134,139,144,149,154],{"title":135,"_path":136,"_id":137,"description":138},"Discount","/cancel-flows/offers/discounts","content:2.cancel-flows:offers:discounts.md","Offer targeted subscription discounts to reduce churn and increase customer retention",{"title":140,"_path":141,"_id":142,"description":143},"Hidden Plans","/cancel-flows/offers/hidden-plans","content:2.cancel-flows:offers:hidden-plans.md","Use the Switch Subscription Plan offer to present exclusive, non-public plans to customers during cancellation",{"title":145,"_path":146,"_id":147,"description":148},"Pause Subscription","/cancel-flows/offers/pause-subscription","content:2.cancel-flows:offers:pause-subscription.md","Temporarily suspend subscription payments without canceling the service",{"title":150,"_path":151,"_id":152,"description":153},"Switch Subscription Plan","/cancel-flows/offers/switch-subscription","content:2.cancel-flows:offers:switch-subscription.md","Allow customers to change to a different subscription plan during the cancellation flow to retain them with a more suitable option",{"title":155,"_path":156,"_id":157,"description":158},"Trial Extension","/cancel-flows/offers/trial-extension","content:2.cancel-flows:offers:trial-extension.md","Extend customer trial periods to reduce churn and increase conversion rates during the critical trial-to-paid transition","content:2.cancel-flows:offers:_dir.yml","content:2.cancel-flows:_dir.yml",{"title":162,"_path":163,"children":164,"_id":196},"Payment Recovery","/failed-payment-recovery",[165,169,174,179,184,188],{"title":5,"_path":166,"_id":167,"description":168},"/failed-payment-recovery/payment-recovery","content:3.failed-payment-recovery:1.payment-recovery.md","Recover failed payment revenue, automatically.",{"title":170,"_path":171,"_id":172,"description":173},"Customize your Campaigns","/failed-payment-recovery/campaign-customization","content:3.failed-payment-recovery:2.campaign-customization.md","Customize your Payment Recovery Campaigns to match the unique needs of your individual customers.",{"title":175,"_path":176,"_id":177,"description":178},"Failed Payment Wall","/failed-payment-recovery/failed-payment-wall","content:3.failed-payment-recovery:3.failed-payment-wall.md","Block access to your application when payments fail",{"title":180,"_path":181,"_id":182,"description":183},"Billing Contact API","/failed-payment-recovery/billing-contact-api","content:3.failed-payment-recovery:4.billing-contact-api.md","Send Payment Recovery emails to multiple billing contacts",{"title":43,"_path":185,"_id":186,"description":187},"/failed-payment-recovery/ab-testing","content:3.failed-payment-recovery:5.ab-testing.md","Optimize your payment recovery campaigns through controlled experiments that maximize revenue recovery.",{"title":73,"_path":189,"children":190},"/failed-payment-recovery/analytics",[191],{"title":192,"_path":193,"_id":194,"description":195},"Overall Performance","/failed-payment-recovery/analytics/overview","content:3.failed-payment-recovery:analytics:1.overview.md","Key performance metrics for your Payment Recovery campaigns","content:3.failed-payment-recovery:_dir.yml",{"title":198,"_path":199,"children":200,"_id":210},"Reactivations","/reactivations",[201,205],{"title":5,"_path":202,"_id":203,"description":204},"/reactivations/reactivations","content:4.reactivations:1.reactivations.md","Churnkey helps you to recover unsubscribed customers with easy, customizable Reactivation Email Campaigns.",{"title":206,"_path":207,"_id":208,"description":209},"Customization","/reactivations/campaign-customization-guide","content:4.reactivations:2.campaign-customization-guide.md","Customize your Reactivation Campaigns to match the individual needs of your customers.","content:4.reactivations:_dir.yml",{"title":212,"_path":213,"children":214,"_id":235},"Data Integrations","/data-integrations",[215,220,225,230],{"title":216,"_path":217,"_id":218,"description":219},"Data API","/data-integrations/data-api","content:6.data-integrations:1.data-api.md","Access your data through our API.",{"title":221,"_path":222,"_id":223,"description":224},"Slack notifications","/data-integrations/slack","content:6.data-integrations:2.slack.md","Connect Churnkey with your organization's Slack and to send session notifications to a specific channel.",{"title":226,"_path":227,"_id":228,"description":229},"Webhooks","/data-integrations/webhooks","content:6.data-integrations:2.webhooks.md","Churnkey can send webhooks to automatically notify your application whenever a customer completes a session.",{"title":231,"_path":232,"_id":233,"description":234},"Event Tracking","/data-integrations/event-tracking","content:6.data-integrations:3.event-tracking.md","Track your customers' key-value metrics on a per customer basis.","content:6.data-integrations:_dir.yml",{"title":237,"_path":238,"children":239,"_id":289},"Billing Providers","/billing-providers",[240,245,250,255,260,265,270,275],{"title":241,"_path":242,"_id":243,"description":244},"Payment Providers","/billing-providers/payment-provider-overview","content:7.billing-providers:1.payment-provider-overview.md","Feature support for Stripe, Chargebee, Paddle, and Braintree",{"title":246,"_path":247,"_id":248,"description":249},"Stripe","/billing-providers/stripe","content:7.billing-providers:3.stripe.md","Integrate Churnkey with your Stripe account",{"title":251,"_path":252,"_id":253,"description":254},"Chargebee","/billing-providers/chargebee","content:7.billing-providers:4.chargebee.md","Integrate Churnkey with your Chargebee account",{"title":256,"_path":257,"_id":258,"description":259},"Paddle Classic","/billing-providers/paddle-classic","content:7.billing-providers:5.paddle-classic.md","Integrate Churnkey with your Paddle Classic account",{"title":261,"_path":262,"_id":263,"description":264},"Paddle Billing","/billing-providers/paddle-billing","content:7.billing-providers:6.paddle-billing.md","Integrate Churnkey with your Paddle Billing account",{"title":266,"_path":267,"_id":268,"description":269},"Braintree","/billing-providers/braintree","content:7.billing-providers:7.braintree.md","Integrate Churnkey with your Braintree account",{"title":271,"_path":272,"_id":273,"description":274},"Maxio","/billing-providers/maxio","content:7.billing-providers:8.maxio.md","Integrate Churnkey with your Maxio (formerly Chargify) account",{"title":276,"_path":277,"children":278},"Direct Connect","/billing-providers/direct-connect",[279,284],{"title":280,"_path":281,"_id":282,"description":283},"Churnkey Direct","/billing-providers/direct-connect/direct","content:7.billing-providers:9.direct-connect:1.direct.md","Integrate Churnkey with any billing system using Direct mode",{"title":285,"_path":286,"_id":287,"description":288},"Direct Mode Examples","/billing-providers/direct-connect/direct-examples","content:7.billing-providers:9.direct-connect:2.direct-examples.md","Real-world examples for common subscription scenarios","content:7.billing-providers:_dir.yml",{"title":291,"_path":292,"children":293,"_id":299},"Account","/account",[294],{"title":295,"_path":296,"_id":297,"description":298},"Multi-Workspace Support","/account/multi-workspace-support","content:8.account:1.multi-workspace-support.md","Use one email address to access multiple Churnkey workspaces and switch between them instantly.","content:8.account:_dir.yml",{"title":301,"_path":302,"children":303,"_id":309},"Support","/support",[304],{"title":305,"_path":306,"_id":307,"description":308},"Frequently Asked Questions","/support/faqs","content:9.support:1.faqs.md","We want setting up Churnkey to be a breeze.","content:9.support:_dir.yml",{"_path":311,"_dir":312,"_draft":313,"_partial":313,"_locale":314,"title":315,"description":316,"body":317,"_type":1749,"_id":1750,"_source":1751,"_file":1752,"_stem":1753,"_extension":1754,"sitemap":1755},"/integrations/controllers/subscriptions","controllers",false,"","Subscriptions - Controller","List and retrieve `Subscription` models.",{"type":318,"children":319,"toc":1741},"root",[320,337,344,426,432,444,986,992,1002,1011,1040,1088,1355,1364,1373,1385,1395,1404,1411,1735],{"type":321,"tag":322,"props":323,"children":324},"element","p",{},[325,328,335],{"type":326,"value":327},"text","To implement the ",{"type":321,"tag":329,"props":330,"children":332},"code",{"className":331},[],[333],{"type":326,"value":334},"Subscriptions",{"type":326,"value":336}," controller, you need to implement 2 API endpoints, we will use these endpoints to fetch subscriptions from your system.",{"type":321,"tag":338,"props":339,"children":341},"h2",{"id":340},"prerequisites",[342],{"type":326,"value":343},"Prerequisites",{"type":321,"tag":345,"props":346,"children":348},"grid",{"cols":347},2,[349,372,397],{"type":321,"tag":350,"props":351,"children":354},"card-baseline",{"title":352,"to":353},"Subscription Model","/integrations/models/subscription",[355,360],{"type":321,"tag":322,"props":356,"children":357},{},[358],{"type":326,"value":359},"Subscription to a product or service.",{"type":321,"tag":361,"props":362,"children":365},"flex",{"className":363},[364],"mt-4",[366],{"type":321,"tag":367,"props":368,"children":371},"badge",{"label":369,"color":370},"Required","green",[],{"type":321,"tag":350,"props":373,"children":376},{"title":374,"to":375},"Prices - Controller","/integrations/controllers/prices",[377,390],{"type":321,"tag":322,"props":378,"children":379},{},[380,382,388],{"type":326,"value":381},"You must implement a ",{"type":321,"tag":329,"props":383,"children":385},{"className":384},[],[386],{"type":326,"value":387},"Prices",{"type":326,"value":389}," controller first.",{"type":321,"tag":361,"props":391,"children":393},{"className":392},[364],[394],{"type":321,"tag":367,"props":395,"children":396},{"label":369,"color":370},[],{"type":321,"tag":350,"props":398,"children":401},{"title":399,"to":400},"Coupons - Controller","/integrations/controllers/coupons",[402,414],{"type":321,"tag":322,"props":403,"children":404},{},[405,407,413],{"type":326,"value":406},"If you have subscription-level discounts, you may need to implement a ",{"type":321,"tag":329,"props":408,"children":410},{"className":409},[],[411],{"type":326,"value":412},"Coupons",{"type":326,"value":389},{"type":321,"tag":361,"props":415,"children":417},{"className":416},[364],[418,422],{"type":321,"tag":367,"props":419,"children":421},{"label":420},"Optional",[],{"type":321,"tag":367,"props":423,"children":425},{"label":424},"Discount Offer",[],{"type":321,"tag":338,"props":427,"children":429},{"id":428},"sdk",[430],{"type":326,"value":431},"SDK",{"type":321,"tag":322,"props":433,"children":434},{},[435,437,442],{"type":326,"value":436},"If you are using the SDK, you can implement the ",{"type":321,"tag":329,"props":438,"children":440},{"className":439},[],[441],{"type":326,"value":334},{"type":326,"value":443}," controller by following the code example below. You don't need to get into the details of the API endpoints, the SDK will take care of that for you.",{"type":321,"tag":445,"props":446,"children":447},"code-group",{},[448],{"type":321,"tag":449,"props":450,"children":455},"pre",{"className":451,"code":452,"filename":453,"language":454,"meta":314,"style":314},"language-typescript shiki shiki-themes github-light-default github-light-default github-dark-default","import { Integrator } from '@churnkey/sdk'\nimport { Context } from '../Context'\nimport { Subscription } from '../models/Subscription'\nimport { Prices } from './Prices'\n\nexport const Subscriptions = Integrator.Subscriptions.config({\n    ctx: Context,\n    Prices: Prices,\n    async retrieve(ctx, options) {\n        const yourSubscription = await ctx.db.findSubscription(options.customerId, options.id)\n        return new Subscription(yourSubscription)\n    },\n    async list(ctx, options) {\n        const yourSubscriptions = await ctx.db.listSubscriptions({\n            customerId: options.customerId,\n            limit: options.limit,\n            offset: options.cursor // the value you passed as `next` below\n        })\n        return {\n            data: yourSubscriptions.map(subscription => new Subscription(subscription)),\n            // pass the next cursor if there are more items\n            next: yourSubscriptions.length === options.limit ? offset + limit : undefined\n        }\n    }\n})\n","Typescript","typescript",[456],{"type":321,"tag":329,"props":457,"children":458},{"__ignoreMap":314},[459,488,509,531,553,563,604,613,622,662,700,724,733,766,800,809,818,833,842,855,896,905,959,968,977],{"type":321,"tag":460,"props":461,"children":464},"span",{"class":462,"line":463},"line",1,[465,471,477,482],{"type":321,"tag":460,"props":466,"children":468},{"style":467},"--shiki-light:#CF222E;--shiki-default:#CF222E;--shiki-dark:#FF7B72",[469],{"type":326,"value":470},"import",{"type":321,"tag":460,"props":472,"children":474},{"style":473},"--shiki-light:#1F2328;--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[475],{"type":326,"value":476}," { Integrator } ",{"type":321,"tag":460,"props":478,"children":479},{"style":467},[480],{"type":326,"value":481},"from",{"type":321,"tag":460,"props":483,"children":485},{"style":484},"--shiki-light:#0A3069;--shiki-default:#0A3069;--shiki-dark:#A5D6FF",[486],{"type":326,"value":487}," '@churnkey/sdk'\n",{"type":321,"tag":460,"props":489,"children":490},{"class":462,"line":347},[491,495,500,504],{"type":321,"tag":460,"props":492,"children":493},{"style":467},[494],{"type":326,"value":470},{"type":321,"tag":460,"props":496,"children":497},{"style":473},[498],{"type":326,"value":499}," { Context } ",{"type":321,"tag":460,"props":501,"children":502},{"style":467},[503],{"type":326,"value":481},{"type":321,"tag":460,"props":505,"children":506},{"style":484},[507],{"type":326,"value":508}," '../Context'\n",{"type":321,"tag":460,"props":510,"children":512},{"class":462,"line":511},3,[513,517,522,526],{"type":321,"tag":460,"props":514,"children":515},{"style":467},[516],{"type":326,"value":470},{"type":321,"tag":460,"props":518,"children":519},{"style":473},[520],{"type":326,"value":521}," { Subscription } ",{"type":321,"tag":460,"props":523,"children":524},{"style":467},[525],{"type":326,"value":481},{"type":321,"tag":460,"props":527,"children":528},{"style":484},[529],{"type":326,"value":530}," '../models/Subscription'\n",{"type":321,"tag":460,"props":532,"children":534},{"class":462,"line":533},4,[535,539,544,548],{"type":321,"tag":460,"props":536,"children":537},{"style":467},[538],{"type":326,"value":470},{"type":321,"tag":460,"props":540,"children":541},{"style":473},[542],{"type":326,"value":543}," { Prices } ",{"type":321,"tag":460,"props":545,"children":546},{"style":467},[547],{"type":326,"value":481},{"type":321,"tag":460,"props":549,"children":550},{"style":484},[551],{"type":326,"value":552}," './Prices'\n",{"type":321,"tag":460,"props":554,"children":556},{"class":462,"line":555},5,[557],{"type":321,"tag":460,"props":558,"children":560},{"emptyLinePlaceholder":559},true,[561],{"type":326,"value":562},"\n",{"type":321,"tag":460,"props":564,"children":566},{"class":462,"line":565},6,[567,572,577,583,588,593,599],{"type":321,"tag":460,"props":568,"children":569},{"style":467},[570],{"type":326,"value":571},"export",{"type":321,"tag":460,"props":573,"children":574},{"style":467},[575],{"type":326,"value":576}," const",{"type":321,"tag":460,"props":578,"children":580},{"style":579},"--shiki-light:#0550AE;--shiki-default:#0550AE;--shiki-dark:#79C0FF",[581],{"type":326,"value":582}," Subscriptions",{"type":321,"tag":460,"props":584,"children":585},{"style":467},[586],{"type":326,"value":587}," =",{"type":321,"tag":460,"props":589,"children":590},{"style":473},[591],{"type":326,"value":592}," Integrator.Subscriptions.",{"type":321,"tag":460,"props":594,"children":596},{"style":595},"--shiki-light:#8250DF;--shiki-default:#8250DF;--shiki-dark:#D2A8FF",[597],{"type":326,"value":598},"config",{"type":321,"tag":460,"props":600,"children":601},{"style":473},[602],{"type":326,"value":603},"({\n",{"type":321,"tag":460,"props":605,"children":607},{"class":462,"line":606},7,[608],{"type":321,"tag":460,"props":609,"children":610},{"style":473},[611],{"type":326,"value":612},"    ctx: Context,\n",{"type":321,"tag":460,"props":614,"children":616},{"class":462,"line":615},8,[617],{"type":321,"tag":460,"props":618,"children":619},{"style":473},[620],{"type":326,"value":621},"    Prices: Prices,\n",{"type":321,"tag":460,"props":623,"children":625},{"class":462,"line":624},9,[626,631,636,641,647,652,657],{"type":321,"tag":460,"props":627,"children":628},{"style":467},[629],{"type":326,"value":630},"    async",{"type":321,"tag":460,"props":632,"children":633},{"style":595},[634],{"type":326,"value":635}," retrieve",{"type":321,"tag":460,"props":637,"children":638},{"style":473},[639],{"type":326,"value":640},"(",{"type":321,"tag":460,"props":642,"children":644},{"style":643},"--shiki-light:#953800;--shiki-default:#953800;--shiki-dark:#FFA657",[645],{"type":326,"value":646},"ctx",{"type":321,"tag":460,"props":648,"children":649},{"style":473},[650],{"type":326,"value":651},", ",{"type":321,"tag":460,"props":653,"children":654},{"style":643},[655],{"type":326,"value":656},"options",{"type":321,"tag":460,"props":658,"children":659},{"style":473},[660],{"type":326,"value":661},") {\n",{"type":321,"tag":460,"props":663,"children":665},{"class":462,"line":664},10,[666,671,676,680,685,690,695],{"type":321,"tag":460,"props":667,"children":668},{"style":467},[669],{"type":326,"value":670},"        const",{"type":321,"tag":460,"props":672,"children":673},{"style":579},[674],{"type":326,"value":675}," yourSubscription",{"type":321,"tag":460,"props":677,"children":678},{"style":467},[679],{"type":326,"value":587},{"type":321,"tag":460,"props":681,"children":682},{"style":467},[683],{"type":326,"value":684}," await",{"type":321,"tag":460,"props":686,"children":687},{"style":473},[688],{"type":326,"value":689}," ctx.db.",{"type":321,"tag":460,"props":691,"children":692},{"style":595},[693],{"type":326,"value":694},"findSubscription",{"type":321,"tag":460,"props":696,"children":697},{"style":473},[698],{"type":326,"value":699},"(options.customerId, options.id)\n",{"type":321,"tag":460,"props":701,"children":703},{"class":462,"line":702},11,[704,709,714,719],{"type":321,"tag":460,"props":705,"children":706},{"style":467},[707],{"type":326,"value":708},"        return",{"type":321,"tag":460,"props":710,"children":711},{"style":467},[712],{"type":326,"value":713}," new",{"type":321,"tag":460,"props":715,"children":716},{"style":595},[717],{"type":326,"value":718}," Subscription",{"type":321,"tag":460,"props":720,"children":721},{"style":473},[722],{"type":326,"value":723},"(yourSubscription)\n",{"type":321,"tag":460,"props":725,"children":727},{"class":462,"line":726},12,[728],{"type":321,"tag":460,"props":729,"children":730},{"style":473},[731],{"type":326,"value":732},"    },\n",{"type":321,"tag":460,"props":734,"children":736},{"class":462,"line":735},13,[737,741,746,750,754,758,762],{"type":321,"tag":460,"props":738,"children":739},{"style":467},[740],{"type":326,"value":630},{"type":321,"tag":460,"props":742,"children":743},{"style":595},[744],{"type":326,"value":745}," list",{"type":321,"tag":460,"props":747,"children":748},{"style":473},[749],{"type":326,"value":640},{"type":321,"tag":460,"props":751,"children":752},{"style":643},[753],{"type":326,"value":646},{"type":321,"tag":460,"props":755,"children":756},{"style":473},[757],{"type":326,"value":651},{"type":321,"tag":460,"props":759,"children":760},{"style":643},[761],{"type":326,"value":656},{"type":321,"tag":460,"props":763,"children":764},{"style":473},[765],{"type":326,"value":661},{"type":321,"tag":460,"props":767,"children":769},{"class":462,"line":768},14,[770,774,779,783,787,791,796],{"type":321,"tag":460,"props":771,"children":772},{"style":467},[773],{"type":326,"value":670},{"type":321,"tag":460,"props":775,"children":776},{"style":579},[777],{"type":326,"value":778}," yourSubscriptions",{"type":321,"tag":460,"props":780,"children":781},{"style":467},[782],{"type":326,"value":587},{"type":321,"tag":460,"props":784,"children":785},{"style":467},[786],{"type":326,"value":684},{"type":321,"tag":460,"props":788,"children":789},{"style":473},[790],{"type":326,"value":689},{"type":321,"tag":460,"props":792,"children":793},{"style":595},[794],{"type":326,"value":795},"listSubscriptions",{"type":321,"tag":460,"props":797,"children":798},{"style":473},[799],{"type":326,"value":603},{"type":321,"tag":460,"props":801,"children":803},{"class":462,"line":802},15,[804],{"type":321,"tag":460,"props":805,"children":806},{"style":473},[807],{"type":326,"value":808},"            customerId: options.customerId,\n",{"type":321,"tag":460,"props":810,"children":812},{"class":462,"line":811},16,[813],{"type":321,"tag":460,"props":814,"children":815},{"style":473},[816],{"type":326,"value":817},"            limit: options.limit,\n",{"type":321,"tag":460,"props":819,"children":821},{"class":462,"line":820},17,[822,827],{"type":321,"tag":460,"props":823,"children":824},{"style":473},[825],{"type":326,"value":826},"            offset: options.cursor ",{"type":321,"tag":460,"props":828,"children":830},{"style":829},"--shiki-light:#6E7781;--shiki-default:#6E7781;--shiki-dark:#8B949E",[831],{"type":326,"value":832},"// the value you passed as `next` below\n",{"type":321,"tag":460,"props":834,"children":836},{"class":462,"line":835},18,[837],{"type":321,"tag":460,"props":838,"children":839},{"style":473},[840],{"type":326,"value":841},"        })\n",{"type":321,"tag":460,"props":843,"children":845},{"class":462,"line":844},19,[846,850],{"type":321,"tag":460,"props":847,"children":848},{"style":467},[849],{"type":326,"value":708},{"type":321,"tag":460,"props":851,"children":852},{"style":473},[853],{"type":326,"value":854}," {\n",{"type":321,"tag":460,"props":856,"children":858},{"class":462,"line":857},20,[859,864,869,873,878,883,887,891],{"type":321,"tag":460,"props":860,"children":861},{"style":473},[862],{"type":326,"value":863},"            data: yourSubscriptions.",{"type":321,"tag":460,"props":865,"children":866},{"style":595},[867],{"type":326,"value":868},"map",{"type":321,"tag":460,"props":870,"children":871},{"style":473},[872],{"type":326,"value":640},{"type":321,"tag":460,"props":874,"children":875},{"style":643},[876],{"type":326,"value":877},"subscription",{"type":321,"tag":460,"props":879,"children":880},{"style":467},[881],{"type":326,"value":882}," =>",{"type":321,"tag":460,"props":884,"children":885},{"style":467},[886],{"type":326,"value":713},{"type":321,"tag":460,"props":888,"children":889},{"style":595},[890],{"type":326,"value":718},{"type":321,"tag":460,"props":892,"children":893},{"style":473},[894],{"type":326,"value":895},"(subscription)),\n",{"type":321,"tag":460,"props":897,"children":899},{"class":462,"line":898},21,[900],{"type":321,"tag":460,"props":901,"children":902},{"style":829},[903],{"type":326,"value":904},"            // pass the next cursor if there are more items\n",{"type":321,"tag":460,"props":906,"children":908},{"class":462,"line":907},22,[909,914,919,924,929,934,939,944,949,954],{"type":321,"tag":460,"props":910,"children":911},{"style":473},[912],{"type":326,"value":913},"            next: yourSubscriptions.",{"type":321,"tag":460,"props":915,"children":916},{"style":579},[917],{"type":326,"value":918},"length",{"type":321,"tag":460,"props":920,"children":921},{"style":467},[922],{"type":326,"value":923}," ===",{"type":321,"tag":460,"props":925,"children":926},{"style":473},[927],{"type":326,"value":928}," options.limit ",{"type":321,"tag":460,"props":930,"children":931},{"style":467},[932],{"type":326,"value":933},"?",{"type":321,"tag":460,"props":935,"children":936},{"style":473},[937],{"type":326,"value":938}," offset ",{"type":321,"tag":460,"props":940,"children":941},{"style":467},[942],{"type":326,"value":943},"+",{"type":321,"tag":460,"props":945,"children":946},{"style":473},[947],{"type":326,"value":948}," limit ",{"type":321,"tag":460,"props":950,"children":951},{"style":467},[952],{"type":326,"value":953},":",{"type":321,"tag":460,"props":955,"children":956},{"style":579},[957],{"type":326,"value":958}," undefined\n",{"type":321,"tag":460,"props":960,"children":962},{"class":462,"line":961},23,[963],{"type":321,"tag":460,"props":964,"children":965},{"style":473},[966],{"type":326,"value":967},"        }\n",{"type":321,"tag":460,"props":969,"children":971},{"class":462,"line":970},24,[972],{"type":321,"tag":460,"props":973,"children":974},{"style":473},[975],{"type":326,"value":976},"    }\n",{"type":321,"tag":460,"props":978,"children":980},{"class":462,"line":979},25,[981],{"type":321,"tag":460,"props":982,"children":983},{"style":473},[984],{"type":326,"value":985},"})\n",{"type":321,"tag":338,"props":987,"children":989},{"id":988},"endpoints",[990],{"type":326,"value":991},"Endpoints",{"type":321,"tag":993,"props":994,"children":996},"h3",{"id":995},"retrieve",[997,999],{"type":326,"value":998},"Retrieve ",{"type":321,"tag":367,"props":1000,"children":1001},{"label":369,"color":370},[],{"type":321,"tag":322,"props":1003,"children":1004},{},[1005],{"type":321,"tag":329,"props":1006,"children":1008},{"className":1007},[],[1009],{"type":326,"value":1010},"GET /churnkey/customers/:customerId/subscriptions/:id",{"type":321,"tag":322,"props":1012,"children":1013},{},[1014,1016,1022,1024,1030,1032,1038],{"type":326,"value":1015},"This endpoint fetches ",{"type":321,"tag":329,"props":1017,"children":1019},{"className":1018},[],[1020],{"type":326,"value":1021},"Subscription",{"type":326,"value":1023}," by its ",{"type":321,"tag":329,"props":1025,"children":1027},{"className":1026},[],[1028],{"type":326,"value":1029},"id",{"type":326,"value":1031},". Usually, implementation will include finding a subscription in your database and mapping it to the ",{"type":321,"tag":1033,"props":1034,"children":1035},"a",{"href":353},[1036],{"type":326,"value":1037},"Subscription model",{"type":326,"value":1039},".",{"type":321,"tag":1041,"props":1042,"children":1044},"collapsible",{"name":1043},"response",[1045],{"type":321,"tag":1046,"props":1047,"children":1048},"tabs",{},[1049,1072],{"type":321,"tag":1050,"props":1051,"children":1053},"div",{"label":1052},"200",[1054],{"type":321,"tag":322,"props":1055,"children":1056},{},[1057,1059,1064,1066,1071],{"type":326,"value":1058},"Must return ",{"type":321,"tag":329,"props":1060,"children":1062},{"className":1061},[],[1063],{"type":326,"value":1021},{"type":326,"value":1065}," model. See ",{"type":321,"tag":1033,"props":1067,"children":1068},{"href":353},[1069],{"type":326,"value":1070},"Subscription model documentation",{"type":326,"value":1039},{"type":321,"tag":1050,"props":1073,"children":1075},{"label":1074},"Error",[1076],{"type":321,"tag":322,"props":1077,"children":1078},{},[1079,1081,1087],{"type":326,"value":1080},"See ",{"type":321,"tag":1033,"props":1082,"children":1084},{"href":1083},"/integrations/general#error-responses",[1085],{"type":326,"value":1086},"Error Responses",{"type":326,"value":1039},{"type":321,"tag":1041,"props":1089,"children":1091},{"name":1090},"code example",[1092],{"type":321,"tag":445,"props":1093,"children":1094},{},[1095],{"type":321,"tag":449,"props":1096,"children":1099},{"className":451,"code":1097,"filename":1098,"language":454,"meta":314,"style":314},"import { Subscription } from '../models/Subscription'\n\napp.get('/churnkey/customers/:customerId/subscriptions/:id', async (req, res) => {\n    const subscription = await db.findSubscriptionById(req.params.id)\n    if (!subscription) {\n        return res.status(404).send({ code: 404, message: 'Subscription not found' })\n    }\n    res.send(new Subscription(subscription))\n})\n","Typescript Express",[1100],{"type":321,"tag":329,"props":1101,"children":1102},{"__ignoreMap":314},[1103,1122,1129,1193,1229,1251,1311,1318,1348],{"type":321,"tag":460,"props":1104,"children":1105},{"class":462,"line":463},[1106,1110,1114,1118],{"type":321,"tag":460,"props":1107,"children":1108},{"style":467},[1109],{"type":326,"value":470},{"type":321,"tag":460,"props":1111,"children":1112},{"style":473},[1113],{"type":326,"value":521},{"type":321,"tag":460,"props":1115,"children":1116},{"style":467},[1117],{"type":326,"value":481},{"type":321,"tag":460,"props":1119,"children":1120},{"style":484},[1121],{"type":326,"value":530},{"type":321,"tag":460,"props":1123,"children":1124},{"class":462,"line":347},[1125],{"type":321,"tag":460,"props":1126,"children":1127},{"emptyLinePlaceholder":559},[1128],{"type":326,"value":562},{"type":321,"tag":460,"props":1130,"children":1131},{"class":462,"line":511},[1132,1137,1142,1146,1151,1155,1160,1165,1170,1174,1179,1184,1189],{"type":321,"tag":460,"props":1133,"children":1134},{"style":473},[1135],{"type":326,"value":1136},"app.",{"type":321,"tag":460,"props":1138,"children":1139},{"style":595},[1140],{"type":326,"value":1141},"get",{"type":321,"tag":460,"props":1143,"children":1144},{"style":473},[1145],{"type":326,"value":640},{"type":321,"tag":460,"props":1147,"children":1148},{"style":484},[1149],{"type":326,"value":1150},"'/churnkey/customers/:customerId/subscriptions/:id'",{"type":321,"tag":460,"props":1152,"children":1153},{"style":473},[1154],{"type":326,"value":651},{"type":321,"tag":460,"props":1156,"children":1157},{"style":467},[1158],{"type":326,"value":1159},"async",{"type":321,"tag":460,"props":1161,"children":1162},{"style":473},[1163],{"type":326,"value":1164}," (",{"type":321,"tag":460,"props":1166,"children":1167},{"style":643},[1168],{"type":326,"value":1169},"req",{"type":321,"tag":460,"props":1171,"children":1172},{"style":473},[1173],{"type":326,"value":651},{"type":321,"tag":460,"props":1175,"children":1176},{"style":643},[1177],{"type":326,"value":1178},"res",{"type":321,"tag":460,"props":1180,"children":1181},{"style":473},[1182],{"type":326,"value":1183},") ",{"type":321,"tag":460,"props":1185,"children":1186},{"style":467},[1187],{"type":326,"value":1188},"=>",{"type":321,"tag":460,"props":1190,"children":1191},{"style":473},[1192],{"type":326,"value":854},{"type":321,"tag":460,"props":1194,"children":1195},{"class":462,"line":533},[1196,1201,1206,1210,1214,1219,1224],{"type":321,"tag":460,"props":1197,"children":1198},{"style":467},[1199],{"type":326,"value":1200},"    const",{"type":321,"tag":460,"props":1202,"children":1203},{"style":579},[1204],{"type":326,"value":1205}," subscription",{"type":321,"tag":460,"props":1207,"children":1208},{"style":467},[1209],{"type":326,"value":587},{"type":321,"tag":460,"props":1211,"children":1212},{"style":467},[1213],{"type":326,"value":684},{"type":321,"tag":460,"props":1215,"children":1216},{"style":473},[1217],{"type":326,"value":1218}," db.",{"type":321,"tag":460,"props":1220,"children":1221},{"style":595},[1222],{"type":326,"value":1223},"findSubscriptionById",{"type":321,"tag":460,"props":1225,"children":1226},{"style":473},[1227],{"type":326,"value":1228},"(req.params.id)\n",{"type":321,"tag":460,"props":1230,"children":1231},{"class":462,"line":555},[1232,1237,1241,1246],{"type":321,"tag":460,"props":1233,"children":1234},{"style":467},[1235],{"type":326,"value":1236},"    if",{"type":321,"tag":460,"props":1238,"children":1239},{"style":473},[1240],{"type":326,"value":1164},{"type":321,"tag":460,"props":1242,"children":1243},{"style":467},[1244],{"type":326,"value":1245},"!",{"type":321,"tag":460,"props":1247,"children":1248},{"style":473},[1249],{"type":326,"value":1250},"subscription) {\n",{"type":321,"tag":460,"props":1252,"children":1253},{"class":462,"line":565},[1254,1258,1263,1268,1272,1277,1282,1287,1292,1296,1301,1306],{"type":321,"tag":460,"props":1255,"children":1256},{"style":467},[1257],{"type":326,"value":708},{"type":321,"tag":460,"props":1259,"children":1260},{"style":473},[1261],{"type":326,"value":1262}," res.",{"type":321,"tag":460,"props":1264,"children":1265},{"style":595},[1266],{"type":326,"value":1267},"status",{"type":321,"tag":460,"props":1269,"children":1270},{"style":473},[1271],{"type":326,"value":640},{"type":321,"tag":460,"props":1273,"children":1274},{"style":579},[1275],{"type":326,"value":1276},"404",{"type":321,"tag":460,"props":1278,"children":1279},{"style":473},[1280],{"type":326,"value":1281},").",{"type":321,"tag":460,"props":1283,"children":1284},{"style":595},[1285],{"type":326,"value":1286},"send",{"type":321,"tag":460,"props":1288,"children":1289},{"style":473},[1290],{"type":326,"value":1291},"({ code: ",{"type":321,"tag":460,"props":1293,"children":1294},{"style":579},[1295],{"type":326,"value":1276},{"type":321,"tag":460,"props":1297,"children":1298},{"style":473},[1299],{"type":326,"value":1300},", message: ",{"type":321,"tag":460,"props":1302,"children":1303},{"style":484},[1304],{"type":326,"value":1305},"'Subscription not found'",{"type":321,"tag":460,"props":1307,"children":1308},{"style":473},[1309],{"type":326,"value":1310}," })\n",{"type":321,"tag":460,"props":1312,"children":1313},{"class":462,"line":606},[1314],{"type":321,"tag":460,"props":1315,"children":1316},{"style":473},[1317],{"type":326,"value":976},{"type":321,"tag":460,"props":1319,"children":1320},{"class":462,"line":615},[1321,1326,1330,1334,1339,1343],{"type":321,"tag":460,"props":1322,"children":1323},{"style":473},[1324],{"type":326,"value":1325},"    res.",{"type":321,"tag":460,"props":1327,"children":1328},{"style":595},[1329],{"type":326,"value":1286},{"type":321,"tag":460,"props":1331,"children":1332},{"style":473},[1333],{"type":326,"value":640},{"type":321,"tag":460,"props":1335,"children":1336},{"style":467},[1337],{"type":326,"value":1338},"new",{"type":321,"tag":460,"props":1340,"children":1341},{"style":595},[1342],{"type":326,"value":718},{"type":321,"tag":460,"props":1344,"children":1345},{"style":473},[1346],{"type":326,"value":1347},"(subscription))\n",{"type":321,"tag":460,"props":1349,"children":1350},{"class":462,"line":624},[1351],{"type":321,"tag":460,"props":1352,"children":1353},{"style":473},[1354],{"type":326,"value":985},{"type":321,"tag":993,"props":1356,"children":1358},{"id":1357},"list",[1359,1361],{"type":326,"value":1360},"List ",{"type":321,"tag":367,"props":1362,"children":1363},{"label":420},[],{"type":321,"tag":322,"props":1365,"children":1366},{},[1367],{"type":321,"tag":329,"props":1368,"children":1370},{"className":1369},[],[1371],{"type":326,"value":1372},"GET /churnkey/customers/:customerId/subscriptions",{"type":321,"tag":322,"props":1374,"children":1375},{},[1376,1378,1383],{"type":326,"value":1377},"This endpoint fetches a list of subscriptions from your database. You should find subscriptions in your database (with pagination), map them to the ",{"type":321,"tag":329,"props":1379,"children":1381},{"className":1380},[],[1382],{"type":326,"value":1021},{"type":326,"value":1384}," model and return a paginated list.",{"type":321,"tag":322,"props":1386,"children":1387},{},[1388,1394],{"type":321,"tag":1033,"props":1389,"children":1391},{"href":1390},"/integrations/general#pagination",[1392],{"type":326,"value":1393},"Learn more about pagination",{"type":326,"value":1039},{"type":321,"tag":1041,"props":1396,"children":1398},{"name":1397},"query parameters",[1399],{"type":321,"tag":1400,"props":1401,"children":1403},"field-schema",{"schema":1402},"/types/pagination-query.type",[],{"type":321,"tag":1041,"props":1405,"children":1406},{"name":1043},[1407],{"type":321,"tag":1400,"props":1408,"children":1410},{"schema":1409},"/types/pagination-response.type",[],{"type":321,"tag":1041,"props":1412,"children":1413},{"name":1090},[1414],{"type":321,"tag":445,"props":1415,"children":1416},{},[1417],{"type":321,"tag":449,"props":1418,"children":1420},{"className":451,"code":1419,"filename":1098,"language":454,"meta":314,"style":314},"import { Subscription } from '../models/Subscription'\n\napp.get('/churnkey/customers/:customerId/subscriptions', async (req, res) => {\n    const limit = Number.parseInt(req.query.limit)\n    const offset = Number.parseInt(req.query.cursor) \n    const subscriptions = await db.findSubscriptions({ \n        limit, offset, \n        customerId: req.params.customerId \n    })\n    res.send({\n        data: subscriptions.map(c => new Subscription(c)),\n        next: subscriptions.length === limit ? offset + limit : undefined\n    })\n})\n",[1421],{"type":321,"tag":329,"props":1422,"children":1423},{"__ignoreMap":314},[1424,1443,1450,1506,1537,1566,1600,1608,1616,1624,1639,1677,1721,1728],{"type":321,"tag":460,"props":1425,"children":1426},{"class":462,"line":463},[1427,1431,1435,1439],{"type":321,"tag":460,"props":1428,"children":1429},{"style":467},[1430],{"type":326,"value":470},{"type":321,"tag":460,"props":1432,"children":1433},{"style":473},[1434],{"type":326,"value":521},{"type":321,"tag":460,"props":1436,"children":1437},{"style":467},[1438],{"type":326,"value":481},{"type":321,"tag":460,"props":1440,"children":1441},{"style":484},[1442],{"type":326,"value":530},{"type":321,"tag":460,"props":1444,"children":1445},{"class":462,"line":347},[1446],{"type":321,"tag":460,"props":1447,"children":1448},{"emptyLinePlaceholder":559},[1449],{"type":326,"value":562},{"type":321,"tag":460,"props":1451,"children":1452},{"class":462,"line":511},[1453,1457,1461,1465,1470,1474,1478,1482,1486,1490,1494,1498,1502],{"type":321,"tag":460,"props":1454,"children":1455},{"style":473},[1456],{"type":326,"value":1136},{"type":321,"tag":460,"props":1458,"children":1459},{"style":595},[1460],{"type":326,"value":1141},{"type":321,"tag":460,"props":1462,"children":1463},{"style":473},[1464],{"type":326,"value":640},{"type":321,"tag":460,"props":1466,"children":1467},{"style":484},[1468],{"type":326,"value":1469},"'/churnkey/customers/:customerId/subscriptions'",{"type":321,"tag":460,"props":1471,"children":1472},{"style":473},[1473],{"type":326,"value":651},{"type":321,"tag":460,"props":1475,"children":1476},{"style":467},[1477],{"type":326,"value":1159},{"type":321,"tag":460,"props":1479,"children":1480},{"style":473},[1481],{"type":326,"value":1164},{"type":321,"tag":460,"props":1483,"children":1484},{"style":643},[1485],{"type":326,"value":1169},{"type":321,"tag":460,"props":1487,"children":1488},{"style":473},[1489],{"type":326,"value":651},{"type":321,"tag":460,"props":1491,"children":1492},{"style":643},[1493],{"type":326,"value":1178},{"type":321,"tag":460,"props":1495,"children":1496},{"style":473},[1497],{"type":326,"value":1183},{"type":321,"tag":460,"props":1499,"children":1500},{"style":467},[1501],{"type":326,"value":1188},{"type":321,"tag":460,"props":1503,"children":1504},{"style":473},[1505],{"type":326,"value":854},{"type":321,"tag":460,"props":1507,"children":1508},{"class":462,"line":533},[1509,1513,1518,1522,1527,1532],{"type":321,"tag":460,"props":1510,"children":1511},{"style":467},[1512],{"type":326,"value":1200},{"type":321,"tag":460,"props":1514,"children":1515},{"style":579},[1516],{"type":326,"value":1517}," limit",{"type":321,"tag":460,"props":1519,"children":1520},{"style":467},[1521],{"type":326,"value":587},{"type":321,"tag":460,"props":1523,"children":1524},{"style":473},[1525],{"type":326,"value":1526}," Number.",{"type":321,"tag":460,"props":1528,"children":1529},{"style":595},[1530],{"type":326,"value":1531},"parseInt",{"type":321,"tag":460,"props":1533,"children":1534},{"style":473},[1535],{"type":326,"value":1536},"(req.query.limit)\n",{"type":321,"tag":460,"props":1538,"children":1539},{"class":462,"line":555},[1540,1544,1549,1553,1557,1561],{"type":321,"tag":460,"props":1541,"children":1542},{"style":467},[1543],{"type":326,"value":1200},{"type":321,"tag":460,"props":1545,"children":1546},{"style":579},[1547],{"type":326,"value":1548}," offset",{"type":321,"tag":460,"props":1550,"children":1551},{"style":467},[1552],{"type":326,"value":587},{"type":321,"tag":460,"props":1554,"children":1555},{"style":473},[1556],{"type":326,"value":1526},{"type":321,"tag":460,"props":1558,"children":1559},{"style":595},[1560],{"type":326,"value":1531},{"type":321,"tag":460,"props":1562,"children":1563},{"style":473},[1564],{"type":326,"value":1565},"(req.query.cursor) \n",{"type":321,"tag":460,"props":1567,"children":1568},{"class":462,"line":565},[1569,1573,1578,1582,1586,1590,1595],{"type":321,"tag":460,"props":1570,"children":1571},{"style":467},[1572],{"type":326,"value":1200},{"type":321,"tag":460,"props":1574,"children":1575},{"style":579},[1576],{"type":326,"value":1577}," subscriptions",{"type":321,"tag":460,"props":1579,"children":1580},{"style":467},[1581],{"type":326,"value":587},{"type":321,"tag":460,"props":1583,"children":1584},{"style":467},[1585],{"type":326,"value":684},{"type":321,"tag":460,"props":1587,"children":1588},{"style":473},[1589],{"type":326,"value":1218},{"type":321,"tag":460,"props":1591,"children":1592},{"style":595},[1593],{"type":326,"value":1594},"findSubscriptions",{"type":321,"tag":460,"props":1596,"children":1597},{"style":473},[1598],{"type":326,"value":1599},"({ \n",{"type":321,"tag":460,"props":1601,"children":1602},{"class":462,"line":606},[1603],{"type":321,"tag":460,"props":1604,"children":1605},{"style":473},[1606],{"type":326,"value":1607},"        limit, offset, \n",{"type":321,"tag":460,"props":1609,"children":1610},{"class":462,"line":615},[1611],{"type":321,"tag":460,"props":1612,"children":1613},{"style":473},[1614],{"type":326,"value":1615},"        customerId: req.params.customerId \n",{"type":321,"tag":460,"props":1617,"children":1618},{"class":462,"line":624},[1619],{"type":321,"tag":460,"props":1620,"children":1621},{"style":473},[1622],{"type":326,"value":1623},"    })\n",{"type":321,"tag":460,"props":1625,"children":1626},{"class":462,"line":664},[1627,1631,1635],{"type":321,"tag":460,"props":1628,"children":1629},{"style":473},[1630],{"type":326,"value":1325},{"type":321,"tag":460,"props":1632,"children":1633},{"style":595},[1634],{"type":326,"value":1286},{"type":321,"tag":460,"props":1636,"children":1637},{"style":473},[1638],{"type":326,"value":603},{"type":321,"tag":460,"props":1640,"children":1641},{"class":462,"line":702},[1642,1647,1651,1655,1660,1664,1668,1672],{"type":321,"tag":460,"props":1643,"children":1644},{"style":473},[1645],{"type":326,"value":1646},"        data: subscriptions.",{"type":321,"tag":460,"props":1648,"children":1649},{"style":595},[1650],{"type":326,"value":868},{"type":321,"tag":460,"props":1652,"children":1653},{"style":473},[1654],{"type":326,"value":640},{"type":321,"tag":460,"props":1656,"children":1657},{"style":643},[1658],{"type":326,"value":1659},"c",{"type":321,"tag":460,"props":1661,"children":1662},{"style":467},[1663],{"type":326,"value":882},{"type":321,"tag":460,"props":1665,"children":1666},{"style":467},[1667],{"type":326,"value":713},{"type":321,"tag":460,"props":1669,"children":1670},{"style":595},[1671],{"type":326,"value":718},{"type":321,"tag":460,"props":1673,"children":1674},{"style":473},[1675],{"type":326,"value":1676},"(c)),\n",{"type":321,"tag":460,"props":1678,"children":1679},{"class":462,"line":726},[1680,1685,1689,1693,1697,1701,1705,1709,1713,1717],{"type":321,"tag":460,"props":1681,"children":1682},{"style":473},[1683],{"type":326,"value":1684},"        next: subscriptions.",{"type":321,"tag":460,"props":1686,"children":1687},{"style":579},[1688],{"type":326,"value":918},{"type":321,"tag":460,"props":1690,"children":1691},{"style":467},[1692],{"type":326,"value":923},{"type":321,"tag":460,"props":1694,"children":1695},{"style":473},[1696],{"type":326,"value":948},{"type":321,"tag":460,"props":1698,"children":1699},{"style":467},[1700],{"type":326,"value":933},{"type":321,"tag":460,"props":1702,"children":1703},{"style":473},[1704],{"type":326,"value":938},{"type":321,"tag":460,"props":1706,"children":1707},{"style":467},[1708],{"type":326,"value":943},{"type":321,"tag":460,"props":1710,"children":1711},{"style":473},[1712],{"type":326,"value":948},{"type":321,"tag":460,"props":1714,"children":1715},{"style":467},[1716],{"type":326,"value":953},{"type":321,"tag":460,"props":1718,"children":1719},{"style":579},[1720],{"type":326,"value":958},{"type":321,"tag":460,"props":1722,"children":1723},{"class":462,"line":735},[1724],{"type":321,"tag":460,"props":1725,"children":1726},{"style":473},[1727],{"type":326,"value":1623},{"type":321,"tag":460,"props":1729,"children":1730},{"class":462,"line":768},[1731],{"type":321,"tag":460,"props":1732,"children":1733},{"style":473},[1734],{"type":326,"value":985},{"type":321,"tag":1736,"props":1737,"children":1738},"style",{},[1739],{"type":326,"value":1740},"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":314,"searchDepth":511,"depth":511,"links":1742},[1743,1744,1745],{"id":340,"depth":347,"text":343},{"id":428,"depth":347,"text":431},{"id":988,"depth":347,"text":991,"children":1746},[1747,1748],{"id":995,"depth":511,"text":998},{"id":1357,"depth":511,"text":1360},"markdown","content:99.integrations:3.controllers:4.subscriptions.md","content","99.integrations/3.controllers/4.subscriptions.md","99.integrations/3.controllers/4.subscriptions","md",{"loc":311},[1757,1759],{"_path":375,"title":374,"description":1758},"List and retrieve `Price` models.",{"_path":400,"title":399,"description":1760},"List and retrieve `Coupon` models.",{"_path":1402,"_dir":1762,"_draft":313,"_partial":313,"_locale":314,"type":1763,"title":1764,"properties":1765,"_id":1774,"_type":1775,"_source":1751,"_file":1776,"_stem":1777,"_extension":1775},"types","object","Pagination Query Params",{"limit":1766,"cursor":1770},{"type":1767,"severity":1768,"description":1769},"integer","required","Maximum number of items to return",{"type":1771,"severity":1772,"description":1773},"string","optional","Cursor for pagination. The actual value is whatever you decided to use as next in the response.","content:types:pagination-query.type.json","json","types/pagination-query.type.json","types/pagination-query.type",{"data":1779,"body":1780,"excerpt":-1,"toc":1786},{"title":314,"description":1769},{"type":318,"children":1781},[1782],{"type":321,"tag":322,"props":1783,"children":1784},{},[1785],{"type":326,"value":1769},{"title":314,"searchDepth":347,"depth":347,"links":1787},[],{"data":1789,"body":1790,"excerpt":-1,"toc":1796},{"title":314,"description":1773},{"type":318,"children":1791},[1792],{"type":321,"tag":322,"props":1793,"children":1794},{},[1795],{"type":326,"value":1773},{"title":314,"searchDepth":347,"depth":347,"links":1797},[],{"_path":1409,"_dir":1762,"_draft":313,"_partial":313,"_locale":314,"type":1763,"title":1799,"properties":1800,"_id":1807,"_type":1775,"_source":1751,"_file":1808,"_stem":1809,"_extension":1775},"Pagination Response",{"data":1801,"next":1805},{"type":1802,"severity":1768,"description":1803,"items":1804},"array","Array of items. The type of item is defined in the endpoint documentation, e.g. `Customer` for `/customers` endpoint",{"type":1763},{"type":1771,"severity":1772,"description":1806},"Either a next `id` or an `offset` for the next page. You decide what to use, we will send `next` value as a `cursor` query parameter back to you. If `next` is empty, there are no more pages","content:types:pagination-response.type.json","types/pagination-response.type.json","types/pagination-response.type",{"data":1811,"body":1813,"excerpt":-1,"toc":1836},{"title":314,"description":1812},"Array of items. The type of item is defined in the endpoint documentation, e.g. Customer for /customers endpoint",{"type":318,"children":1814},[1815],{"type":321,"tag":322,"props":1816,"children":1817},{},[1818,1820,1826,1828,1834],{"type":326,"value":1819},"Array of items. The type of item is defined in the endpoint documentation, e.g. ",{"type":321,"tag":329,"props":1821,"children":1823},{"className":1822},[],[1824],{"type":326,"value":1825},"Customer",{"type":326,"value":1827}," for ",{"type":321,"tag":329,"props":1829,"children":1831},{"className":1830},[],[1832],{"type":326,"value":1833},"/customers",{"type":326,"value":1835}," endpoint",{"title":314,"searchDepth":347,"depth":347,"links":1837},[],{"data":1839,"body":1841,"excerpt":-1,"toc":1886},{"title":314,"description":1840},"Either a next id or an offset for the next page. You decide what to use, we will send next value as a cursor query parameter back to you. If next is empty, there are no more pages",{"type":318,"children":1842},[1843],{"type":321,"tag":322,"props":1844,"children":1845},{},[1846,1848,1853,1855,1861,1863,1869,1871,1877,1879,1884],{"type":326,"value":1847},"Either a next ",{"type":321,"tag":329,"props":1849,"children":1851},{"className":1850},[],[1852],{"type":326,"value":1029},{"type":326,"value":1854}," or an ",{"type":321,"tag":329,"props":1856,"children":1858},{"className":1857},[],[1859],{"type":326,"value":1860},"offset",{"type":326,"value":1862}," for the next page. You decide what to use, we will send ",{"type":321,"tag":329,"props":1864,"children":1866},{"className":1865},[],[1867],{"type":326,"value":1868},"next",{"type":326,"value":1870}," value as a ",{"type":321,"tag":329,"props":1872,"children":1874},{"className":1873},[],[1875],{"type":326,"value":1876},"cursor",{"type":326,"value":1878}," query parameter back to you. If ",{"type":321,"tag":329,"props":1880,"children":1882},{"className":1881},[],[1883],{"type":326,"value":1868},{"type":326,"value":1885}," is empty, there are no more pages",{"title":314,"searchDepth":347,"depth":347,"links":1887},[],1775515592354]