[{"data":1,"prerenderedAt":2834},["ShallowReactive",2],{"navigation":3,"/integrations/actions/pause":310,"/integrations/actions/pause-surround":2608,"/types/actions/pause/request.type":2615,"Uzbcrwb7K0":2642,"mvUbUXcxHo":2652,"Y5X4kvR7xY":2662,"0u73phUUpj":2684,"mizf1r3GFE":2704,"/types/actions/pause/request-all.type":2714,"/types/actions/pause/features.type":2725,"qydw4KL87Y":2750,"Mavpdf10Uy":2760,"dQkOeeRtg5":2770,"fpaSsaUWCD":2780,"/types/duration.type":2790,"Y4FvELPDmm":2824},[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":2601,"_id":2602,"_source":2603,"_file":2604,"_stem":2605,"_extension":2606,"sitemap":2607},"/integrations/actions/pause","actions",false,"","Pause - Action","Pauses a subscription at specific date for a specific period.",{"type":318,"children":319,"toc":2592},"root",[320,335,355,362,422,428,440,1118,1124,1134,1143,1164,1169,1179,1214,1643,1653,1662,1674,1687,1691,1698,1723,2150,2159,2171,2220,2228,2586],{"type":321,"tag":322,"props":323,"children":324},"element","p",{},[325,328,333],{"type":326,"value":327},"text","Required for ",{"type":321,"tag":329,"props":330,"children":332},"badge",{"label":331},"Pause Offer",[],{"type":326,"value":334}," to work.",{"type":321,"tag":322,"props":336,"children":337},{},[338,340,347,349],{"type":326,"value":339},"To implement the ",{"type":321,"tag":341,"props":342,"children":344},"code",{"className":343},[],[345],{"type":326,"value":346},"Pause",{"type":326,"value":348}," action, you need to implement an endpoint and define ",{"type":321,"tag":341,"props":350,"children":352},{"className":351},[],[353],{"type":326,"value":354},"features",{"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,397],{"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":341,"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":329,"props":393,"children":396},{"label":394,"color":395},"Required","green",[],{"type":321,"tag":368,"props":398,"children":401},{"title":399,"to":400},"Cancel - Action","/integrations/actions/cancel",[402,415],{"type":321,"tag":322,"props":403,"children":404},{},[405,407,413],{"type":326,"value":406},"Pause is a part of the Cancel Flow. You must implement the ",{"type":321,"tag":341,"props":408,"children":410},{"className":409},[],[411],{"type":326,"value":412},"Cancel",{"type":326,"value":414}," action first.",{"type":321,"tag":387,"props":416,"children":418},{"className":417},[390],[419],{"type":321,"tag":329,"props":420,"children":421},{"label":394,"color":395},[],{"type":321,"tag":356,"props":423,"children":425},{"id":424},"sdk",[426],{"type":326,"value":427},"SDK",{"type":321,"tag":322,"props":429,"children":430},{},[431,433,438],{"type":326,"value":432},"If you are using the SDK, you can implement the ",{"type":321,"tag":341,"props":434,"children":436},{"className":435},[],[437],{"type":326,"value":346},{"type":326,"value":439}," 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":441,"props":442,"children":443},"code-group",{},[444],{"type":321,"tag":445,"props":446,"children":451},"pre",{"className":447,"code":448,"filename":449,"language":450,"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 Pause = Integrator.Pause.config({\n    Subscriptions: Subscriptions,\n    features: {\n        // define which start dates are supported, at least one is required\n        startDates: { \n            [Integrator.Pause.StartDate.Immediate]: true,\n            [Integrator.Pause.StartDate.EndOfPeriod]: true\n        },\n        // define which durations are supported, at least one is required\n        durations: {\n            [Integrator.Pause.Duration.Period]: true,\n            [Integrator.Pause.Duration.Date]: true\n        },\n        allowAnnual: true\n    },\n    async handle(ctx, options) {\n        const subscription = await this.subscriptions.retrieve({\n            customerId: options.customerId,\n            id: options.subscriptionId\n        })\n\n        if (!options.allowAnnual) {\n            if (subscription.duration.unit === 'year') {\n                throw new Integrator.Error(400, 'Annual subscriptions are not allowed to be paused')\n            }\n        }\n\n        switch (options.startAt) {\n            case Integrator.Pause.StartDate.Immediate:\n                await ctx.db.pauseSubscription(subscription, {\n                    duration: options.duration\n                })\n                break\n            case Integrator.Pause.StartDate.EndOfPeriod:\n                await ctx.db.pauseSubscriptionAtThePeriodEnd(subscription, {\n                    duration: options.duration\n                })\n                break\n        }\n    }\n})\n","Typescript","typescript",[452],{"type":321,"tag":341,"props":453,"children":454},{"__ignoreMap":314},[455,484,505,515,556,565,574,584,593,612,626,635,644,653,670,683,691,704,713,753,795,804,813,822,830,854,882,929,938,947,955,969,983,1007,1016,1025,1034,1047,1068,1076,1084,1092,1100,1109],{"type":321,"tag":456,"props":457,"children":460},"span",{"class":458,"line":459},"line",1,[461,467,473,478],{"type":321,"tag":456,"props":462,"children":464},{"style":463},"--shiki-light:#CF222E;--shiki-default:#CF222E;--shiki-dark:#FF7B72",[465],{"type":326,"value":466},"import",{"type":321,"tag":456,"props":468,"children":470},{"style":469},"--shiki-light:#1F2328;--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[471],{"type":326,"value":472}," { Integrator } ",{"type":321,"tag":456,"props":474,"children":475},{"style":463},[476],{"type":326,"value":477},"from",{"type":321,"tag":456,"props":479,"children":481},{"style":480},"--shiki-light:#0A3069;--shiki-default:#0A3069;--shiki-dark:#A5D6FF",[482],{"type":326,"value":483}," '@churnkey/sdk'\n",{"type":321,"tag":456,"props":485,"children":486},{"class":458,"line":365},[487,491,496,500],{"type":321,"tag":456,"props":488,"children":489},{"style":463},[490],{"type":326,"value":466},{"type":321,"tag":456,"props":492,"children":493},{"style":469},[494],{"type":326,"value":495}," { Subscriptions } ",{"type":321,"tag":456,"props":497,"children":498},{"style":463},[499],{"type":326,"value":477},{"type":321,"tag":456,"props":501,"children":502},{"style":480},[503],{"type":326,"value":504}," '../controllers/Subscriptions'\n",{"type":321,"tag":456,"props":506,"children":508},{"class":458,"line":507},3,[509],{"type":321,"tag":456,"props":510,"children":512},{"emptyLinePlaceholder":511},true,[513],{"type":326,"value":514},"\n",{"type":321,"tag":456,"props":516,"children":518},{"class":458,"line":517},4,[519,524,529,535,540,545,551],{"type":321,"tag":456,"props":520,"children":521},{"style":463},[522],{"type":326,"value":523},"export",{"type":321,"tag":456,"props":525,"children":526},{"style":463},[527],{"type":326,"value":528}," const",{"type":321,"tag":456,"props":530,"children":532},{"style":531},"--shiki-light:#0550AE;--shiki-default:#0550AE;--shiki-dark:#79C0FF",[533],{"type":326,"value":534}," Pause",{"type":321,"tag":456,"props":536,"children":537},{"style":463},[538],{"type":326,"value":539}," =",{"type":321,"tag":456,"props":541,"children":542},{"style":469},[543],{"type":326,"value":544}," Integrator.Pause.",{"type":321,"tag":456,"props":546,"children":548},{"style":547},"--shiki-light:#8250DF;--shiki-default:#8250DF;--shiki-dark:#D2A8FF",[549],{"type":326,"value":550},"config",{"type":321,"tag":456,"props":552,"children":553},{"style":469},[554],{"type":326,"value":555},"({\n",{"type":321,"tag":456,"props":557,"children":559},{"class":458,"line":558},5,[560],{"type":321,"tag":456,"props":561,"children":562},{"style":469},[563],{"type":326,"value":564},"    Subscriptions: Subscriptions,\n",{"type":321,"tag":456,"props":566,"children":568},{"class":458,"line":567},6,[569],{"type":321,"tag":456,"props":570,"children":571},{"style":469},[572],{"type":326,"value":573},"    features: {\n",{"type":321,"tag":456,"props":575,"children":577},{"class":458,"line":576},7,[578],{"type":321,"tag":456,"props":579,"children":581},{"style":580},"--shiki-light:#6E7781;--shiki-default:#6E7781;--shiki-dark:#8B949E",[582],{"type":326,"value":583},"        // define which start dates are supported, at least one is required\n",{"type":321,"tag":456,"props":585,"children":587},{"class":458,"line":586},8,[588],{"type":321,"tag":456,"props":589,"children":590},{"style":469},[591],{"type":326,"value":592},"        startDates: { \n",{"type":321,"tag":456,"props":594,"children":596},{"class":458,"line":595},9,[597,602,607],{"type":321,"tag":456,"props":598,"children":599},{"style":469},[600],{"type":326,"value":601},"            [Integrator.Pause.StartDate.Immediate]: ",{"type":321,"tag":456,"props":603,"children":604},{"style":531},[605],{"type":326,"value":606},"true",{"type":321,"tag":456,"props":608,"children":609},{"style":469},[610],{"type":326,"value":611},",\n",{"type":321,"tag":456,"props":613,"children":615},{"class":458,"line":614},10,[616,621],{"type":321,"tag":456,"props":617,"children":618},{"style":469},[619],{"type":326,"value":620},"            [Integrator.Pause.StartDate.EndOfPeriod]: ",{"type":321,"tag":456,"props":622,"children":623},{"style":531},[624],{"type":326,"value":625},"true\n",{"type":321,"tag":456,"props":627,"children":629},{"class":458,"line":628},11,[630],{"type":321,"tag":456,"props":631,"children":632},{"style":469},[633],{"type":326,"value":634},"        },\n",{"type":321,"tag":456,"props":636,"children":638},{"class":458,"line":637},12,[639],{"type":321,"tag":456,"props":640,"children":641},{"style":580},[642],{"type":326,"value":643},"        // define which durations are supported, at least one is required\n",{"type":321,"tag":456,"props":645,"children":647},{"class":458,"line":646},13,[648],{"type":321,"tag":456,"props":649,"children":650},{"style":469},[651],{"type":326,"value":652},"        durations: {\n",{"type":321,"tag":456,"props":654,"children":656},{"class":458,"line":655},14,[657,662,666],{"type":321,"tag":456,"props":658,"children":659},{"style":469},[660],{"type":326,"value":661},"            [Integrator.Pause.Duration.Period]: ",{"type":321,"tag":456,"props":663,"children":664},{"style":531},[665],{"type":326,"value":606},{"type":321,"tag":456,"props":667,"children":668},{"style":469},[669],{"type":326,"value":611},{"type":321,"tag":456,"props":671,"children":673},{"class":458,"line":672},15,[674,679],{"type":321,"tag":456,"props":675,"children":676},{"style":469},[677],{"type":326,"value":678},"            [Integrator.Pause.Duration.Date]: ",{"type":321,"tag":456,"props":680,"children":681},{"style":531},[682],{"type":326,"value":625},{"type":321,"tag":456,"props":684,"children":686},{"class":458,"line":685},16,[687],{"type":321,"tag":456,"props":688,"children":689},{"style":469},[690],{"type":326,"value":634},{"type":321,"tag":456,"props":692,"children":694},{"class":458,"line":693},17,[695,700],{"type":321,"tag":456,"props":696,"children":697},{"style":469},[698],{"type":326,"value":699},"        allowAnnual: ",{"type":321,"tag":456,"props":701,"children":702},{"style":531},[703],{"type":326,"value":625},{"type":321,"tag":456,"props":705,"children":707},{"class":458,"line":706},18,[708],{"type":321,"tag":456,"props":709,"children":710},{"style":469},[711],{"type":326,"value":712},"    },\n",{"type":321,"tag":456,"props":714,"children":716},{"class":458,"line":715},19,[717,722,727,732,738,743,748],{"type":321,"tag":456,"props":718,"children":719},{"style":463},[720],{"type":326,"value":721},"    async",{"type":321,"tag":456,"props":723,"children":724},{"style":547},[725],{"type":326,"value":726}," handle",{"type":321,"tag":456,"props":728,"children":729},{"style":469},[730],{"type":326,"value":731},"(",{"type":321,"tag":456,"props":733,"children":735},{"style":734},"--shiki-light:#953800;--shiki-default:#953800;--shiki-dark:#FFA657",[736],{"type":326,"value":737},"ctx",{"type":321,"tag":456,"props":739,"children":740},{"style":469},[741],{"type":326,"value":742},", ",{"type":321,"tag":456,"props":744,"children":745},{"style":734},[746],{"type":326,"value":747},"options",{"type":321,"tag":456,"props":749,"children":750},{"style":469},[751],{"type":326,"value":752},") {\n",{"type":321,"tag":456,"props":754,"children":756},{"class":458,"line":755},20,[757,762,767,771,776,781,786,791],{"type":321,"tag":456,"props":758,"children":759},{"style":463},[760],{"type":326,"value":761},"        const",{"type":321,"tag":456,"props":763,"children":764},{"style":531},[765],{"type":326,"value":766}," subscription",{"type":321,"tag":456,"props":768,"children":769},{"style":463},[770],{"type":326,"value":539},{"type":321,"tag":456,"props":772,"children":773},{"style":463},[774],{"type":326,"value":775}," await",{"type":321,"tag":456,"props":777,"children":778},{"style":531},[779],{"type":326,"value":780}," this",{"type":321,"tag":456,"props":782,"children":783},{"style":469},[784],{"type":326,"value":785},".subscriptions.",{"type":321,"tag":456,"props":787,"children":788},{"style":547},[789],{"type":326,"value":790},"retrieve",{"type":321,"tag":456,"props":792,"children":793},{"style":469},[794],{"type":326,"value":555},{"type":321,"tag":456,"props":796,"children":798},{"class":458,"line":797},21,[799],{"type":321,"tag":456,"props":800,"children":801},{"style":469},[802],{"type":326,"value":803},"            customerId: options.customerId,\n",{"type":321,"tag":456,"props":805,"children":807},{"class":458,"line":806},22,[808],{"type":321,"tag":456,"props":809,"children":810},{"style":469},[811],{"type":326,"value":812},"            id: options.subscriptionId\n",{"type":321,"tag":456,"props":814,"children":816},{"class":458,"line":815},23,[817],{"type":321,"tag":456,"props":818,"children":819},{"style":469},[820],{"type":326,"value":821},"        })\n",{"type":321,"tag":456,"props":823,"children":825},{"class":458,"line":824},24,[826],{"type":321,"tag":456,"props":827,"children":828},{"emptyLinePlaceholder":511},[829],{"type":326,"value":514},{"type":321,"tag":456,"props":831,"children":833},{"class":458,"line":832},25,[834,839,844,849],{"type":321,"tag":456,"props":835,"children":836},{"style":463},[837],{"type":326,"value":838},"        if",{"type":321,"tag":456,"props":840,"children":841},{"style":469},[842],{"type":326,"value":843}," (",{"type":321,"tag":456,"props":845,"children":846},{"style":463},[847],{"type":326,"value":848},"!",{"type":321,"tag":456,"props":850,"children":851},{"style":469},[852],{"type":326,"value":853},"options.allowAnnual) {\n",{"type":321,"tag":456,"props":855,"children":857},{"class":458,"line":856},26,[858,863,868,873,878],{"type":321,"tag":456,"props":859,"children":860},{"style":463},[861],{"type":326,"value":862},"            if",{"type":321,"tag":456,"props":864,"children":865},{"style":469},[866],{"type":326,"value":867}," (subscription.duration.unit ",{"type":321,"tag":456,"props":869,"children":870},{"style":463},[871],{"type":326,"value":872},"===",{"type":321,"tag":456,"props":874,"children":875},{"style":480},[876],{"type":326,"value":877}," 'year'",{"type":321,"tag":456,"props":879,"children":880},{"style":469},[881],{"type":326,"value":752},{"type":321,"tag":456,"props":883,"children":885},{"class":458,"line":884},27,[886,891,896,901,906,910,915,919,924],{"type":321,"tag":456,"props":887,"children":888},{"style":463},[889],{"type":326,"value":890},"                throw",{"type":321,"tag":456,"props":892,"children":893},{"style":463},[894],{"type":326,"value":895}," new",{"type":321,"tag":456,"props":897,"children":898},{"style":469},[899],{"type":326,"value":900}," Integrator.",{"type":321,"tag":456,"props":902,"children":903},{"style":547},[904],{"type":326,"value":905},"Error",{"type":321,"tag":456,"props":907,"children":908},{"style":469},[909],{"type":326,"value":731},{"type":321,"tag":456,"props":911,"children":912},{"style":531},[913],{"type":326,"value":914},"400",{"type":321,"tag":456,"props":916,"children":917},{"style":469},[918],{"type":326,"value":742},{"type":321,"tag":456,"props":920,"children":921},{"style":480},[922],{"type":326,"value":923},"'Annual subscriptions are not allowed to be paused'",{"type":321,"tag":456,"props":925,"children":926},{"style":469},[927],{"type":326,"value":928},")\n",{"type":321,"tag":456,"props":930,"children":932},{"class":458,"line":931},28,[933],{"type":321,"tag":456,"props":934,"children":935},{"style":469},[936],{"type":326,"value":937},"            }\n",{"type":321,"tag":456,"props":939,"children":941},{"class":458,"line":940},29,[942],{"type":321,"tag":456,"props":943,"children":944},{"style":469},[945],{"type":326,"value":946},"        }\n",{"type":321,"tag":456,"props":948,"children":950},{"class":458,"line":949},30,[951],{"type":321,"tag":456,"props":952,"children":953},{"emptyLinePlaceholder":511},[954],{"type":326,"value":514},{"type":321,"tag":456,"props":956,"children":958},{"class":458,"line":957},31,[959,964],{"type":321,"tag":456,"props":960,"children":961},{"style":463},[962],{"type":326,"value":963},"        switch",{"type":321,"tag":456,"props":965,"children":966},{"style":469},[967],{"type":326,"value":968}," (options.startAt) {\n",{"type":321,"tag":456,"props":970,"children":972},{"class":458,"line":971},32,[973,978],{"type":321,"tag":456,"props":974,"children":975},{"style":463},[976],{"type":326,"value":977},"            case",{"type":321,"tag":456,"props":979,"children":980},{"style":469},[981],{"type":326,"value":982}," Integrator.Pause.StartDate.Immediate:\n",{"type":321,"tag":456,"props":984,"children":986},{"class":458,"line":985},33,[987,992,997,1002],{"type":321,"tag":456,"props":988,"children":989},{"style":463},[990],{"type":326,"value":991},"                await",{"type":321,"tag":456,"props":993,"children":994},{"style":469},[995],{"type":326,"value":996}," ctx.db.",{"type":321,"tag":456,"props":998,"children":999},{"style":547},[1000],{"type":326,"value":1001},"pauseSubscription",{"type":321,"tag":456,"props":1003,"children":1004},{"style":469},[1005],{"type":326,"value":1006},"(subscription, {\n",{"type":321,"tag":456,"props":1008,"children":1010},{"class":458,"line":1009},34,[1011],{"type":321,"tag":456,"props":1012,"children":1013},{"style":469},[1014],{"type":326,"value":1015},"                    duration: options.duration\n",{"type":321,"tag":456,"props":1017,"children":1019},{"class":458,"line":1018},35,[1020],{"type":321,"tag":456,"props":1021,"children":1022},{"style":469},[1023],{"type":326,"value":1024},"                })\n",{"type":321,"tag":456,"props":1026,"children":1028},{"class":458,"line":1027},36,[1029],{"type":321,"tag":456,"props":1030,"children":1031},{"style":463},[1032],{"type":326,"value":1033},"                break\n",{"type":321,"tag":456,"props":1035,"children":1037},{"class":458,"line":1036},37,[1038,1042],{"type":321,"tag":456,"props":1039,"children":1040},{"style":463},[1041],{"type":326,"value":977},{"type":321,"tag":456,"props":1043,"children":1044},{"style":469},[1045],{"type":326,"value":1046}," Integrator.Pause.StartDate.EndOfPeriod:\n",{"type":321,"tag":456,"props":1048,"children":1050},{"class":458,"line":1049},38,[1051,1055,1059,1064],{"type":321,"tag":456,"props":1052,"children":1053},{"style":463},[1054],{"type":326,"value":991},{"type":321,"tag":456,"props":1056,"children":1057},{"style":469},[1058],{"type":326,"value":996},{"type":321,"tag":456,"props":1060,"children":1061},{"style":547},[1062],{"type":326,"value":1063},"pauseSubscriptionAtThePeriodEnd",{"type":321,"tag":456,"props":1065,"children":1066},{"style":469},[1067],{"type":326,"value":1006},{"type":321,"tag":456,"props":1069,"children":1071},{"class":458,"line":1070},39,[1072],{"type":321,"tag":456,"props":1073,"children":1074},{"style":469},[1075],{"type":326,"value":1015},{"type":321,"tag":456,"props":1077,"children":1079},{"class":458,"line":1078},40,[1080],{"type":321,"tag":456,"props":1081,"children":1082},{"style":469},[1083],{"type":326,"value":1024},{"type":321,"tag":456,"props":1085,"children":1087},{"class":458,"line":1086},41,[1088],{"type":321,"tag":456,"props":1089,"children":1090},{"style":463},[1091],{"type":326,"value":1033},{"type":321,"tag":456,"props":1093,"children":1095},{"class":458,"line":1094},42,[1096],{"type":321,"tag":456,"props":1097,"children":1098},{"style":469},[1099],{"type":326,"value":946},{"type":321,"tag":456,"props":1101,"children":1103},{"class":458,"line":1102},43,[1104],{"type":321,"tag":456,"props":1105,"children":1106},{"style":469},[1107],{"type":326,"value":1108},"    }\n",{"type":321,"tag":456,"props":1110,"children":1112},{"class":458,"line":1111},44,[1113],{"type":321,"tag":456,"props":1114,"children":1115},{"style":469},[1116],{"type":326,"value":1117},"})\n",{"type":321,"tag":356,"props":1119,"children":1121},{"id":1120},"endpoints",[1122],{"type":326,"value":1123},"Endpoints",{"type":321,"tag":1125,"props":1126,"children":1128},"h3",{"id":1127},"handle",[1129,1131],{"type":326,"value":1130},"Handle ",{"type":321,"tag":329,"props":1132,"children":1133},{"label":394,"color":395},[],{"type":321,"tag":322,"props":1135,"children":1136},{},[1137],{"type":321,"tag":341,"props":1138,"children":1140},{"className":1139},[],[1141],{"type":326,"value":1142},"POST /churnkey/actions/subscription/pause",{"type":321,"tag":322,"props":1144,"children":1145},{},[1146,1148,1154,1156,1162],{"type":326,"value":1147},"This endpoints handles the single subscription pause. You should find the subscription by ",{"type":321,"tag":341,"props":1149,"children":1151},{"className":1150},[],[1152],{"type":326,"value":1153},"customerId",{"type":326,"value":1155}," and ",{"type":321,"tag":341,"props":1157,"children":1159},{"className":1158},[],[1160],{"type":326,"value":1161},"subscriptionId",{"type":326,"value":1163}," and pause it.",{"type":321,"tag":322,"props":1165,"children":1166},{},[1167],{"type":326,"value":1168},"Options for pause, provided in the request body.",{"type":321,"tag":1170,"props":1171,"children":1173},"collapsible",{"name":1172},"request body",[1174],{"type":321,"tag":1175,"props":1176,"children":1178},"field-schema",{"schema":1177},"/types/actions/pause/request.type.json",[],{"type":321,"tag":1170,"props":1180,"children":1182},{"name":1181},"response",[1183],{"type":321,"tag":1184,"props":1185,"children":1186},"tabs",{},[1187,1197],{"type":321,"tag":1188,"props":1189,"children":1191},"div",{"label":1190},"200",[1192],{"type":321,"tag":322,"props":1193,"children":1194},{},[1195],{"type":326,"value":1196},"Must return empty response.",{"type":321,"tag":1188,"props":1198,"children":1199},{"label":905},[1200],{"type":321,"tag":322,"props":1201,"children":1202},{},[1203,1205,1212],{"type":326,"value":1204},"See ",{"type":321,"tag":1206,"props":1207,"children":1209},"a",{"href":1208},"/integrations/general#error-responses",[1210],{"type":326,"value":1211},"Error Responses",{"type":326,"value":1213},".",{"type":321,"tag":1170,"props":1215,"children":1217},{"name":1216},"code example",[1218],{"type":321,"tag":441,"props":1219,"children":1220},{},[1221],{"type":321,"tag":445,"props":1222,"children":1225},{"className":447,"code":1223,"filename":1224,"language":450,"meta":314,"style":314},"  app.post('/churnkey/actions/subscription/pause', async (req, res) => {\n      const subscription = await db.findSubscription(req.body.customerId, req.body.subscriptionId)\n      \n      if (!req.body.allowAnnual) {\n          if (subscription.duration.unit === 'year') {\n              return res.status(400).send({\n                  code: 400,\n                  message: 'Annual subscriptions are not allowed to be paused'\n              })\n          }\n      }\n\n      switch (req.body.startAt) {\n          case 'immediate':\n              await db.pauseSubscription(subscription, {\n                  duration: req.body.duration\n              })\n              break\n          case 'end_of_period':\n              await db.pauseSubscriptionAtThePeriodEnd(subscription, {\n                  duration: req.body.duration\n              })\n              break\n      }\n      res.send()\n  })\n","Typescript Express",[1226],{"type":321,"tag":341,"props":1227,"children":1228},{"__ignoreMap":314},[1229,1293,1328,1336,1357,1381,1421,1437,1450,1458,1466,1474,1481,1494,1512,1532,1540,1547,1555,1571,1590,1597,1604,1611,1618,1635],{"type":321,"tag":456,"props":1230,"children":1231},{"class":458,"line":459},[1232,1237,1242,1246,1251,1255,1260,1264,1269,1273,1278,1283,1288],{"type":321,"tag":456,"props":1233,"children":1234},{"style":469},[1235],{"type":326,"value":1236},"  app.",{"type":321,"tag":456,"props":1238,"children":1239},{"style":547},[1240],{"type":326,"value":1241},"post",{"type":321,"tag":456,"props":1243,"children":1244},{"style":469},[1245],{"type":326,"value":731},{"type":321,"tag":456,"props":1247,"children":1248},{"style":480},[1249],{"type":326,"value":1250},"'/churnkey/actions/subscription/pause'",{"type":321,"tag":456,"props":1252,"children":1253},{"style":469},[1254],{"type":326,"value":742},{"type":321,"tag":456,"props":1256,"children":1257},{"style":463},[1258],{"type":326,"value":1259},"async",{"type":321,"tag":456,"props":1261,"children":1262},{"style":469},[1263],{"type":326,"value":843},{"type":321,"tag":456,"props":1265,"children":1266},{"style":734},[1267],{"type":326,"value":1268},"req",{"type":321,"tag":456,"props":1270,"children":1271},{"style":469},[1272],{"type":326,"value":742},{"type":321,"tag":456,"props":1274,"children":1275},{"style":734},[1276],{"type":326,"value":1277},"res",{"type":321,"tag":456,"props":1279,"children":1280},{"style":469},[1281],{"type":326,"value":1282},") ",{"type":321,"tag":456,"props":1284,"children":1285},{"style":463},[1286],{"type":326,"value":1287},"=>",{"type":321,"tag":456,"props":1289,"children":1290},{"style":469},[1291],{"type":326,"value":1292}," {\n",{"type":321,"tag":456,"props":1294,"children":1295},{"class":458,"line":365},[1296,1301,1305,1309,1313,1318,1323],{"type":321,"tag":456,"props":1297,"children":1298},{"style":463},[1299],{"type":326,"value":1300},"      const",{"type":321,"tag":456,"props":1302,"children":1303},{"style":531},[1304],{"type":326,"value":766},{"type":321,"tag":456,"props":1306,"children":1307},{"style":463},[1308],{"type":326,"value":539},{"type":321,"tag":456,"props":1310,"children":1311},{"style":463},[1312],{"type":326,"value":775},{"type":321,"tag":456,"props":1314,"children":1315},{"style":469},[1316],{"type":326,"value":1317}," db.",{"type":321,"tag":456,"props":1319,"children":1320},{"style":547},[1321],{"type":326,"value":1322},"findSubscription",{"type":321,"tag":456,"props":1324,"children":1325},{"style":469},[1326],{"type":326,"value":1327},"(req.body.customerId, req.body.subscriptionId)\n",{"type":321,"tag":456,"props":1329,"children":1330},{"class":458,"line":507},[1331],{"type":321,"tag":456,"props":1332,"children":1333},{"style":469},[1334],{"type":326,"value":1335},"      \n",{"type":321,"tag":456,"props":1337,"children":1338},{"class":458,"line":517},[1339,1344,1348,1352],{"type":321,"tag":456,"props":1340,"children":1341},{"style":463},[1342],{"type":326,"value":1343},"      if",{"type":321,"tag":456,"props":1345,"children":1346},{"style":469},[1347],{"type":326,"value":843},{"type":321,"tag":456,"props":1349,"children":1350},{"style":463},[1351],{"type":326,"value":848},{"type":321,"tag":456,"props":1353,"children":1354},{"style":469},[1355],{"type":326,"value":1356},"req.body.allowAnnual) {\n",{"type":321,"tag":456,"props":1358,"children":1359},{"class":458,"line":558},[1360,1365,1369,1373,1377],{"type":321,"tag":456,"props":1361,"children":1362},{"style":463},[1363],{"type":326,"value":1364},"          if",{"type":321,"tag":456,"props":1366,"children":1367},{"style":469},[1368],{"type":326,"value":867},{"type":321,"tag":456,"props":1370,"children":1371},{"style":463},[1372],{"type":326,"value":872},{"type":321,"tag":456,"props":1374,"children":1375},{"style":480},[1376],{"type":326,"value":877},{"type":321,"tag":456,"props":1378,"children":1379},{"style":469},[1380],{"type":326,"value":752},{"type":321,"tag":456,"props":1382,"children":1383},{"class":458,"line":567},[1384,1389,1394,1399,1403,1407,1412,1417],{"type":321,"tag":456,"props":1385,"children":1386},{"style":463},[1387],{"type":326,"value":1388},"              return",{"type":321,"tag":456,"props":1390,"children":1391},{"style":469},[1392],{"type":326,"value":1393}," res.",{"type":321,"tag":456,"props":1395,"children":1396},{"style":547},[1397],{"type":326,"value":1398},"status",{"type":321,"tag":456,"props":1400,"children":1401},{"style":469},[1402],{"type":326,"value":731},{"type":321,"tag":456,"props":1404,"children":1405},{"style":531},[1406],{"type":326,"value":914},{"type":321,"tag":456,"props":1408,"children":1409},{"style":469},[1410],{"type":326,"value":1411},").",{"type":321,"tag":456,"props":1413,"children":1414},{"style":547},[1415],{"type":326,"value":1416},"send",{"type":321,"tag":456,"props":1418,"children":1419},{"style":469},[1420],{"type":326,"value":555},{"type":321,"tag":456,"props":1422,"children":1423},{"class":458,"line":576},[1424,1429,1433],{"type":321,"tag":456,"props":1425,"children":1426},{"style":469},[1427],{"type":326,"value":1428},"                  code: ",{"type":321,"tag":456,"props":1430,"children":1431},{"style":531},[1432],{"type":326,"value":914},{"type":321,"tag":456,"props":1434,"children":1435},{"style":469},[1436],{"type":326,"value":611},{"type":321,"tag":456,"props":1438,"children":1439},{"class":458,"line":586},[1440,1445],{"type":321,"tag":456,"props":1441,"children":1442},{"style":469},[1443],{"type":326,"value":1444},"                  message: ",{"type":321,"tag":456,"props":1446,"children":1447},{"style":480},[1448],{"type":326,"value":1449},"'Annual subscriptions are not allowed to be paused'\n",{"type":321,"tag":456,"props":1451,"children":1452},{"class":458,"line":595},[1453],{"type":321,"tag":456,"props":1454,"children":1455},{"style":469},[1456],{"type":326,"value":1457},"              })\n",{"type":321,"tag":456,"props":1459,"children":1460},{"class":458,"line":614},[1461],{"type":321,"tag":456,"props":1462,"children":1463},{"style":469},[1464],{"type":326,"value":1465},"          }\n",{"type":321,"tag":456,"props":1467,"children":1468},{"class":458,"line":628},[1469],{"type":321,"tag":456,"props":1470,"children":1471},{"style":469},[1472],{"type":326,"value":1473},"      }\n",{"type":321,"tag":456,"props":1475,"children":1476},{"class":458,"line":637},[1477],{"type":321,"tag":456,"props":1478,"children":1479},{"emptyLinePlaceholder":511},[1480],{"type":326,"value":514},{"type":321,"tag":456,"props":1482,"children":1483},{"class":458,"line":646},[1484,1489],{"type":321,"tag":456,"props":1485,"children":1486},{"style":463},[1487],{"type":326,"value":1488},"      switch",{"type":321,"tag":456,"props":1490,"children":1491},{"style":469},[1492],{"type":326,"value":1493}," (req.body.startAt) {\n",{"type":321,"tag":456,"props":1495,"children":1496},{"class":458,"line":655},[1497,1502,1507],{"type":321,"tag":456,"props":1498,"children":1499},{"style":463},[1500],{"type":326,"value":1501},"          case",{"type":321,"tag":456,"props":1503,"children":1504},{"style":480},[1505],{"type":326,"value":1506}," 'immediate'",{"type":321,"tag":456,"props":1508,"children":1509},{"style":469},[1510],{"type":326,"value":1511},":\n",{"type":321,"tag":456,"props":1513,"children":1514},{"class":458,"line":672},[1515,1520,1524,1528],{"type":321,"tag":456,"props":1516,"children":1517},{"style":463},[1518],{"type":326,"value":1519},"              await",{"type":321,"tag":456,"props":1521,"children":1522},{"style":469},[1523],{"type":326,"value":1317},{"type":321,"tag":456,"props":1525,"children":1526},{"style":547},[1527],{"type":326,"value":1001},{"type":321,"tag":456,"props":1529,"children":1530},{"style":469},[1531],{"type":326,"value":1006},{"type":321,"tag":456,"props":1533,"children":1534},{"class":458,"line":685},[1535],{"type":321,"tag":456,"props":1536,"children":1537},{"style":469},[1538],{"type":326,"value":1539},"                  duration: req.body.duration\n",{"type":321,"tag":456,"props":1541,"children":1542},{"class":458,"line":693},[1543],{"type":321,"tag":456,"props":1544,"children":1545},{"style":469},[1546],{"type":326,"value":1457},{"type":321,"tag":456,"props":1548,"children":1549},{"class":458,"line":706},[1550],{"type":321,"tag":456,"props":1551,"children":1552},{"style":463},[1553],{"type":326,"value":1554},"              break\n",{"type":321,"tag":456,"props":1556,"children":1557},{"class":458,"line":715},[1558,1562,1567],{"type":321,"tag":456,"props":1559,"children":1560},{"style":463},[1561],{"type":326,"value":1501},{"type":321,"tag":456,"props":1563,"children":1564},{"style":480},[1565],{"type":326,"value":1566}," 'end_of_period'",{"type":321,"tag":456,"props":1568,"children":1569},{"style":469},[1570],{"type":326,"value":1511},{"type":321,"tag":456,"props":1572,"children":1573},{"class":458,"line":755},[1574,1578,1582,1586],{"type":321,"tag":456,"props":1575,"children":1576},{"style":463},[1577],{"type":326,"value":1519},{"type":321,"tag":456,"props":1579,"children":1580},{"style":469},[1581],{"type":326,"value":1317},{"type":321,"tag":456,"props":1583,"children":1584},{"style":547},[1585],{"type":326,"value":1063},{"type":321,"tag":456,"props":1587,"children":1588},{"style":469},[1589],{"type":326,"value":1006},{"type":321,"tag":456,"props":1591,"children":1592},{"class":458,"line":797},[1593],{"type":321,"tag":456,"props":1594,"children":1595},{"style":469},[1596],{"type":326,"value":1539},{"type":321,"tag":456,"props":1598,"children":1599},{"class":458,"line":806},[1600],{"type":321,"tag":456,"props":1601,"children":1602},{"style":469},[1603],{"type":326,"value":1457},{"type":321,"tag":456,"props":1605,"children":1606},{"class":458,"line":815},[1607],{"type":321,"tag":456,"props":1608,"children":1609},{"style":463},[1610],{"type":326,"value":1554},{"type":321,"tag":456,"props":1612,"children":1613},{"class":458,"line":824},[1614],{"type":321,"tag":456,"props":1615,"children":1616},{"style":469},[1617],{"type":326,"value":1473},{"type":321,"tag":456,"props":1619,"children":1620},{"class":458,"line":832},[1621,1626,1630],{"type":321,"tag":456,"props":1622,"children":1623},{"style":469},[1624],{"type":326,"value":1625},"      res.",{"type":321,"tag":456,"props":1627,"children":1628},{"style":547},[1629],{"type":326,"value":1416},{"type":321,"tag":456,"props":1631,"children":1632},{"style":469},[1633],{"type":326,"value":1634},"()\n",{"type":321,"tag":456,"props":1636,"children":1637},{"class":458,"line":856},[1638],{"type":321,"tag":456,"props":1639,"children":1640},{"style":469},[1641],{"type":326,"value":1642},"  })\n",{"type":321,"tag":1125,"props":1644,"children":1646},{"id":1645},"handle-all",[1647,1649],{"type":326,"value":1648},"Handle All ",{"type":321,"tag":329,"props":1650,"children":1652},{"label":1651},"optional",[],{"type":321,"tag":322,"props":1654,"children":1655},{},[1656],{"type":321,"tag":341,"props":1657,"children":1659},{"className":1658},[],[1660],{"type":326,"value":1661},"POST /churnkey/actions/customer/pause",{"type":321,"tag":322,"props":1663,"children":1664},{},[1665,1667,1672],{"type":326,"value":1666},"This endpoint handles pause of all customer's subscriptions. You should find all subscriptions by ",{"type":321,"tag":341,"props":1668,"children":1670},{"className":1669},[],[1671],{"type":326,"value":1153},{"type":326,"value":1673}," and pause them.",{"type":321,"tag":322,"props":1675,"children":1676},{},[1677,1679,1685],{"type":326,"value":1678},"This endpoint is optional. By default, when we need to pause all subscriptions, we will call the ",{"type":321,"tag":341,"props":1680,"children":1682},{"className":1681},[],[1683],{"type":326,"value":1684},"Handle",{"type":326,"value":1686}," 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":1688,"children":1689},{},[1690],{"type":326,"value":1168},{"type":321,"tag":1170,"props":1692,"children":1693},{"name":1172},[1694],{"type":321,"tag":1175,"props":1695,"children":1697},{"schema":1696},"/types/actions/pause/request-all.type.json",[],{"type":321,"tag":1170,"props":1699,"children":1700},{"name":1181},[1701],{"type":321,"tag":1184,"props":1702,"children":1703},{},[1704,1711],{"type":321,"tag":1188,"props":1705,"children":1706},{"label":1190},[1707],{"type":321,"tag":322,"props":1708,"children":1709},{},[1710],{"type":326,"value":1196},{"type":321,"tag":1188,"props":1712,"children":1713},{"label":905},[1714],{"type":321,"tag":322,"props":1715,"children":1716},{},[1717,1718,1722],{"type":326,"value":1204},{"type":321,"tag":1206,"props":1719,"children":1720},{"href":1208},[1721],{"type":326,"value":1211},{"type":326,"value":1213},{"type":321,"tag":1170,"props":1724,"children":1725},{"name":1216},[1726],{"type":321,"tag":441,"props":1727,"children":1728},{},[1729],{"type":321,"tag":445,"props":1730,"children":1732},{"className":447,"code":1731,"filename":1224,"language":450,"meta":314,"style":314},"  app.post('/churnkey/actions/customer/cancel', async (req, res) => {\n      const subscriptions = await db.findSubscriptionsByCustomerId(req.body.customerId)\n\n      if (!req.body.allowAnnual) {\n          if (subscriptions.some(sub => sub.duration.unit === 'year')) {\n              return res.status(400).send({\n                  code: 400,\n                  message: 'Annual subscriptions are not allowed to be paused'\n              })\n          }\n      }\n\n      switch (req.body.startAt) {\n          case 'immediate':\n              await db.pauseSubscriptions(subscriptions, {\n                  duration: req.body.duration\n              })\n              break\n          case 'end_of_period':\n              await db.pauseSubscriptionsAtThePeriodEnd(subscriptions, {\n                  duration: req.body.duration\n              })\n              break\n      }\n\n      res.send()\n  })\n",[1733],{"type":321,"tag":341,"props":1734,"children":1735},{"__ignoreMap":314},[1736,1792,1826,1833,1852,1901,1936,1951,1962,1969,1976,1983,1990,2001,2016,2037,2044,2051,2058,2073,2093,2100,2107,2114,2121,2128,2143],{"type":321,"tag":456,"props":1737,"children":1738},{"class":458,"line":459},[1739,1743,1747,1751,1756,1760,1764,1768,1772,1776,1780,1784,1788],{"type":321,"tag":456,"props":1740,"children":1741},{"style":469},[1742],{"type":326,"value":1236},{"type":321,"tag":456,"props":1744,"children":1745},{"style":547},[1746],{"type":326,"value":1241},{"type":321,"tag":456,"props":1748,"children":1749},{"style":469},[1750],{"type":326,"value":731},{"type":321,"tag":456,"props":1752,"children":1753},{"style":480},[1754],{"type":326,"value":1755},"'/churnkey/actions/customer/cancel'",{"type":321,"tag":456,"props":1757,"children":1758},{"style":469},[1759],{"type":326,"value":742},{"type":321,"tag":456,"props":1761,"children":1762},{"style":463},[1763],{"type":326,"value":1259},{"type":321,"tag":456,"props":1765,"children":1766},{"style":469},[1767],{"type":326,"value":843},{"type":321,"tag":456,"props":1769,"children":1770},{"style":734},[1771],{"type":326,"value":1268},{"type":321,"tag":456,"props":1773,"children":1774},{"style":469},[1775],{"type":326,"value":742},{"type":321,"tag":456,"props":1777,"children":1778},{"style":734},[1779],{"type":326,"value":1277},{"type":321,"tag":456,"props":1781,"children":1782},{"style":469},[1783],{"type":326,"value":1282},{"type":321,"tag":456,"props":1785,"children":1786},{"style":463},[1787],{"type":326,"value":1287},{"type":321,"tag":456,"props":1789,"children":1790},{"style":469},[1791],{"type":326,"value":1292},{"type":321,"tag":456,"props":1793,"children":1794},{"class":458,"line":365},[1795,1799,1804,1808,1812,1816,1821],{"type":321,"tag":456,"props":1796,"children":1797},{"style":463},[1798],{"type":326,"value":1300},{"type":321,"tag":456,"props":1800,"children":1801},{"style":531},[1802],{"type":326,"value":1803}," subscriptions",{"type":321,"tag":456,"props":1805,"children":1806},{"style":463},[1807],{"type":326,"value":539},{"type":321,"tag":456,"props":1809,"children":1810},{"style":463},[1811],{"type":326,"value":775},{"type":321,"tag":456,"props":1813,"children":1814},{"style":469},[1815],{"type":326,"value":1317},{"type":321,"tag":456,"props":1817,"children":1818},{"style":547},[1819],{"type":326,"value":1820},"findSubscriptionsByCustomerId",{"type":321,"tag":456,"props":1822,"children":1823},{"style":469},[1824],{"type":326,"value":1825},"(req.body.customerId)\n",{"type":321,"tag":456,"props":1827,"children":1828},{"class":458,"line":507},[1829],{"type":321,"tag":456,"props":1830,"children":1831},{"emptyLinePlaceholder":511},[1832],{"type":326,"value":514},{"type":321,"tag":456,"props":1834,"children":1835},{"class":458,"line":517},[1836,1840,1844,1848],{"type":321,"tag":456,"props":1837,"children":1838},{"style":463},[1839],{"type":326,"value":1343},{"type":321,"tag":456,"props":1841,"children":1842},{"style":469},[1843],{"type":326,"value":843},{"type":321,"tag":456,"props":1845,"children":1846},{"style":463},[1847],{"type":326,"value":848},{"type":321,"tag":456,"props":1849,"children":1850},{"style":469},[1851],{"type":326,"value":1356},{"type":321,"tag":456,"props":1853,"children":1854},{"class":458,"line":558},[1855,1859,1864,1869,1873,1878,1883,1888,1892,1896],{"type":321,"tag":456,"props":1856,"children":1857},{"style":463},[1858],{"type":326,"value":1364},{"type":321,"tag":456,"props":1860,"children":1861},{"style":469},[1862],{"type":326,"value":1863}," (subscriptions.",{"type":321,"tag":456,"props":1865,"children":1866},{"style":547},[1867],{"type":326,"value":1868},"some",{"type":321,"tag":456,"props":1870,"children":1871},{"style":469},[1872],{"type":326,"value":731},{"type":321,"tag":456,"props":1874,"children":1875},{"style":734},[1876],{"type":326,"value":1877},"sub",{"type":321,"tag":456,"props":1879,"children":1880},{"style":463},[1881],{"type":326,"value":1882}," =>",{"type":321,"tag":456,"props":1884,"children":1885},{"style":469},[1886],{"type":326,"value":1887}," sub.duration.unit ",{"type":321,"tag":456,"props":1889,"children":1890},{"style":463},[1891],{"type":326,"value":872},{"type":321,"tag":456,"props":1893,"children":1894},{"style":480},[1895],{"type":326,"value":877},{"type":321,"tag":456,"props":1897,"children":1898},{"style":469},[1899],{"type":326,"value":1900},")) {\n",{"type":321,"tag":456,"props":1902,"children":1903},{"class":458,"line":567},[1904,1908,1912,1916,1920,1924,1928,1932],{"type":321,"tag":456,"props":1905,"children":1906},{"style":463},[1907],{"type":326,"value":1388},{"type":321,"tag":456,"props":1909,"children":1910},{"style":469},[1911],{"type":326,"value":1393},{"type":321,"tag":456,"props":1913,"children":1914},{"style":547},[1915],{"type":326,"value":1398},{"type":321,"tag":456,"props":1917,"children":1918},{"style":469},[1919],{"type":326,"value":731},{"type":321,"tag":456,"props":1921,"children":1922},{"style":531},[1923],{"type":326,"value":914},{"type":321,"tag":456,"props":1925,"children":1926},{"style":469},[1927],{"type":326,"value":1411},{"type":321,"tag":456,"props":1929,"children":1930},{"style":547},[1931],{"type":326,"value":1416},{"type":321,"tag":456,"props":1933,"children":1934},{"style":469},[1935],{"type":326,"value":555},{"type":321,"tag":456,"props":1937,"children":1938},{"class":458,"line":576},[1939,1943,1947],{"type":321,"tag":456,"props":1940,"children":1941},{"style":469},[1942],{"type":326,"value":1428},{"type":321,"tag":456,"props":1944,"children":1945},{"style":531},[1946],{"type":326,"value":914},{"type":321,"tag":456,"props":1948,"children":1949},{"style":469},[1950],{"type":326,"value":611},{"type":321,"tag":456,"props":1952,"children":1953},{"class":458,"line":586},[1954,1958],{"type":321,"tag":456,"props":1955,"children":1956},{"style":469},[1957],{"type":326,"value":1444},{"type":321,"tag":456,"props":1959,"children":1960},{"style":480},[1961],{"type":326,"value":1449},{"type":321,"tag":456,"props":1963,"children":1964},{"class":458,"line":595},[1965],{"type":321,"tag":456,"props":1966,"children":1967},{"style":469},[1968],{"type":326,"value":1457},{"type":321,"tag":456,"props":1970,"children":1971},{"class":458,"line":614},[1972],{"type":321,"tag":456,"props":1973,"children":1974},{"style":469},[1975],{"type":326,"value":1465},{"type":321,"tag":456,"props":1977,"children":1978},{"class":458,"line":628},[1979],{"type":321,"tag":456,"props":1980,"children":1981},{"style":469},[1982],{"type":326,"value":1473},{"type":321,"tag":456,"props":1984,"children":1985},{"class":458,"line":637},[1986],{"type":321,"tag":456,"props":1987,"children":1988},{"emptyLinePlaceholder":511},[1989],{"type":326,"value":514},{"type":321,"tag":456,"props":1991,"children":1992},{"class":458,"line":646},[1993,1997],{"type":321,"tag":456,"props":1994,"children":1995},{"style":463},[1996],{"type":326,"value":1488},{"type":321,"tag":456,"props":1998,"children":1999},{"style":469},[2000],{"type":326,"value":1493},{"type":321,"tag":456,"props":2002,"children":2003},{"class":458,"line":655},[2004,2008,2012],{"type":321,"tag":456,"props":2005,"children":2006},{"style":463},[2007],{"type":326,"value":1501},{"type":321,"tag":456,"props":2009,"children":2010},{"style":480},[2011],{"type":326,"value":1506},{"type":321,"tag":456,"props":2013,"children":2014},{"style":469},[2015],{"type":326,"value":1511},{"type":321,"tag":456,"props":2017,"children":2018},{"class":458,"line":672},[2019,2023,2027,2032],{"type":321,"tag":456,"props":2020,"children":2021},{"style":463},[2022],{"type":326,"value":1519},{"type":321,"tag":456,"props":2024,"children":2025},{"style":469},[2026],{"type":326,"value":1317},{"type":321,"tag":456,"props":2028,"children":2029},{"style":547},[2030],{"type":326,"value":2031},"pauseSubscriptions",{"type":321,"tag":456,"props":2033,"children":2034},{"style":469},[2035],{"type":326,"value":2036},"(subscriptions, {\n",{"type":321,"tag":456,"props":2038,"children":2039},{"class":458,"line":685},[2040],{"type":321,"tag":456,"props":2041,"children":2042},{"style":469},[2043],{"type":326,"value":1539},{"type":321,"tag":456,"props":2045,"children":2046},{"class":458,"line":693},[2047],{"type":321,"tag":456,"props":2048,"children":2049},{"style":469},[2050],{"type":326,"value":1457},{"type":321,"tag":456,"props":2052,"children":2053},{"class":458,"line":706},[2054],{"type":321,"tag":456,"props":2055,"children":2056},{"style":463},[2057],{"type":326,"value":1554},{"type":321,"tag":456,"props":2059,"children":2060},{"class":458,"line":715},[2061,2065,2069],{"type":321,"tag":456,"props":2062,"children":2063},{"style":463},[2064],{"type":326,"value":1501},{"type":321,"tag":456,"props":2066,"children":2067},{"style":480},[2068],{"type":326,"value":1566},{"type":321,"tag":456,"props":2070,"children":2071},{"style":469},[2072],{"type":326,"value":1511},{"type":321,"tag":456,"props":2074,"children":2075},{"class":458,"line":755},[2076,2080,2084,2089],{"type":321,"tag":456,"props":2077,"children":2078},{"style":463},[2079],{"type":326,"value":1519},{"type":321,"tag":456,"props":2081,"children":2082},{"style":469},[2083],{"type":326,"value":1317},{"type":321,"tag":456,"props":2085,"children":2086},{"style":547},[2087],{"type":326,"value":2088},"pauseSubscriptionsAtThePeriodEnd",{"type":321,"tag":456,"props":2090,"children":2091},{"style":469},[2092],{"type":326,"value":2036},{"type":321,"tag":456,"props":2094,"children":2095},{"class":458,"line":797},[2096],{"type":321,"tag":456,"props":2097,"children":2098},{"style":469},[2099],{"type":326,"value":1539},{"type":321,"tag":456,"props":2101,"children":2102},{"class":458,"line":806},[2103],{"type":321,"tag":456,"props":2104,"children":2105},{"style":469},[2106],{"type":326,"value":1457},{"type":321,"tag":456,"props":2108,"children":2109},{"class":458,"line":815},[2110],{"type":321,"tag":456,"props":2111,"children":2112},{"style":463},[2113],{"type":326,"value":1554},{"type":321,"tag":456,"props":2115,"children":2116},{"class":458,"line":824},[2117],{"type":321,"tag":456,"props":2118,"children":2119},{"style":469},[2120],{"type":326,"value":1473},{"type":321,"tag":456,"props":2122,"children":2123},{"class":458,"line":832},[2124],{"type":321,"tag":456,"props":2125,"children":2126},{"emptyLinePlaceholder":511},[2127],{"type":326,"value":514},{"type":321,"tag":456,"props":2129,"children":2130},{"class":458,"line":856},[2131,2135,2139],{"type":321,"tag":456,"props":2132,"children":2133},{"style":469},[2134],{"type":326,"value":1625},{"type":321,"tag":456,"props":2136,"children":2137},{"style":547},[2138],{"type":326,"value":1416},{"type":321,"tag":456,"props":2140,"children":2141},{"style":469},[2142],{"type":326,"value":1634},{"type":321,"tag":456,"props":2144,"children":2145},{"class":458,"line":884},[2146],{"type":321,"tag":456,"props":2147,"children":2148},{"style":469},[2149],{"type":326,"value":1642},{"type":321,"tag":356,"props":2151,"children":2152},{"id":354},[2153,2155],{"type":326,"value":2154},"Features ",{"type":321,"tag":329,"props":2156,"children":2158},{"label":2157,"color":395},"required",[],{"type":321,"tag":322,"props":2160,"children":2161},{},[2162,2164,2169],{"type":326,"value":2163},"Features define which behavior is supported for the ",{"type":321,"tag":341,"props":2165,"children":2167},{"className":2166},[],[2168],{"type":326,"value":346},{"type":326,"value":2170}," action. Depending on the features you enabled, requests body will have different options.",{"type":321,"tag":322,"props":2172,"children":2173},{},[2174,2176,2182,2184,2190,2192,2197,2199,2204,2206,2212,2214,2219],{"type":326,"value":2175},"For example, if you enable only ",{"type":321,"tag":341,"props":2177,"children":2179},{"className":2178},[],[2180],{"type":326,"value":2181},"end-of-period",{"type":326,"value":2183}," start date, the ",{"type":321,"tag":341,"props":2185,"children":2187},{"className":2186},[],[2188],{"type":326,"value":2189},"request.body.startAt",{"type":326,"value":2191}," will be always ",{"type":321,"tag":341,"props":2193,"children":2195},{"className":2194},[],[2196],{"type":326,"value":2181},{"type":326,"value":2198},". If you enable both start dates, ",{"type":321,"tag":341,"props":2200,"children":2202},{"className":2201},[],[2203],{"type":326,"value":2189},{"type":326,"value":2205}," can be either ",{"type":321,"tag":341,"props":2207,"children":2209},{"className":2208},[],[2210],{"type":326,"value":2211},"immediate",{"type":326,"value":2213}," or ",{"type":321,"tag":341,"props":2215,"children":2217},{"className":2216},[],[2218],{"type":326,"value":2181},{"type":326,"value":1213},{"type":321,"tag":1170,"props":2221,"children":2223},{"name":2222},"schema",[2224],{"type":321,"tag":1175,"props":2225,"children":2227},{"schema":2226},"/types/actions/pause/features.type.json",[],{"type":321,"tag":1170,"props":2229,"children":2230},{"name":1216},[2231],{"type":321,"tag":441,"props":2232,"children":2233},{},[2234],{"type":321,"tag":445,"props":2235,"children":2237},{"className":447,"code":2236,"filename":449,"language":450,"meta":314,"style":314},"export interface Features {\n  enabled: boolean\n  startDates: {\n    immediate: boolean\n    end_of_period: boolean\n  },\n  durations: {\n    period: boolean\n    date: boolean\n  },\n  allowAnnual: boolean\n}\n\nexport const features: Features = {\n  enabled: true,\n  startDates: {\n    immediate: true,\n    end_of_period: false // this start date will be disabled\n  },\n  durations: {\n      period: true,\n      date: false // this duration type will be disabled\n  },\n  allowAnnual: true\n}\n",[2238],{"type":321,"tag":341,"props":2239,"children":2240},{"__ignoreMap":314},[2241,2262,2280,2296,2312,2328,2336,2352,2368,2384,2391,2407,2415,2422,2454,2470,2478,2494,2512,2519,2527,2543,2560,2567,2579],{"type":321,"tag":456,"props":2242,"children":2243},{"class":458,"line":459},[2244,2248,2253,2258],{"type":321,"tag":456,"props":2245,"children":2246},{"style":463},[2247],{"type":326,"value":523},{"type":321,"tag":456,"props":2249,"children":2250},{"style":463},[2251],{"type":326,"value":2252}," interface",{"type":321,"tag":456,"props":2254,"children":2255},{"style":734},[2256],{"type":326,"value":2257}," Features",{"type":321,"tag":456,"props":2259,"children":2260},{"style":469},[2261],{"type":326,"value":1292},{"type":321,"tag":456,"props":2263,"children":2264},{"class":458,"line":365},[2265,2270,2275],{"type":321,"tag":456,"props":2266,"children":2267},{"style":734},[2268],{"type":326,"value":2269},"  enabled",{"type":321,"tag":456,"props":2271,"children":2272},{"style":463},[2273],{"type":326,"value":2274},":",{"type":321,"tag":456,"props":2276,"children":2277},{"style":531},[2278],{"type":326,"value":2279}," boolean\n",{"type":321,"tag":456,"props":2281,"children":2282},{"class":458,"line":507},[2283,2288,2292],{"type":321,"tag":456,"props":2284,"children":2285},{"style":734},[2286],{"type":326,"value":2287},"  startDates",{"type":321,"tag":456,"props":2289,"children":2290},{"style":463},[2291],{"type":326,"value":2274},{"type":321,"tag":456,"props":2293,"children":2294},{"style":469},[2295],{"type":326,"value":1292},{"type":321,"tag":456,"props":2297,"children":2298},{"class":458,"line":517},[2299,2304,2308],{"type":321,"tag":456,"props":2300,"children":2301},{"style":734},[2302],{"type":326,"value":2303},"    immediate",{"type":321,"tag":456,"props":2305,"children":2306},{"style":463},[2307],{"type":326,"value":2274},{"type":321,"tag":456,"props":2309,"children":2310},{"style":531},[2311],{"type":326,"value":2279},{"type":321,"tag":456,"props":2313,"children":2314},{"class":458,"line":558},[2315,2320,2324],{"type":321,"tag":456,"props":2316,"children":2317},{"style":734},[2318],{"type":326,"value":2319},"    end_of_period",{"type":321,"tag":456,"props":2321,"children":2322},{"style":463},[2323],{"type":326,"value":2274},{"type":321,"tag":456,"props":2325,"children":2326},{"style":531},[2327],{"type":326,"value":2279},{"type":321,"tag":456,"props":2329,"children":2330},{"class":458,"line":567},[2331],{"type":321,"tag":456,"props":2332,"children":2333},{"style":469},[2334],{"type":326,"value":2335},"  },\n",{"type":321,"tag":456,"props":2337,"children":2338},{"class":458,"line":576},[2339,2344,2348],{"type":321,"tag":456,"props":2340,"children":2341},{"style":734},[2342],{"type":326,"value":2343},"  durations",{"type":321,"tag":456,"props":2345,"children":2346},{"style":463},[2347],{"type":326,"value":2274},{"type":321,"tag":456,"props":2349,"children":2350},{"style":469},[2351],{"type":326,"value":1292},{"type":321,"tag":456,"props":2353,"children":2354},{"class":458,"line":586},[2355,2360,2364],{"type":321,"tag":456,"props":2356,"children":2357},{"style":734},[2358],{"type":326,"value":2359},"    period",{"type":321,"tag":456,"props":2361,"children":2362},{"style":463},[2363],{"type":326,"value":2274},{"type":321,"tag":456,"props":2365,"children":2366},{"style":531},[2367],{"type":326,"value":2279},{"type":321,"tag":456,"props":2369,"children":2370},{"class":458,"line":595},[2371,2376,2380],{"type":321,"tag":456,"props":2372,"children":2373},{"style":734},[2374],{"type":326,"value":2375},"    date",{"type":321,"tag":456,"props":2377,"children":2378},{"style":463},[2379],{"type":326,"value":2274},{"type":321,"tag":456,"props":2381,"children":2382},{"style":531},[2383],{"type":326,"value":2279},{"type":321,"tag":456,"props":2385,"children":2386},{"class":458,"line":614},[2387],{"type":321,"tag":456,"props":2388,"children":2389},{"style":469},[2390],{"type":326,"value":2335},{"type":321,"tag":456,"props":2392,"children":2393},{"class":458,"line":628},[2394,2399,2403],{"type":321,"tag":456,"props":2395,"children":2396},{"style":734},[2397],{"type":326,"value":2398},"  allowAnnual",{"type":321,"tag":456,"props":2400,"children":2401},{"style":463},[2402],{"type":326,"value":2274},{"type":321,"tag":456,"props":2404,"children":2405},{"style":531},[2406],{"type":326,"value":2279},{"type":321,"tag":456,"props":2408,"children":2409},{"class":458,"line":637},[2410],{"type":321,"tag":456,"props":2411,"children":2412},{"style":469},[2413],{"type":326,"value":2414},"}\n",{"type":321,"tag":456,"props":2416,"children":2417},{"class":458,"line":646},[2418],{"type":321,"tag":456,"props":2419,"children":2420},{"emptyLinePlaceholder":511},[2421],{"type":326,"value":514},{"type":321,"tag":456,"props":2423,"children":2424},{"class":458,"line":655},[2425,2429,2433,2438,2442,2446,2450],{"type":321,"tag":456,"props":2426,"children":2427},{"style":463},[2428],{"type":326,"value":523},{"type":321,"tag":456,"props":2430,"children":2431},{"style":463},[2432],{"type":326,"value":528},{"type":321,"tag":456,"props":2434,"children":2435},{"style":531},[2436],{"type":326,"value":2437}," features",{"type":321,"tag":456,"props":2439,"children":2440},{"style":463},[2441],{"type":326,"value":2274},{"type":321,"tag":456,"props":2443,"children":2444},{"style":734},[2445],{"type":326,"value":2257},{"type":321,"tag":456,"props":2447,"children":2448},{"style":463},[2449],{"type":326,"value":539},{"type":321,"tag":456,"props":2451,"children":2452},{"style":469},[2453],{"type":326,"value":1292},{"type":321,"tag":456,"props":2455,"children":2456},{"class":458,"line":672},[2457,2462,2466],{"type":321,"tag":456,"props":2458,"children":2459},{"style":469},[2460],{"type":326,"value":2461},"  enabled: ",{"type":321,"tag":456,"props":2463,"children":2464},{"style":531},[2465],{"type":326,"value":606},{"type":321,"tag":456,"props":2467,"children":2468},{"style":469},[2469],{"type":326,"value":611},{"type":321,"tag":456,"props":2471,"children":2472},{"class":458,"line":685},[2473],{"type":321,"tag":456,"props":2474,"children":2475},{"style":469},[2476],{"type":326,"value":2477},"  startDates: {\n",{"type":321,"tag":456,"props":2479,"children":2480},{"class":458,"line":693},[2481,2486,2490],{"type":321,"tag":456,"props":2482,"children":2483},{"style":469},[2484],{"type":326,"value":2485},"    immediate: ",{"type":321,"tag":456,"props":2487,"children":2488},{"style":531},[2489],{"type":326,"value":606},{"type":321,"tag":456,"props":2491,"children":2492},{"style":469},[2493],{"type":326,"value":611},{"type":321,"tag":456,"props":2495,"children":2496},{"class":458,"line":706},[2497,2502,2507],{"type":321,"tag":456,"props":2498,"children":2499},{"style":469},[2500],{"type":326,"value":2501},"    end_of_period: ",{"type":321,"tag":456,"props":2503,"children":2504},{"style":531},[2505],{"type":326,"value":2506},"false",{"type":321,"tag":456,"props":2508,"children":2509},{"style":580},[2510],{"type":326,"value":2511}," // this start date will be disabled\n",{"type":321,"tag":456,"props":2513,"children":2514},{"class":458,"line":715},[2515],{"type":321,"tag":456,"props":2516,"children":2517},{"style":469},[2518],{"type":326,"value":2335},{"type":321,"tag":456,"props":2520,"children":2521},{"class":458,"line":755},[2522],{"type":321,"tag":456,"props":2523,"children":2524},{"style":469},[2525],{"type":326,"value":2526},"  durations: {\n",{"type":321,"tag":456,"props":2528,"children":2529},{"class":458,"line":797},[2530,2535,2539],{"type":321,"tag":456,"props":2531,"children":2532},{"style":469},[2533],{"type":326,"value":2534},"      period: ",{"type":321,"tag":456,"props":2536,"children":2537},{"style":531},[2538],{"type":326,"value":606},{"type":321,"tag":456,"props":2540,"children":2541},{"style":469},[2542],{"type":326,"value":611},{"type":321,"tag":456,"props":2544,"children":2545},{"class":458,"line":806},[2546,2551,2555],{"type":321,"tag":456,"props":2547,"children":2548},{"style":469},[2549],{"type":326,"value":2550},"      date: ",{"type":321,"tag":456,"props":2552,"children":2553},{"style":531},[2554],{"type":326,"value":2506},{"type":321,"tag":456,"props":2556,"children":2557},{"style":580},[2558],{"type":326,"value":2559}," // this duration type will be disabled\n",{"type":321,"tag":456,"props":2561,"children":2562},{"class":458,"line":815},[2563],{"type":321,"tag":456,"props":2564,"children":2565},{"style":469},[2566],{"type":326,"value":2335},{"type":321,"tag":456,"props":2568,"children":2569},{"class":458,"line":824},[2570,2575],{"type":321,"tag":456,"props":2571,"children":2572},{"style":469},[2573],{"type":326,"value":2574},"  allowAnnual: ",{"type":321,"tag":456,"props":2576,"children":2577},{"style":531},[2578],{"type":326,"value":625},{"type":321,"tag":456,"props":2580,"children":2581},{"class":458,"line":832},[2582],{"type":321,"tag":456,"props":2583,"children":2584},{"style":469},[2585],{"type":326,"value":2414},{"type":321,"tag":2587,"props":2588,"children":2589},"style",{},[2590],{"type":326,"value":2591},"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":507,"depth":507,"links":2593},[2594,2595,2596,2600],{"id":358,"depth":365,"text":361},{"id":424,"depth":365,"text":427},{"id":1120,"depth":365,"text":1123,"children":2597},[2598,2599],{"id":1127,"depth":507,"text":1130},{"id":1645,"depth":507,"text":1648},{"id":354,"depth":365,"text":2154},"markdown","content:99.integrations:4.actions:2.pause.md","content","99.integrations/4.actions/2.pause.md","99.integrations/4.actions/2.pause","md",{"loc":311},[2609,2611],{"_path":400,"title":399,"description":2610},"Cancels a subscription at specific date.",{"_path":2612,"title":2613,"description":2614},"/integrations/actions/extend-trial","Extend Trial - Action","Extends a subscription trial period for a specific duration.",{"_path":2616,"_dir":2617,"_draft":313,"_partial":313,"_locale":314,"type":2618,"title":2619,"properties":2620,"_id":2638,"_type":2639,"_source":2603,"_file":2640,"_stem":2641,"_extension":2639},"/types/actions/pause/request.type","pause","object","Pause Request",{"customerId":2621,"subscriptionId":2624,"duration":2626,"startDate":2629,"allowAnnual":2635},{"type":2622,"severity":2157,"description":2623},"string","Unique identifier of the customer.",{"type":2622,"severity":2157,"description":2625},"Unique identifier of the subscription.",{"severity":2157,"description":2627,"ref":2628},"Duration of the pause","/types/duration.type.json",{"type":2630,"severity":2157,"description":2631,"values":2632},"enum","Defines when the pause should start, `duration` should be relative to this date.",[2633,2634],"'immediate'","'end-of-period'",{"type":2636,"severity":1651,"description":2637},"boolean","Indicates if the pause can be applied to annual subscriptions. Comes from your Churnkey Dashboard settings.","content:types:actions:pause:request.type.json","json","types/actions/pause/request.type.json","types/actions/pause/request.type",{"data":2643,"body":2644,"toc":2650},{"title":314,"description":2623},{"type":318,"children":2645},[2646],{"type":321,"tag":322,"props":2647,"children":2648},{},[2649],{"type":326,"value":2623},{"title":314,"searchDepth":365,"depth":365,"links":2651},[],{"data":2653,"body":2654,"toc":2660},{"title":314,"description":2625},{"type":318,"children":2655},[2656],{"type":321,"tag":322,"props":2657,"children":2658},{},[2659],{"type":326,"value":2625},{"title":314,"searchDepth":365,"depth":365,"links":2661},[],{"data":2663,"body":2665,"excerpt":-1,"toc":2682},{"title":314,"description":2664},"'immediate' 'end-of-period'",{"type":318,"children":2666},[2667],{"type":321,"tag":322,"props":2668,"children":2669},{},[2670,2675,2677],{"type":321,"tag":341,"props":2671,"children":2673},{"className":2672},[],[2674],{"type":326,"value":2633},{"type":326,"value":2676}," ",{"type":321,"tag":341,"props":2678,"children":2680},{"className":2679},[],[2681],{"type":326,"value":2634},{"title":314,"searchDepth":365,"depth":365,"links":2683},[],{"data":2685,"body":2687,"excerpt":-1,"toc":2702},{"title":314,"description":2686},"Defines when the pause should start, duration should be relative to this date.",{"type":318,"children":2688},[2689],{"type":321,"tag":322,"props":2690,"children":2691},{},[2692,2694,2700],{"type":326,"value":2693},"Defines when the pause should start, ",{"type":321,"tag":341,"props":2695,"children":2697},{"className":2696},[],[2698],{"type":326,"value":2699},"duration",{"type":326,"value":2701}," should be relative to this date.",{"title":314,"searchDepth":365,"depth":365,"links":2703},[],{"data":2705,"body":2706,"excerpt":-1,"toc":2712},{"title":314,"description":2637},{"type":318,"children":2707},[2708],{"type":321,"tag":322,"props":2709,"children":2710},{},[2711],{"type":326,"value":2637},{"title":314,"searchDepth":365,"depth":365,"links":2713},[],{"_path":2715,"_dir":2617,"_draft":313,"_partial":313,"_locale":314,"type":2618,"title":2619,"properties":2716,"_id":2722,"_type":2639,"_source":2603,"_file":2723,"_stem":2724,"_extension":2639},"/types/actions/pause/request-all.type",{"customerId":2717,"duration":2718,"startDate":2719,"allowAnnual":2721},{"type":2622,"severity":2157,"description":2623},{"severity":2157,"description":2627,"ref":2628},{"type":2630,"severity":2157,"description":2631,"values":2720},[2633,2634],{"type":2636,"severity":1651,"description":2637},"content:types:actions:pause:request-all.type.json","types/actions/pause/request-all.type.json","types/actions/pause/request-all.type",{"_path":2726,"_dir":2617,"_draft":313,"_partial":313,"_locale":314,"type":2618,"title":2727,"properties":2728,"_id":2747,"_type":2639,"_source":2603,"_file":2748,"_stem":2749,"_extension":2639},"/types/actions/pause/features.type","Pause Features",{"enabled":2729,"durations":2731,"startDates":2738,"allowAnnual":2745},{"type":2636,"severity":2157,"description":2730},"If true, the action is enabled and can be used by Churnkey, otherwise it is disabled.",{"type":2618,"severity":2157,"description":2732,"properties":2733},"Defines supported duration types for pause. At least one duration type should be enabled.",{"period":2734,"date":2736},{"type":2636,"severity":2157,"description":2735},"If your system supports pauses for a period of time (e.g. 1 month) set this to true",{"type":2636,"severity":2157,"description":2737},"If your system supports pauses until a specific date (e.g. 2021-12-31) set this to true",{"type":2618,"severity":2157,"description":2739,"properties":2740},"Defines supported start date types for pause. At least one start date type should be enabled.",{"immediate":2741,"end-of-period":2743},{"type":2636,"description":2742,"severity":2157},"If your system supports immediate pauses set this to true",{"type":2636,"description":2744,"severity":2157},"If your system supports pauses at the end of the subscription current period set this to true",{"type":2636,"description":2746,"severity":2157},"If your system supports pausing annual subscriptions, set this to true","content:types:actions:pause:features.type.json","types/actions/pause/features.type.json","types/actions/pause/features.type",{"data":2751,"body":2752,"excerpt":-1,"toc":2758},{"title":314,"description":2730},{"type":318,"children":2753},[2754],{"type":321,"tag":322,"props":2755,"children":2756},{},[2757],{"type":326,"value":2730},{"title":314,"searchDepth":365,"depth":365,"links":2759},[],{"data":2761,"body":2762,"excerpt":-1,"toc":2768},{"title":314,"description":2732},{"type":318,"children":2763},[2764],{"type":321,"tag":322,"props":2765,"children":2766},{},[2767],{"type":326,"value":2732},{"title":314,"searchDepth":365,"depth":365,"links":2769},[],{"data":2771,"body":2772,"excerpt":-1,"toc":2778},{"title":314,"description":2739},{"type":318,"children":2773},[2774],{"type":321,"tag":322,"props":2775,"children":2776},{},[2777],{"type":326,"value":2739},{"title":314,"searchDepth":365,"depth":365,"links":2779},[],{"data":2781,"body":2782,"excerpt":-1,"toc":2788},{"title":314,"description":2746},{"type":318,"children":2783},[2784],{"type":321,"tag":322,"props":2785,"children":2786},{},[2787],{"type":326,"value":2746},{"title":314,"searchDepth":365,"depth":365,"links":2789},[],{"_path":2791,"_dir":2792,"_draft":313,"_partial":313,"_locale":314,"type":2793,"title":2794,"oneOf":2795,"_id":2821,"_type":2639,"_source":2603,"_file":2822,"_stem":2823,"_extension":2639},"/types/duration.type","types","union","Duration",[2796,2812],{"type":2618,"title":2797,"description":2798,"properties":2799},"Period","Duration for a period of time",{"type":2800,"amount":2804,"unit":2807},{"type":2630,"description":2801,"values":2802},"Duration type",[2803],"'period'",{"type":2805,"severity":2157,"description":2806},"integer","Amount of `unit`. For example, if `unit` is `month`, then `amount` is the number of months.",{"type":2630,"severity":2157,"description":2808,"values":2809},"Duration unit.",[2810,2811],"'month'","'year'",{"type":2618,"title":2813,"description":2814,"properties":2815},"Date","Duration until a specific date",{"type":2816,"date":2819},{"type":2630,"description":2801,"values":2817},[2818],"'date'",{"type":2813,"severity":2157,"description":2820},"Duration until the specific date","content:types:duration.type.json","types/duration.type.json","types/duration.type",{"data":2825,"body":2826,"excerpt":-1,"toc":2832},{"title":314,"description":2627},{"type":318,"children":2827},[2828],{"type":321,"tag":322,"props":2829,"children":2830},{},[2831],{"type":326,"value":2627},{"title":314,"searchDepth":365,"depth":365,"links":2833},[],1775515594044]