[{"data":1,"prerenderedAt":1786},["ShallowReactive",2],{"navigation":3,"/integrations/controllers/coupons":310,"/integrations/controllers/coupons-surround":1650,"/types/pagination-query.type":1659,"T8X8wEDTTq":1676,"RlQfeeH749":1686,"/types/pagination-response.type":1696,"R6VCIDBMAK":1708,"wYpKjgCnmI":1736},[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":1643,"_id":1644,"_source":1645,"_file":1646,"_stem":1647,"_extension":1648,"sitemap":1649},"/integrations/controllers/coupons","controllers",false,"","Coupons - Controller","List and retrieve `Coupon` models.",{"type":318,"children":319,"toc":1634},"root",[320,337,344,372,378,390,892,898,908,917,946,994,1261,1270,1279,1291,1301,1310,1317,1618,1623,1628],{"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},"Coupons",{"type":326,"value":336}," controller, you need to implement 2 API endpoints, we will use these endpoints to fetch coupons 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],{"type":321,"tag":350,"props":351,"children":354},"card-baseline",{"title":352,"to":353},"Coupon Model","/integrations/models/coupon",[355,360],{"type":321,"tag":322,"props":356,"children":357},{},[358],{"type":326,"value":359},"A code that can be redeemed for a discount.",{"type":321,"tag":361,"props":362,"children":365},"flex",{"className":363},[364],"mt-4",[366],{"type":321,"tag":367,"props":368,"children":371},"badge",{"color":369,"label":370},"green","Required",[],{"type":321,"tag":338,"props":373,"children":375},{"id":374},"sdk",[376],{"type":326,"value":377},"SDK",{"type":321,"tag":322,"props":379,"children":380},{},[381,383,388],{"type":326,"value":382},"If you are using the SDK, you can implement the ",{"type":321,"tag":329,"props":384,"children":386},{"className":385},[],[387],{"type":326,"value":334},{"type":326,"value":389}," 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":391,"props":392,"children":393},"code-group",{},[394],{"type":321,"tag":395,"props":396,"children":401},"pre",{"className":397,"code":398,"filename":399,"language":400,"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 { Coupon } from '../models/Coupon'\n\nexport const Coupons = Integrator.Coupons.config({\n    ctx: Context,\n    async retrieve(ctx, options) {\n        const yourCoupon = await ctx.db.findCoupon(options.id)\n        return new Coupon(yourCoupon)\n    },\n    async list(ctx, options) {\n        const yourCoupons = await ctx.db.listCoupons({\n            limit: options.limit,\n            offset: options.cursor // the value you pass as `next` below\n        })\n        return {\n            data: yourCoupons.map(coupon => new Coupon(coupon)),\n            // pass the next cursor if there are more items\n            next: yourCoupons.length === options.limit ? offset + limit : undefined\n        }\n    }\n})\n","Typescript","typescript",[402],{"type":321,"tag":329,"props":403,"children":404},{"__ignoreMap":314},[405,434,455,477,487,528,537,577,615,639,648,681,715,724,739,748,761,802,811,865,874,883],{"type":321,"tag":406,"props":407,"children":410},"span",{"class":408,"line":409},"line",1,[411,417,423,428],{"type":321,"tag":406,"props":412,"children":414},{"style":413},"--shiki-light:#CF222E;--shiki-default:#CF222E;--shiki-dark:#FF7B72",[415],{"type":326,"value":416},"import",{"type":321,"tag":406,"props":418,"children":420},{"style":419},"--shiki-light:#1F2328;--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[421],{"type":326,"value":422}," { Integrator } ",{"type":321,"tag":406,"props":424,"children":425},{"style":413},[426],{"type":326,"value":427},"from",{"type":321,"tag":406,"props":429,"children":431},{"style":430},"--shiki-light:#0A3069;--shiki-default:#0A3069;--shiki-dark:#A5D6FF",[432],{"type":326,"value":433}," '@churnkey/sdk'\n",{"type":321,"tag":406,"props":435,"children":436},{"class":408,"line":347},[437,441,446,450],{"type":321,"tag":406,"props":438,"children":439},{"style":413},[440],{"type":326,"value":416},{"type":321,"tag":406,"props":442,"children":443},{"style":419},[444],{"type":326,"value":445}," { Context } ",{"type":321,"tag":406,"props":447,"children":448},{"style":413},[449],{"type":326,"value":427},{"type":321,"tag":406,"props":451,"children":452},{"style":430},[453],{"type":326,"value":454}," '../Context'\n",{"type":321,"tag":406,"props":456,"children":458},{"class":408,"line":457},3,[459,463,468,472],{"type":321,"tag":406,"props":460,"children":461},{"style":413},[462],{"type":326,"value":416},{"type":321,"tag":406,"props":464,"children":465},{"style":419},[466],{"type":326,"value":467}," { Coupon } ",{"type":321,"tag":406,"props":469,"children":470},{"style":413},[471],{"type":326,"value":427},{"type":321,"tag":406,"props":473,"children":474},{"style":430},[475],{"type":326,"value":476}," '../models/Coupon'\n",{"type":321,"tag":406,"props":478,"children":480},{"class":408,"line":479},4,[481],{"type":321,"tag":406,"props":482,"children":484},{"emptyLinePlaceholder":483},true,[485],{"type":326,"value":486},"\n",{"type":321,"tag":406,"props":488,"children":490},{"class":408,"line":489},5,[491,496,501,507,512,517,523],{"type":321,"tag":406,"props":492,"children":493},{"style":413},[494],{"type":326,"value":495},"export",{"type":321,"tag":406,"props":497,"children":498},{"style":413},[499],{"type":326,"value":500}," const",{"type":321,"tag":406,"props":502,"children":504},{"style":503},"--shiki-light:#0550AE;--shiki-default:#0550AE;--shiki-dark:#79C0FF",[505],{"type":326,"value":506}," Coupons",{"type":321,"tag":406,"props":508,"children":509},{"style":413},[510],{"type":326,"value":511}," =",{"type":321,"tag":406,"props":513,"children":514},{"style":419},[515],{"type":326,"value":516}," Integrator.Coupons.",{"type":321,"tag":406,"props":518,"children":520},{"style":519},"--shiki-light:#8250DF;--shiki-default:#8250DF;--shiki-dark:#D2A8FF",[521],{"type":326,"value":522},"config",{"type":321,"tag":406,"props":524,"children":525},{"style":419},[526],{"type":326,"value":527},"({\n",{"type":321,"tag":406,"props":529,"children":531},{"class":408,"line":530},6,[532],{"type":321,"tag":406,"props":533,"children":534},{"style":419},[535],{"type":326,"value":536},"    ctx: Context,\n",{"type":321,"tag":406,"props":538,"children":540},{"class":408,"line":539},7,[541,546,551,556,562,567,572],{"type":321,"tag":406,"props":542,"children":543},{"style":413},[544],{"type":326,"value":545},"    async",{"type":321,"tag":406,"props":547,"children":548},{"style":519},[549],{"type":326,"value":550}," retrieve",{"type":321,"tag":406,"props":552,"children":553},{"style":419},[554],{"type":326,"value":555},"(",{"type":321,"tag":406,"props":557,"children":559},{"style":558},"--shiki-light:#953800;--shiki-default:#953800;--shiki-dark:#FFA657",[560],{"type":326,"value":561},"ctx",{"type":321,"tag":406,"props":563,"children":564},{"style":419},[565],{"type":326,"value":566},", ",{"type":321,"tag":406,"props":568,"children":569},{"style":558},[570],{"type":326,"value":571},"options",{"type":321,"tag":406,"props":573,"children":574},{"style":419},[575],{"type":326,"value":576},") {\n",{"type":321,"tag":406,"props":578,"children":580},{"class":408,"line":579},8,[581,586,591,595,600,605,610],{"type":321,"tag":406,"props":582,"children":583},{"style":413},[584],{"type":326,"value":585},"        const",{"type":321,"tag":406,"props":587,"children":588},{"style":503},[589],{"type":326,"value":590}," yourCoupon",{"type":321,"tag":406,"props":592,"children":593},{"style":413},[594],{"type":326,"value":511},{"type":321,"tag":406,"props":596,"children":597},{"style":413},[598],{"type":326,"value":599}," await",{"type":321,"tag":406,"props":601,"children":602},{"style":419},[603],{"type":326,"value":604}," ctx.db.",{"type":321,"tag":406,"props":606,"children":607},{"style":519},[608],{"type":326,"value":609},"findCoupon",{"type":321,"tag":406,"props":611,"children":612},{"style":419},[613],{"type":326,"value":614},"(options.id)\n",{"type":321,"tag":406,"props":616,"children":618},{"class":408,"line":617},9,[619,624,629,634],{"type":321,"tag":406,"props":620,"children":621},{"style":413},[622],{"type":326,"value":623},"        return",{"type":321,"tag":406,"props":625,"children":626},{"style":413},[627],{"type":326,"value":628}," new",{"type":321,"tag":406,"props":630,"children":631},{"style":519},[632],{"type":326,"value":633}," Coupon",{"type":321,"tag":406,"props":635,"children":636},{"style":419},[637],{"type":326,"value":638},"(yourCoupon)\n",{"type":321,"tag":406,"props":640,"children":642},{"class":408,"line":641},10,[643],{"type":321,"tag":406,"props":644,"children":645},{"style":419},[646],{"type":326,"value":647},"    },\n",{"type":321,"tag":406,"props":649,"children":651},{"class":408,"line":650},11,[652,656,661,665,669,673,677],{"type":321,"tag":406,"props":653,"children":654},{"style":413},[655],{"type":326,"value":545},{"type":321,"tag":406,"props":657,"children":658},{"style":519},[659],{"type":326,"value":660}," list",{"type":321,"tag":406,"props":662,"children":663},{"style":419},[664],{"type":326,"value":555},{"type":321,"tag":406,"props":666,"children":667},{"style":558},[668],{"type":326,"value":561},{"type":321,"tag":406,"props":670,"children":671},{"style":419},[672],{"type":326,"value":566},{"type":321,"tag":406,"props":674,"children":675},{"style":558},[676],{"type":326,"value":571},{"type":321,"tag":406,"props":678,"children":679},{"style":419},[680],{"type":326,"value":576},{"type":321,"tag":406,"props":682,"children":684},{"class":408,"line":683},12,[685,689,694,698,702,706,711],{"type":321,"tag":406,"props":686,"children":687},{"style":413},[688],{"type":326,"value":585},{"type":321,"tag":406,"props":690,"children":691},{"style":503},[692],{"type":326,"value":693}," yourCoupons",{"type":321,"tag":406,"props":695,"children":696},{"style":413},[697],{"type":326,"value":511},{"type":321,"tag":406,"props":699,"children":700},{"style":413},[701],{"type":326,"value":599},{"type":321,"tag":406,"props":703,"children":704},{"style":419},[705],{"type":326,"value":604},{"type":321,"tag":406,"props":707,"children":708},{"style":519},[709],{"type":326,"value":710},"listCoupons",{"type":321,"tag":406,"props":712,"children":713},{"style":419},[714],{"type":326,"value":527},{"type":321,"tag":406,"props":716,"children":718},{"class":408,"line":717},13,[719],{"type":321,"tag":406,"props":720,"children":721},{"style":419},[722],{"type":326,"value":723},"            limit: options.limit,\n",{"type":321,"tag":406,"props":725,"children":727},{"class":408,"line":726},14,[728,733],{"type":321,"tag":406,"props":729,"children":730},{"style":419},[731],{"type":326,"value":732},"            offset: options.cursor ",{"type":321,"tag":406,"props":734,"children":736},{"style":735},"--shiki-light:#6E7781;--shiki-default:#6E7781;--shiki-dark:#8B949E",[737],{"type":326,"value":738},"// the value you pass as `next` below\n",{"type":321,"tag":406,"props":740,"children":742},{"class":408,"line":741},15,[743],{"type":321,"tag":406,"props":744,"children":745},{"style":419},[746],{"type":326,"value":747},"        })\n",{"type":321,"tag":406,"props":749,"children":751},{"class":408,"line":750},16,[752,756],{"type":321,"tag":406,"props":753,"children":754},{"style":413},[755],{"type":326,"value":623},{"type":321,"tag":406,"props":757,"children":758},{"style":419},[759],{"type":326,"value":760}," {\n",{"type":321,"tag":406,"props":762,"children":764},{"class":408,"line":763},17,[765,770,775,779,784,789,793,797],{"type":321,"tag":406,"props":766,"children":767},{"style":419},[768],{"type":326,"value":769},"            data: yourCoupons.",{"type":321,"tag":406,"props":771,"children":772},{"style":519},[773],{"type":326,"value":774},"map",{"type":321,"tag":406,"props":776,"children":777},{"style":419},[778],{"type":326,"value":555},{"type":321,"tag":406,"props":780,"children":781},{"style":558},[782],{"type":326,"value":783},"coupon",{"type":321,"tag":406,"props":785,"children":786},{"style":413},[787],{"type":326,"value":788}," =>",{"type":321,"tag":406,"props":790,"children":791},{"style":413},[792],{"type":326,"value":628},{"type":321,"tag":406,"props":794,"children":795},{"style":519},[796],{"type":326,"value":633},{"type":321,"tag":406,"props":798,"children":799},{"style":419},[800],{"type":326,"value":801},"(coupon)),\n",{"type":321,"tag":406,"props":803,"children":805},{"class":408,"line":804},18,[806],{"type":321,"tag":406,"props":807,"children":808},{"style":735},[809],{"type":326,"value":810},"            // pass the next cursor if there are more items\n",{"type":321,"tag":406,"props":812,"children":814},{"class":408,"line":813},19,[815,820,825,830,835,840,845,850,855,860],{"type":321,"tag":406,"props":816,"children":817},{"style":419},[818],{"type":326,"value":819},"            next: yourCoupons.",{"type":321,"tag":406,"props":821,"children":822},{"style":503},[823],{"type":326,"value":824},"length",{"type":321,"tag":406,"props":826,"children":827},{"style":413},[828],{"type":326,"value":829}," ===",{"type":321,"tag":406,"props":831,"children":832},{"style":419},[833],{"type":326,"value":834}," options.limit ",{"type":321,"tag":406,"props":836,"children":837},{"style":413},[838],{"type":326,"value":839},"?",{"type":321,"tag":406,"props":841,"children":842},{"style":419},[843],{"type":326,"value":844}," offset ",{"type":321,"tag":406,"props":846,"children":847},{"style":413},[848],{"type":326,"value":849},"+",{"type":321,"tag":406,"props":851,"children":852},{"style":419},[853],{"type":326,"value":854}," limit ",{"type":321,"tag":406,"props":856,"children":857},{"style":413},[858],{"type":326,"value":859},":",{"type":321,"tag":406,"props":861,"children":862},{"style":503},[863],{"type":326,"value":864}," undefined\n",{"type":321,"tag":406,"props":866,"children":868},{"class":408,"line":867},20,[869],{"type":321,"tag":406,"props":870,"children":871},{"style":419},[872],{"type":326,"value":873},"        }\n",{"type":321,"tag":406,"props":875,"children":877},{"class":408,"line":876},21,[878],{"type":321,"tag":406,"props":879,"children":880},{"style":419},[881],{"type":326,"value":882},"    }\n",{"type":321,"tag":406,"props":884,"children":886},{"class":408,"line":885},22,[887],{"type":321,"tag":406,"props":888,"children":889},{"style":419},[890],{"type":326,"value":891},"})\n",{"type":321,"tag":338,"props":893,"children":895},{"id":894},"endpoints",[896],{"type":326,"value":897},"Endpoints",{"type":321,"tag":899,"props":900,"children":902},"h3",{"id":901},"retrieve",[903,905],{"type":326,"value":904},"Retrieve ",{"type":321,"tag":367,"props":906,"children":907},{"color":369,"label":370},[],{"type":321,"tag":322,"props":909,"children":910},{},[911],{"type":321,"tag":329,"props":912,"children":914},{"className":913},[],[915],{"type":326,"value":916},"GET /churnkey/coupons/:id",{"type":321,"tag":322,"props":918,"children":919},{},[920,922,928,930,936,938,944],{"type":326,"value":921},"This endpoint fetches ",{"type":321,"tag":329,"props":923,"children":925},{"className":924},[],[926],{"type":326,"value":927},"Coupon",{"type":326,"value":929}," by its ",{"type":321,"tag":329,"props":931,"children":933},{"className":932},[],[934],{"type":326,"value":935},"id",{"type":326,"value":937},". Usually, implementation will include finding a coupon in your database and mapping it to the ",{"type":321,"tag":939,"props":940,"children":941},"a",{"href":353},[942],{"type":326,"value":943},"Coupon model",{"type":326,"value":945},".",{"type":321,"tag":947,"props":948,"children":950},"collapsible",{"name":949},"response",[951],{"type":321,"tag":952,"props":953,"children":954},"tabs",{},[955,978],{"type":321,"tag":956,"props":957,"children":959},"div",{"label":958},"200",[960],{"type":321,"tag":322,"props":961,"children":962},{},[963,965,970,972,977],{"type":326,"value":964},"Must return ",{"type":321,"tag":329,"props":966,"children":968},{"className":967},[],[969],{"type":326,"value":927},{"type":326,"value":971}," model. See ",{"type":321,"tag":939,"props":973,"children":974},{"href":353},[975],{"type":326,"value":976},"Coupon model documentation",{"type":326,"value":945},{"type":321,"tag":956,"props":979,"children":981},{"label":980},"Error",[982],{"type":321,"tag":322,"props":983,"children":984},{},[985,987,993],{"type":326,"value":986},"See ",{"type":321,"tag":939,"props":988,"children":990},{"href":989},"/integrations/general#error-responses",[991],{"type":326,"value":992},"Error Responses",{"type":326,"value":945},{"type":321,"tag":947,"props":995,"children":997},{"name":996},"code example",[998],{"type":321,"tag":391,"props":999,"children":1000},{},[1001],{"type":321,"tag":395,"props":1002,"children":1005},{"className":397,"code":1003,"filename":1004,"language":400,"meta":314,"style":314},"import { Coupon } from '../models/Coupon'\n\napp.get('/churnkey/coupons/:id', async (req, res) => {\n    const coupon = await db.findCouponById(req.params.id)\n    if (!coupon) {\n        return res.status(404).send({ code: 404, message: 'Coupon not found' })\n    }\n    res.send(new Coupon(coupon))\n})\n","Typescript Express",[1006],{"type":321,"tag":329,"props":1007,"children":1008},{"__ignoreMap":314},[1009,1028,1035,1099,1135,1157,1217,1224,1254],{"type":321,"tag":406,"props":1010,"children":1011},{"class":408,"line":409},[1012,1016,1020,1024],{"type":321,"tag":406,"props":1013,"children":1014},{"style":413},[1015],{"type":326,"value":416},{"type":321,"tag":406,"props":1017,"children":1018},{"style":419},[1019],{"type":326,"value":467},{"type":321,"tag":406,"props":1021,"children":1022},{"style":413},[1023],{"type":326,"value":427},{"type":321,"tag":406,"props":1025,"children":1026},{"style":430},[1027],{"type":326,"value":476},{"type":321,"tag":406,"props":1029,"children":1030},{"class":408,"line":347},[1031],{"type":321,"tag":406,"props":1032,"children":1033},{"emptyLinePlaceholder":483},[1034],{"type":326,"value":486},{"type":321,"tag":406,"props":1036,"children":1037},{"class":408,"line":457},[1038,1043,1048,1052,1057,1061,1066,1071,1076,1080,1085,1090,1095],{"type":321,"tag":406,"props":1039,"children":1040},{"style":419},[1041],{"type":326,"value":1042},"app.",{"type":321,"tag":406,"props":1044,"children":1045},{"style":519},[1046],{"type":326,"value":1047},"get",{"type":321,"tag":406,"props":1049,"children":1050},{"style":419},[1051],{"type":326,"value":555},{"type":321,"tag":406,"props":1053,"children":1054},{"style":430},[1055],{"type":326,"value":1056},"'/churnkey/coupons/:id'",{"type":321,"tag":406,"props":1058,"children":1059},{"style":419},[1060],{"type":326,"value":566},{"type":321,"tag":406,"props":1062,"children":1063},{"style":413},[1064],{"type":326,"value":1065},"async",{"type":321,"tag":406,"props":1067,"children":1068},{"style":419},[1069],{"type":326,"value":1070}," (",{"type":321,"tag":406,"props":1072,"children":1073},{"style":558},[1074],{"type":326,"value":1075},"req",{"type":321,"tag":406,"props":1077,"children":1078},{"style":419},[1079],{"type":326,"value":566},{"type":321,"tag":406,"props":1081,"children":1082},{"style":558},[1083],{"type":326,"value":1084},"res",{"type":321,"tag":406,"props":1086,"children":1087},{"style":419},[1088],{"type":326,"value":1089},") ",{"type":321,"tag":406,"props":1091,"children":1092},{"style":413},[1093],{"type":326,"value":1094},"=>",{"type":321,"tag":406,"props":1096,"children":1097},{"style":419},[1098],{"type":326,"value":760},{"type":321,"tag":406,"props":1100,"children":1101},{"class":408,"line":479},[1102,1107,1112,1116,1120,1125,1130],{"type":321,"tag":406,"props":1103,"children":1104},{"style":413},[1105],{"type":326,"value":1106},"    const",{"type":321,"tag":406,"props":1108,"children":1109},{"style":503},[1110],{"type":326,"value":1111}," coupon",{"type":321,"tag":406,"props":1113,"children":1114},{"style":413},[1115],{"type":326,"value":511},{"type":321,"tag":406,"props":1117,"children":1118},{"style":413},[1119],{"type":326,"value":599},{"type":321,"tag":406,"props":1121,"children":1122},{"style":419},[1123],{"type":326,"value":1124}," db.",{"type":321,"tag":406,"props":1126,"children":1127},{"style":519},[1128],{"type":326,"value":1129},"findCouponById",{"type":321,"tag":406,"props":1131,"children":1132},{"style":419},[1133],{"type":326,"value":1134},"(req.params.id)\n",{"type":321,"tag":406,"props":1136,"children":1137},{"class":408,"line":489},[1138,1143,1147,1152],{"type":321,"tag":406,"props":1139,"children":1140},{"style":413},[1141],{"type":326,"value":1142},"    if",{"type":321,"tag":406,"props":1144,"children":1145},{"style":419},[1146],{"type":326,"value":1070},{"type":321,"tag":406,"props":1148,"children":1149},{"style":413},[1150],{"type":326,"value":1151},"!",{"type":321,"tag":406,"props":1153,"children":1154},{"style":419},[1155],{"type":326,"value":1156},"coupon) {\n",{"type":321,"tag":406,"props":1158,"children":1159},{"class":408,"line":530},[1160,1164,1169,1174,1178,1183,1188,1193,1198,1202,1207,1212],{"type":321,"tag":406,"props":1161,"children":1162},{"style":413},[1163],{"type":326,"value":623},{"type":321,"tag":406,"props":1165,"children":1166},{"style":419},[1167],{"type":326,"value":1168}," res.",{"type":321,"tag":406,"props":1170,"children":1171},{"style":519},[1172],{"type":326,"value":1173},"status",{"type":321,"tag":406,"props":1175,"children":1176},{"style":419},[1177],{"type":326,"value":555},{"type":321,"tag":406,"props":1179,"children":1180},{"style":503},[1181],{"type":326,"value":1182},"404",{"type":321,"tag":406,"props":1184,"children":1185},{"style":419},[1186],{"type":326,"value":1187},").",{"type":321,"tag":406,"props":1189,"children":1190},{"style":519},[1191],{"type":326,"value":1192},"send",{"type":321,"tag":406,"props":1194,"children":1195},{"style":419},[1196],{"type":326,"value":1197},"({ code: ",{"type":321,"tag":406,"props":1199,"children":1200},{"style":503},[1201],{"type":326,"value":1182},{"type":321,"tag":406,"props":1203,"children":1204},{"style":419},[1205],{"type":326,"value":1206},", message: ",{"type":321,"tag":406,"props":1208,"children":1209},{"style":430},[1210],{"type":326,"value":1211},"'Coupon not found'",{"type":321,"tag":406,"props":1213,"children":1214},{"style":419},[1215],{"type":326,"value":1216}," })\n",{"type":321,"tag":406,"props":1218,"children":1219},{"class":408,"line":539},[1220],{"type":321,"tag":406,"props":1221,"children":1222},{"style":419},[1223],{"type":326,"value":882},{"type":321,"tag":406,"props":1225,"children":1226},{"class":408,"line":579},[1227,1232,1236,1240,1245,1249],{"type":321,"tag":406,"props":1228,"children":1229},{"style":419},[1230],{"type":326,"value":1231},"    res.",{"type":321,"tag":406,"props":1233,"children":1234},{"style":519},[1235],{"type":326,"value":1192},{"type":321,"tag":406,"props":1237,"children":1238},{"style":419},[1239],{"type":326,"value":555},{"type":321,"tag":406,"props":1241,"children":1242},{"style":413},[1243],{"type":326,"value":1244},"new",{"type":321,"tag":406,"props":1246,"children":1247},{"style":519},[1248],{"type":326,"value":633},{"type":321,"tag":406,"props":1250,"children":1251},{"style":419},[1252],{"type":326,"value":1253},"(coupon))\n",{"type":321,"tag":406,"props":1255,"children":1256},{"class":408,"line":617},[1257],{"type":321,"tag":406,"props":1258,"children":1259},{"style":419},[1260],{"type":326,"value":891},{"type":321,"tag":899,"props":1262,"children":1264},{"id":1263},"list",[1265,1267],{"type":326,"value":1266},"List ",{"type":321,"tag":367,"props":1268,"children":1269},{"color":369,"label":370},[],{"type":321,"tag":322,"props":1271,"children":1272},{},[1273],{"type":321,"tag":329,"props":1274,"children":1276},{"className":1275},[],[1277],{"type":326,"value":1278},"GET /churnkey/coupons",{"type":321,"tag":322,"props":1280,"children":1281},{},[1282,1284,1289],{"type":326,"value":1283},"This endpoint fetches a list of coupons from your database. You should find coupons in your database (with pagination), map them to the ",{"type":321,"tag":329,"props":1285,"children":1287},{"className":1286},[],[1288],{"type":326,"value":927},{"type":326,"value":1290}," model and return a paginated list.",{"type":321,"tag":322,"props":1292,"children":1293},{},[1294,1300],{"type":321,"tag":939,"props":1295,"children":1297},{"href":1296},"/integrations/general#pagination",[1298],{"type":326,"value":1299},"Learn more about pagination",{"type":326,"value":945},{"type":321,"tag":947,"props":1302,"children":1304},{"name":1303},"query parameters",[1305],{"type":321,"tag":1306,"props":1307,"children":1309},"field-schema",{"schema":1308},"/types/pagination-query.type",[],{"type":321,"tag":947,"props":1311,"children":1312},{"name":949},[1313],{"type":321,"tag":1306,"props":1314,"children":1316},{"schema":1315},"/types/pagination-response.type",[],{"type":321,"tag":947,"props":1318,"children":1319},{"name":996},[1320],{"type":321,"tag":391,"props":1321,"children":1322},{},[1323],{"type":321,"tag":395,"props":1324,"children":1326},{"className":397,"code":1325,"filename":1004,"language":400,"meta":314,"style":314},"import { Coupon } from '../models/Coupon'\n\napp.get('/churnkey/coupons', async (req, res) => {\n    const limit = Number.parseInt(req.query.limit)\n    const offset = Number.parseInt(req.query.cursor) \n    const coupons = await db.findCoupons({ limit, offset })\n    res.send({\n        data: coupons.map(c => new Coupon(c)),\n        next: coupons.length === limit ? offset + limit : undefined\n    })\n})\n",[1327],{"type":321,"tag":329,"props":1328,"children":1329},{"__ignoreMap":314},[1330,1349,1356,1412,1443,1472,1506,1521,1559,1603,1611],{"type":321,"tag":406,"props":1331,"children":1332},{"class":408,"line":409},[1333,1337,1341,1345],{"type":321,"tag":406,"props":1334,"children":1335},{"style":413},[1336],{"type":326,"value":416},{"type":321,"tag":406,"props":1338,"children":1339},{"style":419},[1340],{"type":326,"value":467},{"type":321,"tag":406,"props":1342,"children":1343},{"style":413},[1344],{"type":326,"value":427},{"type":321,"tag":406,"props":1346,"children":1347},{"style":430},[1348],{"type":326,"value":476},{"type":321,"tag":406,"props":1350,"children":1351},{"class":408,"line":347},[1352],{"type":321,"tag":406,"props":1353,"children":1354},{"emptyLinePlaceholder":483},[1355],{"type":326,"value":486},{"type":321,"tag":406,"props":1357,"children":1358},{"class":408,"line":457},[1359,1363,1367,1371,1376,1380,1384,1388,1392,1396,1400,1404,1408],{"type":321,"tag":406,"props":1360,"children":1361},{"style":419},[1362],{"type":326,"value":1042},{"type":321,"tag":406,"props":1364,"children":1365},{"style":519},[1366],{"type":326,"value":1047},{"type":321,"tag":406,"props":1368,"children":1369},{"style":419},[1370],{"type":326,"value":555},{"type":321,"tag":406,"props":1372,"children":1373},{"style":430},[1374],{"type":326,"value":1375},"'/churnkey/coupons'",{"type":321,"tag":406,"props":1377,"children":1378},{"style":419},[1379],{"type":326,"value":566},{"type":321,"tag":406,"props":1381,"children":1382},{"style":413},[1383],{"type":326,"value":1065},{"type":321,"tag":406,"props":1385,"children":1386},{"style":419},[1387],{"type":326,"value":1070},{"type":321,"tag":406,"props":1389,"children":1390},{"style":558},[1391],{"type":326,"value":1075},{"type":321,"tag":406,"props":1393,"children":1394},{"style":419},[1395],{"type":326,"value":566},{"type":321,"tag":406,"props":1397,"children":1398},{"style":558},[1399],{"type":326,"value":1084},{"type":321,"tag":406,"props":1401,"children":1402},{"style":419},[1403],{"type":326,"value":1089},{"type":321,"tag":406,"props":1405,"children":1406},{"style":413},[1407],{"type":326,"value":1094},{"type":321,"tag":406,"props":1409,"children":1410},{"style":419},[1411],{"type":326,"value":760},{"type":321,"tag":406,"props":1413,"children":1414},{"class":408,"line":479},[1415,1419,1424,1428,1433,1438],{"type":321,"tag":406,"props":1416,"children":1417},{"style":413},[1418],{"type":326,"value":1106},{"type":321,"tag":406,"props":1420,"children":1421},{"style":503},[1422],{"type":326,"value":1423}," limit",{"type":321,"tag":406,"props":1425,"children":1426},{"style":413},[1427],{"type":326,"value":511},{"type":321,"tag":406,"props":1429,"children":1430},{"style":419},[1431],{"type":326,"value":1432}," Number.",{"type":321,"tag":406,"props":1434,"children":1435},{"style":519},[1436],{"type":326,"value":1437},"parseInt",{"type":321,"tag":406,"props":1439,"children":1440},{"style":419},[1441],{"type":326,"value":1442},"(req.query.limit)\n",{"type":321,"tag":406,"props":1444,"children":1445},{"class":408,"line":489},[1446,1450,1455,1459,1463,1467],{"type":321,"tag":406,"props":1447,"children":1448},{"style":413},[1449],{"type":326,"value":1106},{"type":321,"tag":406,"props":1451,"children":1452},{"style":503},[1453],{"type":326,"value":1454}," offset",{"type":321,"tag":406,"props":1456,"children":1457},{"style":413},[1458],{"type":326,"value":511},{"type":321,"tag":406,"props":1460,"children":1461},{"style":419},[1462],{"type":326,"value":1432},{"type":321,"tag":406,"props":1464,"children":1465},{"style":519},[1466],{"type":326,"value":1437},{"type":321,"tag":406,"props":1468,"children":1469},{"style":419},[1470],{"type":326,"value":1471},"(req.query.cursor) \n",{"type":321,"tag":406,"props":1473,"children":1474},{"class":408,"line":530},[1475,1479,1484,1488,1492,1496,1501],{"type":321,"tag":406,"props":1476,"children":1477},{"style":413},[1478],{"type":326,"value":1106},{"type":321,"tag":406,"props":1480,"children":1481},{"style":503},[1482],{"type":326,"value":1483}," coupons",{"type":321,"tag":406,"props":1485,"children":1486},{"style":413},[1487],{"type":326,"value":511},{"type":321,"tag":406,"props":1489,"children":1490},{"style":413},[1491],{"type":326,"value":599},{"type":321,"tag":406,"props":1493,"children":1494},{"style":419},[1495],{"type":326,"value":1124},{"type":321,"tag":406,"props":1497,"children":1498},{"style":519},[1499],{"type":326,"value":1500},"findCoupons",{"type":321,"tag":406,"props":1502,"children":1503},{"style":419},[1504],{"type":326,"value":1505},"({ limit, offset })\n",{"type":321,"tag":406,"props":1507,"children":1508},{"class":408,"line":539},[1509,1513,1517],{"type":321,"tag":406,"props":1510,"children":1511},{"style":419},[1512],{"type":326,"value":1231},{"type":321,"tag":406,"props":1514,"children":1515},{"style":519},[1516],{"type":326,"value":1192},{"type":321,"tag":406,"props":1518,"children":1519},{"style":419},[1520],{"type":326,"value":527},{"type":321,"tag":406,"props":1522,"children":1523},{"class":408,"line":579},[1524,1529,1533,1537,1542,1546,1550,1554],{"type":321,"tag":406,"props":1525,"children":1526},{"style":419},[1527],{"type":326,"value":1528},"        data: coupons.",{"type":321,"tag":406,"props":1530,"children":1531},{"style":519},[1532],{"type":326,"value":774},{"type":321,"tag":406,"props":1534,"children":1535},{"style":419},[1536],{"type":326,"value":555},{"type":321,"tag":406,"props":1538,"children":1539},{"style":558},[1540],{"type":326,"value":1541},"c",{"type":321,"tag":406,"props":1543,"children":1544},{"style":413},[1545],{"type":326,"value":788},{"type":321,"tag":406,"props":1547,"children":1548},{"style":413},[1549],{"type":326,"value":628},{"type":321,"tag":406,"props":1551,"children":1552},{"style":519},[1553],{"type":326,"value":633},{"type":321,"tag":406,"props":1555,"children":1556},{"style":419},[1557],{"type":326,"value":1558},"(c)),\n",{"type":321,"tag":406,"props":1560,"children":1561},{"class":408,"line":617},[1562,1567,1571,1575,1579,1583,1587,1591,1595,1599],{"type":321,"tag":406,"props":1563,"children":1564},{"style":419},[1565],{"type":326,"value":1566},"        next: coupons.",{"type":321,"tag":406,"props":1568,"children":1569},{"style":503},[1570],{"type":326,"value":824},{"type":321,"tag":406,"props":1572,"children":1573},{"style":413},[1574],{"type":326,"value":829},{"type":321,"tag":406,"props":1576,"children":1577},{"style":419},[1578],{"type":326,"value":854},{"type":321,"tag":406,"props":1580,"children":1581},{"style":413},[1582],{"type":326,"value":839},{"type":321,"tag":406,"props":1584,"children":1585},{"style":419},[1586],{"type":326,"value":844},{"type":321,"tag":406,"props":1588,"children":1589},{"style":413},[1590],{"type":326,"value":849},{"type":321,"tag":406,"props":1592,"children":1593},{"style":419},[1594],{"type":326,"value":854},{"type":321,"tag":406,"props":1596,"children":1597},{"style":413},[1598],{"type":326,"value":859},{"type":321,"tag":406,"props":1600,"children":1601},{"style":503},[1602],{"type":326,"value":864},{"type":321,"tag":406,"props":1604,"children":1605},{"class":408,"line":641},[1606],{"type":321,"tag":406,"props":1607,"children":1608},{"style":419},[1609],{"type":326,"value":1610},"    })\n",{"type":321,"tag":406,"props":1612,"children":1613},{"class":408,"line":650},[1614],{"type":321,"tag":406,"props":1615,"children":1616},{"style":419},[1617],{"type":326,"value":891},{"type":321,"tag":338,"props":1619,"children":1621},{"id":1620},"webhooks",[1622],{"type":326,"value":226},{"type":321,"tag":322,"props":1624,"children":1625},{},[1626],{"type":326,"value":1627},"Coming soon.",{"type":321,"tag":1629,"props":1630,"children":1631},"style",{},[1632],{"type":326,"value":1633},"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":457,"depth":457,"links":1635},[1636,1637,1638,1642],{"id":340,"depth":347,"text":343},{"id":374,"depth":347,"text":377},{"id":894,"depth":347,"text":897,"children":1639},[1640,1641],{"id":901,"depth":457,"text":904},{"id":1263,"depth":457,"text":1266},{"id":1620,"depth":347,"text":226},"markdown","content:99.integrations:3.controllers:5.coupons.md","content","99.integrations/3.controllers/5.coupons.md","99.integrations/3.controllers/5.coupons","md",{"loc":311},[1651,1655],{"_path":1652,"title":1653,"description":1654},"/integrations/controllers/subscriptions","Subscriptions - Controller","List and retrieve `Subscription` models.",{"_path":1656,"title":1657,"description":1658},"/integrations/controllers/products","Products - Controller","List and retrieve `Product` models.",{"_path":1308,"_dir":1660,"_draft":313,"_partial":313,"_locale":314,"type":1661,"title":1662,"properties":1663,"_id":1672,"_type":1673,"_source":1645,"_file":1674,"_stem":1675,"_extension":1673},"types","object","Pagination Query Params",{"limit":1664,"cursor":1668},{"type":1665,"severity":1666,"description":1667},"integer","required","Maximum number of items to return",{"type":1669,"severity":1670,"description":1671},"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":1677,"body":1678,"excerpt":-1,"toc":1684},{"title":314,"description":1667},{"type":318,"children":1679},[1680],{"type":321,"tag":322,"props":1681,"children":1682},{},[1683],{"type":326,"value":1667},{"title":314,"searchDepth":347,"depth":347,"links":1685},[],{"data":1687,"body":1688,"excerpt":-1,"toc":1694},{"title":314,"description":1671},{"type":318,"children":1689},[1690],{"type":321,"tag":322,"props":1691,"children":1692},{},[1693],{"type":326,"value":1671},{"title":314,"searchDepth":347,"depth":347,"links":1695},[],{"_path":1315,"_dir":1660,"_draft":313,"_partial":313,"_locale":314,"type":1661,"title":1697,"properties":1698,"_id":1705,"_type":1673,"_source":1645,"_file":1706,"_stem":1707,"_extension":1673},"Pagination Response",{"data":1699,"next":1703},{"type":1700,"severity":1666,"description":1701,"items":1702},"array","Array of items. The type of item is defined in the endpoint documentation, e.g. `Customer` for `/customers` endpoint",{"type":1661},{"type":1669,"severity":1670,"description":1704},"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":1709,"body":1711,"excerpt":-1,"toc":1734},{"title":314,"description":1710},"Array of items. The type of item is defined in the endpoint documentation, e.g. Customer for /customers endpoint",{"type":318,"children":1712},[1713],{"type":321,"tag":322,"props":1714,"children":1715},{},[1716,1718,1724,1726,1732],{"type":326,"value":1717},"Array of items. The type of item is defined in the endpoint documentation, e.g. ",{"type":321,"tag":329,"props":1719,"children":1721},{"className":1720},[],[1722],{"type":326,"value":1723},"Customer",{"type":326,"value":1725}," for ",{"type":321,"tag":329,"props":1727,"children":1729},{"className":1728},[],[1730],{"type":326,"value":1731},"/customers",{"type":326,"value":1733}," endpoint",{"title":314,"searchDepth":347,"depth":347,"links":1735},[],{"data":1737,"body":1739,"excerpt":-1,"toc":1784},{"title":314,"description":1738},"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":1740},[1741],{"type":321,"tag":322,"props":1742,"children":1743},{},[1744,1746,1751,1753,1759,1761,1767,1769,1775,1777,1782],{"type":326,"value":1745},"Either a next ",{"type":321,"tag":329,"props":1747,"children":1749},{"className":1748},[],[1750],{"type":326,"value":935},{"type":326,"value":1752}," or an ",{"type":321,"tag":329,"props":1754,"children":1756},{"className":1755},[],[1757],{"type":326,"value":1758},"offset",{"type":326,"value":1760}," for the next page. You decide what to use, we will send ",{"type":321,"tag":329,"props":1762,"children":1764},{"className":1763},[],[1765],{"type":326,"value":1766},"next",{"type":326,"value":1768}," value as a ",{"type":321,"tag":329,"props":1770,"children":1772},{"className":1771},[],[1773],{"type":326,"value":1774},"cursor",{"type":326,"value":1776}," query parameter back to you. If ",{"type":321,"tag":329,"props":1778,"children":1780},{"className":1779},[],[1781],{"type":326,"value":1766},{"type":326,"value":1783}," is empty, there are no more pages",{"title":314,"searchDepth":347,"depth":347,"links":1785},[],1775515592376]