[{"data":1,"prerenderedAt":2020},["ShallowReactive",2],{"navigation":3,"/integrations/actions/cancel":310,"/integrations/actions/cancel-surround":1871,"/types/actions/cancel/request.type":1880,"Uzbcrwb7K0":1903,"mvUbUXcxHo":1913,"nOxxlHHVDU":1923,"QKVoFfn6xR":1945,"55r7p3KaAE":1955,"/types/actions/cancel/request-all.type":1965,"/types/actions/cancel/features.type":1975,"BhYiSpgDCK":1992,"9a1LtZJDJT":2009},[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":1864,"_id":1865,"_source":1866,"_file":1867,"_stem":1868,"_extension":1869,"sitemap":1870},"/integrations/actions/cancel","actions",false,"","Cancel - Action","Cancels a subscription at specific date.",{"type":318,"children":319,"toc":1855},"root",[320,343,355,362,397,403,415,865,871,881,890,911,916,926,962,1226,1236,1245,1257,1270,1274,1281,1306,1548,1553,1565,1614,1622,1849],{"type":321,"tag":322,"props":323,"children":324},"element","p",{},[325,328,335,337],{"type":326,"value":327},"text","To implement the ",{"type":321,"tag":329,"props":330,"children":332},"code",{"className":331},[],[333],{"type":326,"value":334},"Cancel",{"type":326,"value":336}," action, you need to implement an endpoint and define ",{"type":321,"tag":329,"props":338,"children":340},{"className":339},[],[341],{"type":326,"value":342},"features",{"type":321,"tag":322,"props":344,"children":345},{},[346,348,353],{"type":326,"value":347},"If you don't implement this action, the ",{"type":321,"tag":349,"props":350,"children":352},"badge",{"label":351},"Cancel Flow",[],{"type":326,"value":354}," will not be available to your customers, even if you implemented other actions.",{"type":321,"tag":356,"props":357,"children":359},"h2",{"id":358},"prerequisites",[360],{"type":326,"value":361},"Prerequisites",{"type":321,"tag":363,"props":364,"children":366},"grid",{"cols":365},2,[367],{"type":321,"tag":368,"props":369,"children":372},"card-baseline",{"title":370,"to":371},"Subscriptions - Controller","/integrations/controllers/subscriptions",[373,386],{"type":321,"tag":322,"props":374,"children":375},{},[376,378,384],{"type":326,"value":377},"You must implement a ",{"type":321,"tag":329,"props":379,"children":381},{"className":380},[],[382],{"type":326,"value":383},"Subscriptions",{"type":326,"value":385}," controller first.",{"type":321,"tag":387,"props":388,"children":391},"flex",{"className":389},[390],"mt-4",[392],{"type":321,"tag":349,"props":393,"children":396},{"label":394,"color":395},"Required","green",[],{"type":321,"tag":356,"props":398,"children":400},{"id":399},"sdk",[401],{"type":326,"value":402},"SDK",{"type":321,"tag":322,"props":404,"children":405},{},[406,408,413],{"type":326,"value":407},"If you are using the SDK, you can implement the ",{"type":321,"tag":329,"props":409,"children":411},{"className":410},[],[412],{"type":326,"value":334},{"type":326,"value":414}," action 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":416,"props":417,"children":418},"code-group",{},[419],{"type":321,"tag":420,"props":421,"children":426},"pre",{"className":422,"code":423,"filename":424,"language":425,"meta":314,"style":314},"language-typescript shiki shiki-themes github-light-default github-light-default github-dark-default","import { Integrator } from '@churnkey/sdk'\nimport { Subscriptions } from '../controllers/Subscriptions'\n\nexport const Cancel = Integrator.Cancel.config({\n    Subscriptions: Subscriptions,\n    features: {\n        // define which schedules are supported, at least one is required\n        schedules: { \n            [Integrator.Cancel.Schedule.Immediate]: true,\n            [Integrator.Cancel.Schedule.EndOfPeriod]: true\n        }\n    },\n    async handle(ctx, options) {\n        const subscription = await this.subscriptions.retrieve({\n            customerId: options.customerId,\n            id: options.subscriptionId\n        })\n\n        switch (options.scheduledAt) {\n            case Integrator.Cancel.Schedule.Immediate:\n                await ctx.db.cancelSubscription(subscription)\n                break\n            case Integrator.Cancel.Schedule.EndOfPeriod:\n                await ctx.db.cancelSubscriptionAtThePeriodEnd(subscription)\n                break\n        }\n    }\n})\n","Typescript","typescript",[427],{"type":321,"tag":329,"props":428,"children":429},{"__ignoreMap":314},[430,459,480,490,531,540,549,559,568,587,601,610,619,659,701,710,719,728,736,750,764,788,797,810,831,839,847,856],{"type":321,"tag":431,"props":432,"children":435},"span",{"class":433,"line":434},"line",1,[436,442,448,453],{"type":321,"tag":431,"props":437,"children":439},{"style":438},"--shiki-light:#CF222E;--shiki-default:#CF222E;--shiki-dark:#FF7B72",[440],{"type":326,"value":441},"import",{"type":321,"tag":431,"props":443,"children":445},{"style":444},"--shiki-light:#1F2328;--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[446],{"type":326,"value":447}," { Integrator } ",{"type":321,"tag":431,"props":449,"children":450},{"style":438},[451],{"type":326,"value":452},"from",{"type":321,"tag":431,"props":454,"children":456},{"style":455},"--shiki-light:#0A3069;--shiki-default:#0A3069;--shiki-dark:#A5D6FF",[457],{"type":326,"value":458}," '@churnkey/sdk'\n",{"type":321,"tag":431,"props":460,"children":461},{"class":433,"line":365},[462,466,471,475],{"type":321,"tag":431,"props":463,"children":464},{"style":438},[465],{"type":326,"value":441},{"type":321,"tag":431,"props":467,"children":468},{"style":444},[469],{"type":326,"value":470}," { Subscriptions } ",{"type":321,"tag":431,"props":472,"children":473},{"style":438},[474],{"type":326,"value":452},{"type":321,"tag":431,"props":476,"children":477},{"style":455},[478],{"type":326,"value":479}," '../controllers/Subscriptions'\n",{"type":321,"tag":431,"props":481,"children":483},{"class":433,"line":482},3,[484],{"type":321,"tag":431,"props":485,"children":487},{"emptyLinePlaceholder":486},true,[488],{"type":326,"value":489},"\n",{"type":321,"tag":431,"props":491,"children":493},{"class":433,"line":492},4,[494,499,504,510,515,520,526],{"type":321,"tag":431,"props":495,"children":496},{"style":438},[497],{"type":326,"value":498},"export",{"type":321,"tag":431,"props":500,"children":501},{"style":438},[502],{"type":326,"value":503}," const",{"type":321,"tag":431,"props":505,"children":507},{"style":506},"--shiki-light:#0550AE;--shiki-default:#0550AE;--shiki-dark:#79C0FF",[508],{"type":326,"value":509}," Cancel",{"type":321,"tag":431,"props":511,"children":512},{"style":438},[513],{"type":326,"value":514}," =",{"type":321,"tag":431,"props":516,"children":517},{"style":444},[518],{"type":326,"value":519}," Integrator.Cancel.",{"type":321,"tag":431,"props":521,"children":523},{"style":522},"--shiki-light:#8250DF;--shiki-default:#8250DF;--shiki-dark:#D2A8FF",[524],{"type":326,"value":525},"config",{"type":321,"tag":431,"props":527,"children":528},{"style":444},[529],{"type":326,"value":530},"({\n",{"type":321,"tag":431,"props":532,"children":534},{"class":433,"line":533},5,[535],{"type":321,"tag":431,"props":536,"children":537},{"style":444},[538],{"type":326,"value":539},"    Subscriptions: Subscriptions,\n",{"type":321,"tag":431,"props":541,"children":543},{"class":433,"line":542},6,[544],{"type":321,"tag":431,"props":545,"children":546},{"style":444},[547],{"type":326,"value":548},"    features: {\n",{"type":321,"tag":431,"props":550,"children":552},{"class":433,"line":551},7,[553],{"type":321,"tag":431,"props":554,"children":556},{"style":555},"--shiki-light:#6E7781;--shiki-default:#6E7781;--shiki-dark:#8B949E",[557],{"type":326,"value":558},"        // define which schedules are supported, at least one is required\n",{"type":321,"tag":431,"props":560,"children":562},{"class":433,"line":561},8,[563],{"type":321,"tag":431,"props":564,"children":565},{"style":444},[566],{"type":326,"value":567},"        schedules: { \n",{"type":321,"tag":431,"props":569,"children":571},{"class":433,"line":570},9,[572,577,582],{"type":321,"tag":431,"props":573,"children":574},{"style":444},[575],{"type":326,"value":576},"            [Integrator.Cancel.Schedule.Immediate]: ",{"type":321,"tag":431,"props":578,"children":579},{"style":506},[580],{"type":326,"value":581},"true",{"type":321,"tag":431,"props":583,"children":584},{"style":444},[585],{"type":326,"value":586},",\n",{"type":321,"tag":431,"props":588,"children":590},{"class":433,"line":589},10,[591,596],{"type":321,"tag":431,"props":592,"children":593},{"style":444},[594],{"type":326,"value":595},"            [Integrator.Cancel.Schedule.EndOfPeriod]: ",{"type":321,"tag":431,"props":597,"children":598},{"style":506},[599],{"type":326,"value":600},"true\n",{"type":321,"tag":431,"props":602,"children":604},{"class":433,"line":603},11,[605],{"type":321,"tag":431,"props":606,"children":607},{"style":444},[608],{"type":326,"value":609},"        }\n",{"type":321,"tag":431,"props":611,"children":613},{"class":433,"line":612},12,[614],{"type":321,"tag":431,"props":615,"children":616},{"style":444},[617],{"type":326,"value":618},"    },\n",{"type":321,"tag":431,"props":620,"children":622},{"class":433,"line":621},13,[623,628,633,638,644,649,654],{"type":321,"tag":431,"props":624,"children":625},{"style":438},[626],{"type":326,"value":627},"    async",{"type":321,"tag":431,"props":629,"children":630},{"style":522},[631],{"type":326,"value":632}," handle",{"type":321,"tag":431,"props":634,"children":635},{"style":444},[636],{"type":326,"value":637},"(",{"type":321,"tag":431,"props":639,"children":641},{"style":640},"--shiki-light:#953800;--shiki-default:#953800;--shiki-dark:#FFA657",[642],{"type":326,"value":643},"ctx",{"type":321,"tag":431,"props":645,"children":646},{"style":444},[647],{"type":326,"value":648},", ",{"type":321,"tag":431,"props":650,"children":651},{"style":640},[652],{"type":326,"value":653},"options",{"type":321,"tag":431,"props":655,"children":656},{"style":444},[657],{"type":326,"value":658},") {\n",{"type":321,"tag":431,"props":660,"children":662},{"class":433,"line":661},14,[663,668,673,677,682,687,692,697],{"type":321,"tag":431,"props":664,"children":665},{"style":438},[666],{"type":326,"value":667},"        const",{"type":321,"tag":431,"props":669,"children":670},{"style":506},[671],{"type":326,"value":672}," subscription",{"type":321,"tag":431,"props":674,"children":675},{"style":438},[676],{"type":326,"value":514},{"type":321,"tag":431,"props":678,"children":679},{"style":438},[680],{"type":326,"value":681}," await",{"type":321,"tag":431,"props":683,"children":684},{"style":506},[685],{"type":326,"value":686}," this",{"type":321,"tag":431,"props":688,"children":689},{"style":444},[690],{"type":326,"value":691},".subscriptions.",{"type":321,"tag":431,"props":693,"children":694},{"style":522},[695],{"type":326,"value":696},"retrieve",{"type":321,"tag":431,"props":698,"children":699},{"style":444},[700],{"type":326,"value":530},{"type":321,"tag":431,"props":702,"children":704},{"class":433,"line":703},15,[705],{"type":321,"tag":431,"props":706,"children":707},{"style":444},[708],{"type":326,"value":709},"            customerId: options.customerId,\n",{"type":321,"tag":431,"props":711,"children":713},{"class":433,"line":712},16,[714],{"type":321,"tag":431,"props":715,"children":716},{"style":444},[717],{"type":326,"value":718},"            id: options.subscriptionId\n",{"type":321,"tag":431,"props":720,"children":722},{"class":433,"line":721},17,[723],{"type":321,"tag":431,"props":724,"children":725},{"style":444},[726],{"type":326,"value":727},"        })\n",{"type":321,"tag":431,"props":729,"children":731},{"class":433,"line":730},18,[732],{"type":321,"tag":431,"props":733,"children":734},{"emptyLinePlaceholder":486},[735],{"type":326,"value":489},{"type":321,"tag":431,"props":737,"children":739},{"class":433,"line":738},19,[740,745],{"type":321,"tag":431,"props":741,"children":742},{"style":438},[743],{"type":326,"value":744},"        switch",{"type":321,"tag":431,"props":746,"children":747},{"style":444},[748],{"type":326,"value":749}," (options.scheduledAt) {\n",{"type":321,"tag":431,"props":751,"children":753},{"class":433,"line":752},20,[754,759],{"type":321,"tag":431,"props":755,"children":756},{"style":438},[757],{"type":326,"value":758},"            case",{"type":321,"tag":431,"props":760,"children":761},{"style":444},[762],{"type":326,"value":763}," Integrator.Cancel.Schedule.Immediate:\n",{"type":321,"tag":431,"props":765,"children":767},{"class":433,"line":766},21,[768,773,778,783],{"type":321,"tag":431,"props":769,"children":770},{"style":438},[771],{"type":326,"value":772},"                await",{"type":321,"tag":431,"props":774,"children":775},{"style":444},[776],{"type":326,"value":777}," ctx.db.",{"type":321,"tag":431,"props":779,"children":780},{"style":522},[781],{"type":326,"value":782},"cancelSubscription",{"type":321,"tag":431,"props":784,"children":785},{"style":444},[786],{"type":326,"value":787},"(subscription)\n",{"type":321,"tag":431,"props":789,"children":791},{"class":433,"line":790},22,[792],{"type":321,"tag":431,"props":793,"children":794},{"style":438},[795],{"type":326,"value":796},"                break\n",{"type":321,"tag":431,"props":798,"children":800},{"class":433,"line":799},23,[801,805],{"type":321,"tag":431,"props":802,"children":803},{"style":438},[804],{"type":326,"value":758},{"type":321,"tag":431,"props":806,"children":807},{"style":444},[808],{"type":326,"value":809}," Integrator.Cancel.Schedule.EndOfPeriod:\n",{"type":321,"tag":431,"props":811,"children":813},{"class":433,"line":812},24,[814,818,822,827],{"type":321,"tag":431,"props":815,"children":816},{"style":438},[817],{"type":326,"value":772},{"type":321,"tag":431,"props":819,"children":820},{"style":444},[821],{"type":326,"value":777},{"type":321,"tag":431,"props":823,"children":824},{"style":522},[825],{"type":326,"value":826},"cancelSubscriptionAtThePeriodEnd",{"type":321,"tag":431,"props":828,"children":829},{"style":444},[830],{"type":326,"value":787},{"type":321,"tag":431,"props":832,"children":834},{"class":433,"line":833},25,[835],{"type":321,"tag":431,"props":836,"children":837},{"style":438},[838],{"type":326,"value":796},{"type":321,"tag":431,"props":840,"children":842},{"class":433,"line":841},26,[843],{"type":321,"tag":431,"props":844,"children":845},{"style":444},[846],{"type":326,"value":609},{"type":321,"tag":431,"props":848,"children":850},{"class":433,"line":849},27,[851],{"type":321,"tag":431,"props":852,"children":853},{"style":444},[854],{"type":326,"value":855},"    }\n",{"type":321,"tag":431,"props":857,"children":859},{"class":433,"line":858},28,[860],{"type":321,"tag":431,"props":861,"children":862},{"style":444},[863],{"type":326,"value":864},"})\n",{"type":321,"tag":356,"props":866,"children":868},{"id":867},"endpoints",[869],{"type":326,"value":870},"Endpoints",{"type":321,"tag":872,"props":873,"children":875},"h3",{"id":874},"handle",[876,878],{"type":326,"value":877},"Handle ",{"type":321,"tag":349,"props":879,"children":880},{"label":394,"color":395},[],{"type":321,"tag":322,"props":882,"children":883},{},[884],{"type":321,"tag":329,"props":885,"children":887},{"className":886},[],[888],{"type":326,"value":889},"POST /churnkey/actions/subscription/cancel",{"type":321,"tag":322,"props":891,"children":892},{},[893,895,901,903,909],{"type":326,"value":894},"This endpoints handles the single subscription cancellation. You should find the subscription by ",{"type":321,"tag":329,"props":896,"children":898},{"className":897},[],[899],{"type":326,"value":900},"customerId",{"type":326,"value":902}," and ",{"type":321,"tag":329,"props":904,"children":906},{"className":905},[],[907],{"type":326,"value":908},"subscriptionId",{"type":326,"value":910}," and cancel it.",{"type":321,"tag":322,"props":912,"children":913},{},[914],{"type":326,"value":915},"Options for cancellation, provided in the request body.",{"type":321,"tag":917,"props":918,"children":920},"collapsible",{"name":919},"request body",[921],{"type":321,"tag":922,"props":923,"children":925},"field-schema",{"schema":924},"/types/actions/cancel/request.type.json",[],{"type":321,"tag":917,"props":927,"children":929},{"name":928},"response",[930],{"type":321,"tag":931,"props":932,"children":933},"tabs",{},[934,944],{"type":321,"tag":935,"props":936,"children":938},"div",{"label":937},"200",[939],{"type":321,"tag":322,"props":940,"children":941},{},[942],{"type":326,"value":943},"Must return empty response.",{"type":321,"tag":935,"props":945,"children":947},{"label":946},"Error",[948],{"type":321,"tag":322,"props":949,"children":950},{},[951,953,960],{"type":326,"value":952},"See ",{"type":321,"tag":954,"props":955,"children":957},"a",{"href":956},"/integrations/general#error-responses",[958],{"type":326,"value":959},"Error Responses",{"type":326,"value":961},".",{"type":321,"tag":917,"props":963,"children":965},{"name":964},"code example",[966],{"type":321,"tag":416,"props":967,"children":968},{},[969],{"type":321,"tag":420,"props":970,"children":973},{"className":422,"code":971,"filename":972,"language":425,"meta":314,"style":314},"  app.post('/churnkey/actions/subscription/cancel', async (req, res) => {\n      const subscription = await db.findSubscription(req.body.customerId, req.body.subscriptionId)\n\n      switch (req.body.scheduledAt) {\n          case 'immediate':\n              await db.cancelSubscription(subscription)\n              break\n          case 'end_of_period':\n              await db.cancelSubscriptionAtThePeriodEnd(subscription)\n              break\n      }\n\n      res.send()\n  })\n","Typescript Express",[974],{"type":321,"tag":329,"props":975,"children":976},{"__ignoreMap":314},[977,1042,1077,1084,1097,1115,1135,1143,1159,1178,1185,1193,1200,1218],{"type":321,"tag":431,"props":978,"children":979},{"class":433,"line":434},[980,985,990,994,999,1003,1008,1013,1018,1022,1027,1032,1037],{"type":321,"tag":431,"props":981,"children":982},{"style":444},[983],{"type":326,"value":984},"  app.",{"type":321,"tag":431,"props":986,"children":987},{"style":522},[988],{"type":326,"value":989},"post",{"type":321,"tag":431,"props":991,"children":992},{"style":444},[993],{"type":326,"value":637},{"type":321,"tag":431,"props":995,"children":996},{"style":455},[997],{"type":326,"value":998},"'/churnkey/actions/subscription/cancel'",{"type":321,"tag":431,"props":1000,"children":1001},{"style":444},[1002],{"type":326,"value":648},{"type":321,"tag":431,"props":1004,"children":1005},{"style":438},[1006],{"type":326,"value":1007},"async",{"type":321,"tag":431,"props":1009,"children":1010},{"style":444},[1011],{"type":326,"value":1012}," (",{"type":321,"tag":431,"props":1014,"children":1015},{"style":640},[1016],{"type":326,"value":1017},"req",{"type":321,"tag":431,"props":1019,"children":1020},{"style":444},[1021],{"type":326,"value":648},{"type":321,"tag":431,"props":1023,"children":1024},{"style":640},[1025],{"type":326,"value":1026},"res",{"type":321,"tag":431,"props":1028,"children":1029},{"style":444},[1030],{"type":326,"value":1031},") ",{"type":321,"tag":431,"props":1033,"children":1034},{"style":438},[1035],{"type":326,"value":1036},"=>",{"type":321,"tag":431,"props":1038,"children":1039},{"style":444},[1040],{"type":326,"value":1041}," {\n",{"type":321,"tag":431,"props":1043,"children":1044},{"class":433,"line":365},[1045,1050,1054,1058,1062,1067,1072],{"type":321,"tag":431,"props":1046,"children":1047},{"style":438},[1048],{"type":326,"value":1049},"      const",{"type":321,"tag":431,"props":1051,"children":1052},{"style":506},[1053],{"type":326,"value":672},{"type":321,"tag":431,"props":1055,"children":1056},{"style":438},[1057],{"type":326,"value":514},{"type":321,"tag":431,"props":1059,"children":1060},{"style":438},[1061],{"type":326,"value":681},{"type":321,"tag":431,"props":1063,"children":1064},{"style":444},[1065],{"type":326,"value":1066}," db.",{"type":321,"tag":431,"props":1068,"children":1069},{"style":522},[1070],{"type":326,"value":1071},"findSubscription",{"type":321,"tag":431,"props":1073,"children":1074},{"style":444},[1075],{"type":326,"value":1076},"(req.body.customerId, req.body.subscriptionId)\n",{"type":321,"tag":431,"props":1078,"children":1079},{"class":433,"line":482},[1080],{"type":321,"tag":431,"props":1081,"children":1082},{"emptyLinePlaceholder":486},[1083],{"type":326,"value":489},{"type":321,"tag":431,"props":1085,"children":1086},{"class":433,"line":492},[1087,1092],{"type":321,"tag":431,"props":1088,"children":1089},{"style":438},[1090],{"type":326,"value":1091},"      switch",{"type":321,"tag":431,"props":1093,"children":1094},{"style":444},[1095],{"type":326,"value":1096}," (req.body.scheduledAt) {\n",{"type":321,"tag":431,"props":1098,"children":1099},{"class":433,"line":533},[1100,1105,1110],{"type":321,"tag":431,"props":1101,"children":1102},{"style":438},[1103],{"type":326,"value":1104},"          case",{"type":321,"tag":431,"props":1106,"children":1107},{"style":455},[1108],{"type":326,"value":1109}," 'immediate'",{"type":321,"tag":431,"props":1111,"children":1112},{"style":444},[1113],{"type":326,"value":1114},":\n",{"type":321,"tag":431,"props":1116,"children":1117},{"class":433,"line":542},[1118,1123,1127,1131],{"type":321,"tag":431,"props":1119,"children":1120},{"style":438},[1121],{"type":326,"value":1122},"              await",{"type":321,"tag":431,"props":1124,"children":1125},{"style":444},[1126],{"type":326,"value":1066},{"type":321,"tag":431,"props":1128,"children":1129},{"style":522},[1130],{"type":326,"value":782},{"type":321,"tag":431,"props":1132,"children":1133},{"style":444},[1134],{"type":326,"value":787},{"type":321,"tag":431,"props":1136,"children":1137},{"class":433,"line":551},[1138],{"type":321,"tag":431,"props":1139,"children":1140},{"style":438},[1141],{"type":326,"value":1142},"              break\n",{"type":321,"tag":431,"props":1144,"children":1145},{"class":433,"line":561},[1146,1150,1155],{"type":321,"tag":431,"props":1147,"children":1148},{"style":438},[1149],{"type":326,"value":1104},{"type":321,"tag":431,"props":1151,"children":1152},{"style":455},[1153],{"type":326,"value":1154}," 'end_of_period'",{"type":321,"tag":431,"props":1156,"children":1157},{"style":444},[1158],{"type":326,"value":1114},{"type":321,"tag":431,"props":1160,"children":1161},{"class":433,"line":570},[1162,1166,1170,1174],{"type":321,"tag":431,"props":1163,"children":1164},{"style":438},[1165],{"type":326,"value":1122},{"type":321,"tag":431,"props":1167,"children":1168},{"style":444},[1169],{"type":326,"value":1066},{"type":321,"tag":431,"props":1171,"children":1172},{"style":522},[1173],{"type":326,"value":826},{"type":321,"tag":431,"props":1175,"children":1176},{"style":444},[1177],{"type":326,"value":787},{"type":321,"tag":431,"props":1179,"children":1180},{"class":433,"line":589},[1181],{"type":321,"tag":431,"props":1182,"children":1183},{"style":438},[1184],{"type":326,"value":1142},{"type":321,"tag":431,"props":1186,"children":1187},{"class":433,"line":603},[1188],{"type":321,"tag":431,"props":1189,"children":1190},{"style":444},[1191],{"type":326,"value":1192},"      }\n",{"type":321,"tag":431,"props":1194,"children":1195},{"class":433,"line":612},[1196],{"type":321,"tag":431,"props":1197,"children":1198},{"emptyLinePlaceholder":486},[1199],{"type":326,"value":489},{"type":321,"tag":431,"props":1201,"children":1202},{"class":433,"line":621},[1203,1208,1213],{"type":321,"tag":431,"props":1204,"children":1205},{"style":444},[1206],{"type":326,"value":1207},"      res.",{"type":321,"tag":431,"props":1209,"children":1210},{"style":522},[1211],{"type":326,"value":1212},"send",{"type":321,"tag":431,"props":1214,"children":1215},{"style":444},[1216],{"type":326,"value":1217},"()\n",{"type":321,"tag":431,"props":1219,"children":1220},{"class":433,"line":661},[1221],{"type":321,"tag":431,"props":1222,"children":1223},{"style":444},[1224],{"type":326,"value":1225},"  })\n",{"type":321,"tag":872,"props":1227,"children":1229},{"id":1228},"handle-all",[1230,1232],{"type":326,"value":1231},"Handle All ",{"type":321,"tag":349,"props":1233,"children":1235},{"label":1234},"optional",[],{"type":321,"tag":322,"props":1237,"children":1238},{},[1239],{"type":321,"tag":329,"props":1240,"children":1242},{"className":1241},[],[1243],{"type":326,"value":1244},"POST /churnkey/actions/customer/cancel",{"type":321,"tag":322,"props":1246,"children":1247},{},[1248,1250,1255],{"type":326,"value":1249},"This endpoint handles cancellation of all customer's subscriptions. You should find all subscriptions by ",{"type":321,"tag":329,"props":1251,"children":1253},{"className":1252},[],[1254],{"type":326,"value":900},{"type":326,"value":1256}," and cancel them.",{"type":321,"tag":322,"props":1258,"children":1259},{},[1260,1262,1268],{"type":326,"value":1261},"This endpoint is optional. By default, when we need to cancel all subscriptions, we will call the ",{"type":321,"tag":329,"props":1263,"children":1265},{"className":1264},[],[1266],{"type":326,"value":1267},"Handle",{"type":326,"value":1269}," endpoint for each subscription. You can implement this endpoint to reduce the number of API calls and improve performance/end-user UX.",{"type":321,"tag":322,"props":1271,"children":1272},{},[1273],{"type":326,"value":915},{"type":321,"tag":917,"props":1275,"children":1276},{"name":919},[1277],{"type":321,"tag":922,"props":1278,"children":1280},{"schema":1279},"/types/actions/cancel/request-all.type.json",[],{"type":321,"tag":917,"props":1282,"children":1283},{"name":928},[1284],{"type":321,"tag":931,"props":1285,"children":1286},{},[1287,1294],{"type":321,"tag":935,"props":1288,"children":1289},{"label":937},[1290],{"type":321,"tag":322,"props":1291,"children":1292},{},[1293],{"type":326,"value":943},{"type":321,"tag":935,"props":1295,"children":1296},{"label":946},[1297],{"type":321,"tag":322,"props":1298,"children":1299},{},[1300,1301,1305],{"type":326,"value":952},{"type":321,"tag":954,"props":1302,"children":1303},{"href":956},[1304],{"type":326,"value":959},{"type":326,"value":961},{"type":321,"tag":917,"props":1307,"children":1308},{"name":964},[1309],{"type":321,"tag":416,"props":1310,"children":1311},{},[1312],{"type":321,"tag":420,"props":1313,"children":1315},{"className":422,"code":1314,"filename":972,"language":425,"meta":314,"style":314},"  app.post('/churnkey/actions/customer/cancel', async (req, res) => {\n      const subscriptions = await db.findSubscriptionsByCustomerId(req.body.customerId)\n\n      switch (req.body.scheduledAt) {\n          case 'immediate':\n              await db.cancelSubscriptions(subscriptions)\n              break\n          case 'end_of_period':\n              await db.cancelSubscriptionsAtThePeriodEnd(subscriptions)\n              break\n      }\n\n      res.send()\n  })\n",[1316],{"type":321,"tag":329,"props":1317,"children":1318},{"__ignoreMap":314},[1319,1375,1409,1416,1427,1442,1463,1470,1485,1505,1512,1519,1526,1541],{"type":321,"tag":431,"props":1320,"children":1321},{"class":433,"line":434},[1322,1326,1330,1334,1339,1343,1347,1351,1355,1359,1363,1367,1371],{"type":321,"tag":431,"props":1323,"children":1324},{"style":444},[1325],{"type":326,"value":984},{"type":321,"tag":431,"props":1327,"children":1328},{"style":522},[1329],{"type":326,"value":989},{"type":321,"tag":431,"props":1331,"children":1332},{"style":444},[1333],{"type":326,"value":637},{"type":321,"tag":431,"props":1335,"children":1336},{"style":455},[1337],{"type":326,"value":1338},"'/churnkey/actions/customer/cancel'",{"type":321,"tag":431,"props":1340,"children":1341},{"style":444},[1342],{"type":326,"value":648},{"type":321,"tag":431,"props":1344,"children":1345},{"style":438},[1346],{"type":326,"value":1007},{"type":321,"tag":431,"props":1348,"children":1349},{"style":444},[1350],{"type":326,"value":1012},{"type":321,"tag":431,"props":1352,"children":1353},{"style":640},[1354],{"type":326,"value":1017},{"type":321,"tag":431,"props":1356,"children":1357},{"style":444},[1358],{"type":326,"value":648},{"type":321,"tag":431,"props":1360,"children":1361},{"style":640},[1362],{"type":326,"value":1026},{"type":321,"tag":431,"props":1364,"children":1365},{"style":444},[1366],{"type":326,"value":1031},{"type":321,"tag":431,"props":1368,"children":1369},{"style":438},[1370],{"type":326,"value":1036},{"type":321,"tag":431,"props":1372,"children":1373},{"style":444},[1374],{"type":326,"value":1041},{"type":321,"tag":431,"props":1376,"children":1377},{"class":433,"line":365},[1378,1382,1387,1391,1395,1399,1404],{"type":321,"tag":431,"props":1379,"children":1380},{"style":438},[1381],{"type":326,"value":1049},{"type":321,"tag":431,"props":1383,"children":1384},{"style":506},[1385],{"type":326,"value":1386}," subscriptions",{"type":321,"tag":431,"props":1388,"children":1389},{"style":438},[1390],{"type":326,"value":514},{"type":321,"tag":431,"props":1392,"children":1393},{"style":438},[1394],{"type":326,"value":681},{"type":321,"tag":431,"props":1396,"children":1397},{"style":444},[1398],{"type":326,"value":1066},{"type":321,"tag":431,"props":1400,"children":1401},{"style":522},[1402],{"type":326,"value":1403},"findSubscriptionsByCustomerId",{"type":321,"tag":431,"props":1405,"children":1406},{"style":444},[1407],{"type":326,"value":1408},"(req.body.customerId)\n",{"type":321,"tag":431,"props":1410,"children":1411},{"class":433,"line":482},[1412],{"type":321,"tag":431,"props":1413,"children":1414},{"emptyLinePlaceholder":486},[1415],{"type":326,"value":489},{"type":321,"tag":431,"props":1417,"children":1418},{"class":433,"line":492},[1419,1423],{"type":321,"tag":431,"props":1420,"children":1421},{"style":438},[1422],{"type":326,"value":1091},{"type":321,"tag":431,"props":1424,"children":1425},{"style":444},[1426],{"type":326,"value":1096},{"type":321,"tag":431,"props":1428,"children":1429},{"class":433,"line":533},[1430,1434,1438],{"type":321,"tag":431,"props":1431,"children":1432},{"style":438},[1433],{"type":326,"value":1104},{"type":321,"tag":431,"props":1435,"children":1436},{"style":455},[1437],{"type":326,"value":1109},{"type":321,"tag":431,"props":1439,"children":1440},{"style":444},[1441],{"type":326,"value":1114},{"type":321,"tag":431,"props":1443,"children":1444},{"class":433,"line":542},[1445,1449,1453,1458],{"type":321,"tag":431,"props":1446,"children":1447},{"style":438},[1448],{"type":326,"value":1122},{"type":321,"tag":431,"props":1450,"children":1451},{"style":444},[1452],{"type":326,"value":1066},{"type":321,"tag":431,"props":1454,"children":1455},{"style":522},[1456],{"type":326,"value":1457},"cancelSubscriptions",{"type":321,"tag":431,"props":1459,"children":1460},{"style":444},[1461],{"type":326,"value":1462},"(subscriptions)\n",{"type":321,"tag":431,"props":1464,"children":1465},{"class":433,"line":551},[1466],{"type":321,"tag":431,"props":1467,"children":1468},{"style":438},[1469],{"type":326,"value":1142},{"type":321,"tag":431,"props":1471,"children":1472},{"class":433,"line":561},[1473,1477,1481],{"type":321,"tag":431,"props":1474,"children":1475},{"style":438},[1476],{"type":326,"value":1104},{"type":321,"tag":431,"props":1478,"children":1479},{"style":455},[1480],{"type":326,"value":1154},{"type":321,"tag":431,"props":1482,"children":1483},{"style":444},[1484],{"type":326,"value":1114},{"type":321,"tag":431,"props":1486,"children":1487},{"class":433,"line":570},[1488,1492,1496,1501],{"type":321,"tag":431,"props":1489,"children":1490},{"style":438},[1491],{"type":326,"value":1122},{"type":321,"tag":431,"props":1493,"children":1494},{"style":444},[1495],{"type":326,"value":1066},{"type":321,"tag":431,"props":1497,"children":1498},{"style":522},[1499],{"type":326,"value":1500},"cancelSubscriptionsAtThePeriodEnd",{"type":321,"tag":431,"props":1502,"children":1503},{"style":444},[1504],{"type":326,"value":1462},{"type":321,"tag":431,"props":1506,"children":1507},{"class":433,"line":589},[1508],{"type":321,"tag":431,"props":1509,"children":1510},{"style":438},[1511],{"type":326,"value":1142},{"type":321,"tag":431,"props":1513,"children":1514},{"class":433,"line":603},[1515],{"type":321,"tag":431,"props":1516,"children":1517},{"style":444},[1518],{"type":326,"value":1192},{"type":321,"tag":431,"props":1520,"children":1521},{"class":433,"line":612},[1522],{"type":321,"tag":431,"props":1523,"children":1524},{"emptyLinePlaceholder":486},[1525],{"type":326,"value":489},{"type":321,"tag":431,"props":1527,"children":1528},{"class":433,"line":621},[1529,1533,1537],{"type":321,"tag":431,"props":1530,"children":1531},{"style":444},[1532],{"type":326,"value":1207},{"type":321,"tag":431,"props":1534,"children":1535},{"style":522},[1536],{"type":326,"value":1212},{"type":321,"tag":431,"props":1538,"children":1539},{"style":444},[1540],{"type":326,"value":1217},{"type":321,"tag":431,"props":1542,"children":1543},{"class":433,"line":661},[1544],{"type":321,"tag":431,"props":1545,"children":1546},{"style":444},[1547],{"type":326,"value":1225},{"type":321,"tag":356,"props":1549,"children":1550},{"id":342},[1551],{"type":326,"value":1552},"Features",{"type":321,"tag":322,"props":1554,"children":1555},{},[1556,1558,1563],{"type":326,"value":1557},"Features define which behavior is supported for the ",{"type":321,"tag":329,"props":1559,"children":1561},{"className":1560},[],[1562],{"type":326,"value":334},{"type":326,"value":1564}," action. Depending on the features you enabled, requests body will have different options.",{"type":321,"tag":322,"props":1566,"children":1567},{},[1568,1570,1576,1578,1584,1586,1591,1593,1598,1600,1606,1608,1613],{"type":326,"value":1569},"For example, if you enable only ",{"type":321,"tag":329,"props":1571,"children":1573},{"className":1572},[],[1574],{"type":326,"value":1575},"end-of-period",{"type":326,"value":1577}," schedule, the ",{"type":321,"tag":329,"props":1579,"children":1581},{"className":1580},[],[1582],{"type":326,"value":1583},"request.body.scheduledAt",{"type":326,"value":1585}," will be always ",{"type":321,"tag":329,"props":1587,"children":1589},{"className":1588},[],[1590],{"type":326,"value":1575},{"type":326,"value":1592},". If you enable both schedules, ",{"type":321,"tag":329,"props":1594,"children":1596},{"className":1595},[],[1597],{"type":326,"value":1583},{"type":326,"value":1599}," can be either ",{"type":321,"tag":329,"props":1601,"children":1603},{"className":1602},[],[1604],{"type":326,"value":1605},"immediate",{"type":326,"value":1607}," or ",{"type":321,"tag":329,"props":1609,"children":1611},{"className":1610},[],[1612],{"type":326,"value":1575},{"type":326,"value":961},{"type":321,"tag":917,"props":1615,"children":1617},{"name":1616},"schema",[1618],{"type":321,"tag":922,"props":1619,"children":1621},{"schema":1620},"/types/actions/cancel/features.type.json",[],{"type":321,"tag":917,"props":1623,"children":1624},{"name":964},[1625],{"type":321,"tag":416,"props":1626,"children":1627},{},[1628],{"type":321,"tag":420,"props":1629,"children":1631},{"className":422,"code":1630,"filename":424,"language":425,"meta":314,"style":314},"export interface Features {\n  enabled: boolean\n  schedules: {\n    immediate: boolean\n    end_of_period: boolean\n  }\n}\n\nexport const features: Features = {\n  enabled: true,\n  schedules: {\n    immediate: true,\n    end_of_period: false // this schedule will be disabled\n  }\n}\n",[1632],{"type":321,"tag":329,"props":1633,"children":1634},{"__ignoreMap":314},[1635,1656,1674,1690,1706,1722,1730,1738,1745,1777,1793,1801,1817,1835,1842],{"type":321,"tag":431,"props":1636,"children":1637},{"class":433,"line":434},[1638,1642,1647,1652],{"type":321,"tag":431,"props":1639,"children":1640},{"style":438},[1641],{"type":326,"value":498},{"type":321,"tag":431,"props":1643,"children":1644},{"style":438},[1645],{"type":326,"value":1646}," interface",{"type":321,"tag":431,"props":1648,"children":1649},{"style":640},[1650],{"type":326,"value":1651}," Features",{"type":321,"tag":431,"props":1653,"children":1654},{"style":444},[1655],{"type":326,"value":1041},{"type":321,"tag":431,"props":1657,"children":1658},{"class":433,"line":365},[1659,1664,1669],{"type":321,"tag":431,"props":1660,"children":1661},{"style":640},[1662],{"type":326,"value":1663},"  enabled",{"type":321,"tag":431,"props":1665,"children":1666},{"style":438},[1667],{"type":326,"value":1668},":",{"type":321,"tag":431,"props":1670,"children":1671},{"style":506},[1672],{"type":326,"value":1673}," boolean\n",{"type":321,"tag":431,"props":1675,"children":1676},{"class":433,"line":482},[1677,1682,1686],{"type":321,"tag":431,"props":1678,"children":1679},{"style":640},[1680],{"type":326,"value":1681},"  schedules",{"type":321,"tag":431,"props":1683,"children":1684},{"style":438},[1685],{"type":326,"value":1668},{"type":321,"tag":431,"props":1687,"children":1688},{"style":444},[1689],{"type":326,"value":1041},{"type":321,"tag":431,"props":1691,"children":1692},{"class":433,"line":492},[1693,1698,1702],{"type":321,"tag":431,"props":1694,"children":1695},{"style":640},[1696],{"type":326,"value":1697},"    immediate",{"type":321,"tag":431,"props":1699,"children":1700},{"style":438},[1701],{"type":326,"value":1668},{"type":321,"tag":431,"props":1703,"children":1704},{"style":506},[1705],{"type":326,"value":1673},{"type":321,"tag":431,"props":1707,"children":1708},{"class":433,"line":533},[1709,1714,1718],{"type":321,"tag":431,"props":1710,"children":1711},{"style":640},[1712],{"type":326,"value":1713},"    end_of_period",{"type":321,"tag":431,"props":1715,"children":1716},{"style":438},[1717],{"type":326,"value":1668},{"type":321,"tag":431,"props":1719,"children":1720},{"style":506},[1721],{"type":326,"value":1673},{"type":321,"tag":431,"props":1723,"children":1724},{"class":433,"line":542},[1725],{"type":321,"tag":431,"props":1726,"children":1727},{"style":444},[1728],{"type":326,"value":1729},"  }\n",{"type":321,"tag":431,"props":1731,"children":1732},{"class":433,"line":551},[1733],{"type":321,"tag":431,"props":1734,"children":1735},{"style":444},[1736],{"type":326,"value":1737},"}\n",{"type":321,"tag":431,"props":1739,"children":1740},{"class":433,"line":561},[1741],{"type":321,"tag":431,"props":1742,"children":1743},{"emptyLinePlaceholder":486},[1744],{"type":326,"value":489},{"type":321,"tag":431,"props":1746,"children":1747},{"class":433,"line":570},[1748,1752,1756,1761,1765,1769,1773],{"type":321,"tag":431,"props":1749,"children":1750},{"style":438},[1751],{"type":326,"value":498},{"type":321,"tag":431,"props":1753,"children":1754},{"style":438},[1755],{"type":326,"value":503},{"type":321,"tag":431,"props":1757,"children":1758},{"style":506},[1759],{"type":326,"value":1760}," features",{"type":321,"tag":431,"props":1762,"children":1763},{"style":438},[1764],{"type":326,"value":1668},{"type":321,"tag":431,"props":1766,"children":1767},{"style":640},[1768],{"type":326,"value":1651},{"type":321,"tag":431,"props":1770,"children":1771},{"style":438},[1772],{"type":326,"value":514},{"type":321,"tag":431,"props":1774,"children":1775},{"style":444},[1776],{"type":326,"value":1041},{"type":321,"tag":431,"props":1778,"children":1779},{"class":433,"line":589},[1780,1785,1789],{"type":321,"tag":431,"props":1781,"children":1782},{"style":444},[1783],{"type":326,"value":1784},"  enabled: ",{"type":321,"tag":431,"props":1786,"children":1787},{"style":506},[1788],{"type":326,"value":581},{"type":321,"tag":431,"props":1790,"children":1791},{"style":444},[1792],{"type":326,"value":586},{"type":321,"tag":431,"props":1794,"children":1795},{"class":433,"line":603},[1796],{"type":321,"tag":431,"props":1797,"children":1798},{"style":444},[1799],{"type":326,"value":1800},"  schedules: {\n",{"type":321,"tag":431,"props":1802,"children":1803},{"class":433,"line":612},[1804,1809,1813],{"type":321,"tag":431,"props":1805,"children":1806},{"style":444},[1807],{"type":326,"value":1808},"    immediate: ",{"type":321,"tag":431,"props":1810,"children":1811},{"style":506},[1812],{"type":326,"value":581},{"type":321,"tag":431,"props":1814,"children":1815},{"style":444},[1816],{"type":326,"value":586},{"type":321,"tag":431,"props":1818,"children":1819},{"class":433,"line":621},[1820,1825,1830],{"type":321,"tag":431,"props":1821,"children":1822},{"style":444},[1823],{"type":326,"value":1824},"    end_of_period: ",{"type":321,"tag":431,"props":1826,"children":1827},{"style":506},[1828],{"type":326,"value":1829},"false",{"type":321,"tag":431,"props":1831,"children":1832},{"style":555},[1833],{"type":326,"value":1834}," // this schedule will be disabled\n",{"type":321,"tag":431,"props":1836,"children":1837},{"class":433,"line":661},[1838],{"type":321,"tag":431,"props":1839,"children":1840},{"style":444},[1841],{"type":326,"value":1729},{"type":321,"tag":431,"props":1843,"children":1844},{"class":433,"line":703},[1845],{"type":321,"tag":431,"props":1846,"children":1847},{"style":444},[1848],{"type":326,"value":1737},{"type":321,"tag":1850,"props":1851,"children":1852},"style",{},[1853],{"type":326,"value":1854},"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":482,"depth":482,"links":1856},[1857,1858,1859,1863],{"id":358,"depth":365,"text":361},{"id":399,"depth":365,"text":402},{"id":867,"depth":365,"text":870,"children":1860},[1861,1862],{"id":874,"depth":482,"text":877},{"id":1228,"depth":482,"text":1231},{"id":342,"depth":365,"text":1552},"markdown","content:99.integrations:4.actions:1.cancel.md","content","99.integrations/4.actions/1.cancel.md","99.integrations/4.actions/1.cancel","md",{"loc":311},[1872,1876],{"_path":1873,"title":1874,"description":1875},"/integrations/controllers/families","Families - Controller","List and retrieve `Family` models.",{"_path":1877,"title":1878,"description":1879},"/integrations/actions/pause","Pause - Action","Pauses a subscription at specific date for a specific period.",{"_path":1881,"_dir":1882,"_draft":313,"_partial":313,"_locale":314,"type":1883,"title":1884,"properties":1885,"_id":1899,"_type":1900,"_source":1866,"_file":1901,"_stem":1902,"_extension":1900},"/types/actions/cancel/request.type","cancel","object","Cancel Request",{"customerId":1886,"subscriptionId":1890,"scheduledAt":1892,"unpause":1896},{"type":1887,"severity":1888,"description":1889},"string","required","Unique identifier of the customer.",{"type":1887,"severity":1888,"description":1891},"Unique identifier of the subscription.",{"type":1893,"severity":1888,"description":1894,"values":1895},"enum","When the cancellation should take effect. Subscription can be cancelled immediately or at the end of the current period.",[1605,1575],{"type":1897,"severity":1234,"description":1898},"boolean","If true, the subscription is required to be unpaused before it is cancelled.","content:types:actions:cancel:request.type.json","json","types/actions/cancel/request.type.json","types/actions/cancel/request.type",{"data":1904,"body":1905,"excerpt":-1,"toc":1911},{"title":314,"description":1889},{"type":318,"children":1906},[1907],{"type":321,"tag":322,"props":1908,"children":1909},{},[1910],{"type":326,"value":1889},{"title":314,"searchDepth":365,"depth":365,"links":1912},[],{"data":1914,"body":1915,"excerpt":-1,"toc":1921},{"title":314,"description":1891},{"type":318,"children":1916},[1917],{"type":321,"tag":322,"props":1918,"children":1919},{},[1920],{"type":326,"value":1891},{"title":314,"searchDepth":365,"depth":365,"links":1922},[],{"data":1924,"body":1926,"excerpt":-1,"toc":1943},{"title":314,"description":1925},"immediate end-of-period",{"type":318,"children":1927},[1928],{"type":321,"tag":322,"props":1929,"children":1930},{},[1931,1936,1938],{"type":321,"tag":329,"props":1932,"children":1934},{"className":1933},[],[1935],{"type":326,"value":1605},{"type":326,"value":1937}," ",{"type":321,"tag":329,"props":1939,"children":1941},{"className":1940},[],[1942],{"type":326,"value":1575},{"title":314,"searchDepth":365,"depth":365,"links":1944},[],{"data":1946,"body":1947,"excerpt":-1,"toc":1953},{"title":314,"description":1894},{"type":318,"children":1948},[1949],{"type":321,"tag":322,"props":1950,"children":1951},{},[1952],{"type":326,"value":1894},{"title":314,"searchDepth":365,"depth":365,"links":1954},[],{"data":1956,"body":1957,"excerpt":-1,"toc":1963},{"title":314,"description":1898},{"type":318,"children":1958},[1959],{"type":321,"tag":322,"props":1960,"children":1961},{},[1962],{"type":326,"value":1898},{"title":314,"searchDepth":365,"depth":365,"links":1964},[],{"_path":1966,"_dir":1882,"_draft":313,"_partial":313,"_locale":314,"type":1883,"title":1884,"properties":1967,"_id":1972,"_type":1900,"_source":1866,"_file":1973,"_stem":1974,"_extension":1900},"/types/actions/cancel/request-all.type",{"customerId":1968,"scheduledAt":1969,"unpause":1971},{"type":1887,"severity":1888,"description":1889},{"type":1893,"severity":1888,"description":1894,"values":1970},[1605,1575],{"type":1897,"severity":1234,"description":1898},"content:types:actions:cancel:request-all.type.json","types/actions/cancel/request-all.type.json","types/actions/cancel/request-all.type",{"_path":1976,"_dir":1882,"_draft":313,"_partial":313,"_locale":314,"type":1883,"title":1977,"description":1978,"properties":1979,"_id":1989,"_type":1900,"_source":1866,"_file":1990,"_stem":1991,"_extension":1900},"/types/actions/cancel/features.type","Cancel Features","Defines if the `Cancel` action is enabled and what features are available. If not set, the action is disabled.",{"enabled":1980,"schedules":1982},{"type":1897,"severity":1888,"description":1981},"If true, the action is enabled and can be used by Churnkey, otherwise it is disabled.\nThis action should be enabled for :badge{label='Cancel Flow'} to work.",{"type":1883,"severity":1888,"description":1983,"properties":1984},"Defines what schedules are available for subscription cancellation. If your system doesn't support some of the schedules, you should set them to false.\n At least one schedule should be enabled.",{"immediate":1985,"end-of-period":1987},{"type":1897,"severity":1888,"description":1986},"If true, subscription can be cancelled immediately.",{"type":1897,"severity":1888,"description":1988},"If true, subscription can be cancelled at the end of the current period.","content:types:actions:cancel:features.type.json","types/actions/cancel/features.type.json","types/actions/cancel/features.type",{"data":1993,"body":1995,"excerpt":-1,"toc":2007},{"title":314,"description":1994},"If true, the action is enabled and can be used by Churnkey, otherwise it is disabled.\nThis action should be enabled for  to work.",{"type":318,"children":1996},[1997],{"type":321,"tag":322,"props":1998,"children":1999},{},[2000,2002,2005],{"type":326,"value":2001},"If true, the action is enabled and can be used by Churnkey, otherwise it is disabled.\nThis action should be enabled for ",{"type":321,"tag":349,"props":2003,"children":2004},{"label":351},[],{"type":326,"value":2006}," to work.",{"title":314,"searchDepth":365,"depth":365,"links":2008},[],{"data":2010,"body":2012,"excerpt":-1,"toc":2018},{"title":314,"description":2011},"Defines what schedules are available for subscription cancellation. If your system doesn't support some of the schedules, you should set them to false.\nAt least one schedule should be enabled.",{"type":318,"children":2013},[2014],{"type":321,"tag":322,"props":2015,"children":2016},{},[2017],{"type":326,"value":2011},{"title":314,"searchDepth":365,"depth":365,"links":2019},[],1775515592481]