[{"data":1,"prerenderedAt":3114},["ShallowReactive",2],{"navigation":3,"/cancel-flows/further-configuration":310,"/cancel-flows/further-configuration-surround":3111},[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":29,"_dir":311,"_draft":312,"_partial":312,"_locale":313,"title":28,"description":31,"body":314,"_type":3105,"_id":30,"_source":3106,"_file":3107,"_stem":3108,"_extension":3109,"sitemap":3110},"cancel-flows",false,"",{"type":315,"children":316,"toc":3086},"root",[317,804,811,825,862,868,897,919,955,961,981,986,1006,1026,1065,1077,1084,1089,1316,1369,1390,1410,1416,1421,1622,1675,1693,1711,1717,1738,1889,1895,1907,1919,1983,1989,2010,2018,2060,2067,2083,2088,2172,2177,2183,2200,2206,2221,2273,2360,2366,2376,2398,2466,2472,2501,2805,2811,2837,2918,2924,2937,3015,3021,3026,3080],{"type":318,"tag":319,"props":320,"children":324},"element","pre",{"className":321,"code":322,"language":323,"meta":313,"style":313},"language-jsx shiki shiki-themes github-light-default github-light-default github-dark-default","window.churnkey.init('show', {\n  customerId: 'billing_provider_cus_id',\n  subscriptionId: 'billing_provider_sub_id',\n  billingProvider: 'stripe', // or chargebee, braintree, paddle, paddling-billing\n  mode: 'live', // or 'test',\n  record: true, // session playback recording\n  preview: false, // disables any billing actions if true\n  report: true, // enable/disable including this sessions results in analytics dashboard\n  bypassDiscountAppliedScreen: false,\n  bypassPauseAppliedScreen: false,\n  customerAttributes: {\n    favoriteAnimal: 'penguin', // details below\n  },\n  i18n: {\n   lang: 'en',\n   messages: {\n     en: {\n       declineOffer: 'No thanks',\n       ...\n      },\n    }\n  },\n\n  // dynamic offers\n  dynamicOffers: {\n    discount: {\n      couponId: 'override-coupon-id',\n    },\n    planChange: {\n      planIds: ['price_abc', 'price_xyz'],\n    }\n  },\n\n  // handler callbacks\n  handlePause: \u003CPromise(customer, { pauseDuration: number})>,\n  handleCancel: \u003CPromise(customer, surveyResponse, freeformFeedback)>,\n  handleDiscount: \u003CPromise(customer, coupon)>,\n  handleTrialExtension: \u003CPromise(customer, { trialExtensionDays })>,\n  handlePlanChange: \u003CPromise(customer, { plan })>,\n  handleSupportRequest: \u003Cfunction(customer)>,\n  handleRedirect: \u003Cfunction(customer, { redirectLabel, redirectUrl })>,\n\n  // listener callbacks\n  onPause: \u003Cfunction(customer, { pauseDuration }>,\n  onCancel: \u003Cfunction(customer, surveyResponse)>,\n  onDiscount: \u003Cfunction(customer, coupon)>,\n  onTrialExtension: \u003Cfunction(customer, { trialExtensionDays })>,\n  onPlanChange: \u003Cfunction(customer, { planId })>,\n  onGoToAccount: \u003Cfunction(sessionResults)>,\n  onClose: \u003Cfunction(sessionResults)>,\n  onStepChange: \u003Cfunction(newStep, oldStep)>\n\n})\n","jsx",[325],{"type":318,"tag":326,"props":327,"children":328},"code",{"__ignoreMap":313},[329,341,350,359,368,377,386,395,404,413,422,431,440,449,458,467,476,485,494,503,512,521,529,539,548,557,566,575,584,593,602,610,618,626,635,644,653,662,671,680,689,698,706,715,724,733,742,751,760,769,778,787,795],{"type":318,"tag":330,"props":331,"children":334},"span",{"class":332,"line":333},"line",1,[335],{"type":318,"tag":330,"props":336,"children":337},{},[338],{"type":339,"value":340},"text","window.churnkey.init('show', {\n",{"type":318,"tag":330,"props":342,"children":344},{"class":332,"line":343},2,[345],{"type":318,"tag":330,"props":346,"children":347},{},[348],{"type":339,"value":349},"  customerId: 'billing_provider_cus_id',\n",{"type":318,"tag":330,"props":351,"children":353},{"class":332,"line":352},3,[354],{"type":318,"tag":330,"props":355,"children":356},{},[357],{"type":339,"value":358},"  subscriptionId: 'billing_provider_sub_id',\n",{"type":318,"tag":330,"props":360,"children":362},{"class":332,"line":361},4,[363],{"type":318,"tag":330,"props":364,"children":365},{},[366],{"type":339,"value":367},"  billingProvider: 'stripe', // or chargebee, braintree, paddle, paddling-billing\n",{"type":318,"tag":330,"props":369,"children":371},{"class":332,"line":370},5,[372],{"type":318,"tag":330,"props":373,"children":374},{},[375],{"type":339,"value":376},"  mode: 'live', // or 'test',\n",{"type":318,"tag":330,"props":378,"children":380},{"class":332,"line":379},6,[381],{"type":318,"tag":330,"props":382,"children":383},{},[384],{"type":339,"value":385},"  record: true, // session playback recording\n",{"type":318,"tag":330,"props":387,"children":389},{"class":332,"line":388},7,[390],{"type":318,"tag":330,"props":391,"children":392},{},[393],{"type":339,"value":394},"  preview: false, // disables any billing actions if true\n",{"type":318,"tag":330,"props":396,"children":398},{"class":332,"line":397},8,[399],{"type":318,"tag":330,"props":400,"children":401},{},[402],{"type":339,"value":403},"  report: true, // enable/disable including this sessions results in analytics dashboard\n",{"type":318,"tag":330,"props":405,"children":407},{"class":332,"line":406},9,[408],{"type":318,"tag":330,"props":409,"children":410},{},[411],{"type":339,"value":412},"  bypassDiscountAppliedScreen: false,\n",{"type":318,"tag":330,"props":414,"children":416},{"class":332,"line":415},10,[417],{"type":318,"tag":330,"props":418,"children":419},{},[420],{"type":339,"value":421},"  bypassPauseAppliedScreen: false,\n",{"type":318,"tag":330,"props":423,"children":425},{"class":332,"line":424},11,[426],{"type":318,"tag":330,"props":427,"children":428},{},[429],{"type":339,"value":430},"  customerAttributes: {\n",{"type":318,"tag":330,"props":432,"children":434},{"class":332,"line":433},12,[435],{"type":318,"tag":330,"props":436,"children":437},{},[438],{"type":339,"value":439},"    favoriteAnimal: 'penguin', // details below\n",{"type":318,"tag":330,"props":441,"children":443},{"class":332,"line":442},13,[444],{"type":318,"tag":330,"props":445,"children":446},{},[447],{"type":339,"value":448},"  },\n",{"type":318,"tag":330,"props":450,"children":452},{"class":332,"line":451},14,[453],{"type":318,"tag":330,"props":454,"children":455},{},[456],{"type":339,"value":457},"  i18n: {\n",{"type":318,"tag":330,"props":459,"children":461},{"class":332,"line":460},15,[462],{"type":318,"tag":330,"props":463,"children":464},{},[465],{"type":339,"value":466},"   lang: 'en',\n",{"type":318,"tag":330,"props":468,"children":470},{"class":332,"line":469},16,[471],{"type":318,"tag":330,"props":472,"children":473},{},[474],{"type":339,"value":475},"   messages: {\n",{"type":318,"tag":330,"props":477,"children":479},{"class":332,"line":478},17,[480],{"type":318,"tag":330,"props":481,"children":482},{},[483],{"type":339,"value":484},"     en: {\n",{"type":318,"tag":330,"props":486,"children":488},{"class":332,"line":487},18,[489],{"type":318,"tag":330,"props":490,"children":491},{},[492],{"type":339,"value":493},"       declineOffer: 'No thanks',\n",{"type":318,"tag":330,"props":495,"children":497},{"class":332,"line":496},19,[498],{"type":318,"tag":330,"props":499,"children":500},{},[501],{"type":339,"value":502},"       ...\n",{"type":318,"tag":330,"props":504,"children":506},{"class":332,"line":505},20,[507],{"type":318,"tag":330,"props":508,"children":509},{},[510],{"type":339,"value":511},"      },\n",{"type":318,"tag":330,"props":513,"children":515},{"class":332,"line":514},21,[516],{"type":318,"tag":330,"props":517,"children":518},{},[519],{"type":339,"value":520},"    }\n",{"type":318,"tag":330,"props":522,"children":524},{"class":332,"line":523},22,[525],{"type":318,"tag":330,"props":526,"children":527},{},[528],{"type":339,"value":448},{"type":318,"tag":330,"props":530,"children":532},{"class":332,"line":531},23,[533],{"type":318,"tag":330,"props":534,"children":536},{"emptyLinePlaceholder":535},true,[537],{"type":339,"value":538},"\n",{"type":318,"tag":330,"props":540,"children":542},{"class":332,"line":541},24,[543],{"type":318,"tag":330,"props":544,"children":545},{},[546],{"type":339,"value":547},"  // dynamic offers\n",{"type":318,"tag":330,"props":549,"children":551},{"class":332,"line":550},25,[552],{"type":318,"tag":330,"props":553,"children":554},{},[555],{"type":339,"value":556},"  dynamicOffers: {\n",{"type":318,"tag":330,"props":558,"children":560},{"class":332,"line":559},26,[561],{"type":318,"tag":330,"props":562,"children":563},{},[564],{"type":339,"value":565},"    discount: {\n",{"type":318,"tag":330,"props":567,"children":569},{"class":332,"line":568},27,[570],{"type":318,"tag":330,"props":571,"children":572},{},[573],{"type":339,"value":574},"      couponId: 'override-coupon-id',\n",{"type":318,"tag":330,"props":576,"children":578},{"class":332,"line":577},28,[579],{"type":318,"tag":330,"props":580,"children":581},{},[582],{"type":339,"value":583},"    },\n",{"type":318,"tag":330,"props":585,"children":587},{"class":332,"line":586},29,[588],{"type":318,"tag":330,"props":589,"children":590},{},[591],{"type":339,"value":592},"    planChange: {\n",{"type":318,"tag":330,"props":594,"children":596},{"class":332,"line":595},30,[597],{"type":318,"tag":330,"props":598,"children":599},{},[600],{"type":339,"value":601},"      planIds: ['price_abc', 'price_xyz'],\n",{"type":318,"tag":330,"props":603,"children":605},{"class":332,"line":604},31,[606],{"type":318,"tag":330,"props":607,"children":608},{},[609],{"type":339,"value":520},{"type":318,"tag":330,"props":611,"children":613},{"class":332,"line":612},32,[614],{"type":318,"tag":330,"props":615,"children":616},{},[617],{"type":339,"value":448},{"type":318,"tag":330,"props":619,"children":621},{"class":332,"line":620},33,[622],{"type":318,"tag":330,"props":623,"children":624},{"emptyLinePlaceholder":535},[625],{"type":339,"value":538},{"type":318,"tag":330,"props":627,"children":629},{"class":332,"line":628},34,[630],{"type":318,"tag":330,"props":631,"children":632},{},[633],{"type":339,"value":634},"  // handler callbacks\n",{"type":318,"tag":330,"props":636,"children":638},{"class":332,"line":637},35,[639],{"type":318,"tag":330,"props":640,"children":641},{},[642],{"type":339,"value":643},"  handlePause: \u003CPromise(customer, { pauseDuration: number})>,\n",{"type":318,"tag":330,"props":645,"children":647},{"class":332,"line":646},36,[648],{"type":318,"tag":330,"props":649,"children":650},{},[651],{"type":339,"value":652},"  handleCancel: \u003CPromise(customer, surveyResponse, freeformFeedback)>,\n",{"type":318,"tag":330,"props":654,"children":656},{"class":332,"line":655},37,[657],{"type":318,"tag":330,"props":658,"children":659},{},[660],{"type":339,"value":661},"  handleDiscount: \u003CPromise(customer, coupon)>,\n",{"type":318,"tag":330,"props":663,"children":665},{"class":332,"line":664},38,[666],{"type":318,"tag":330,"props":667,"children":668},{},[669],{"type":339,"value":670},"  handleTrialExtension: \u003CPromise(customer, { trialExtensionDays })>,\n",{"type":318,"tag":330,"props":672,"children":674},{"class":332,"line":673},39,[675],{"type":318,"tag":330,"props":676,"children":677},{},[678],{"type":339,"value":679},"  handlePlanChange: \u003CPromise(customer, { plan })>,\n",{"type":318,"tag":330,"props":681,"children":683},{"class":332,"line":682},40,[684],{"type":318,"tag":330,"props":685,"children":686},{},[687],{"type":339,"value":688},"  handleSupportRequest: \u003Cfunction(customer)>,\n",{"type":318,"tag":330,"props":690,"children":692},{"class":332,"line":691},41,[693],{"type":318,"tag":330,"props":694,"children":695},{},[696],{"type":339,"value":697},"  handleRedirect: \u003Cfunction(customer, { redirectLabel, redirectUrl })>,\n",{"type":318,"tag":330,"props":699,"children":701},{"class":332,"line":700},42,[702],{"type":318,"tag":330,"props":703,"children":704},{"emptyLinePlaceholder":535},[705],{"type":339,"value":538},{"type":318,"tag":330,"props":707,"children":709},{"class":332,"line":708},43,[710],{"type":318,"tag":330,"props":711,"children":712},{},[713],{"type":339,"value":714},"  // listener callbacks\n",{"type":318,"tag":330,"props":716,"children":718},{"class":332,"line":717},44,[719],{"type":318,"tag":330,"props":720,"children":721},{},[722],{"type":339,"value":723},"  onPause: \u003Cfunction(customer, { pauseDuration }>,\n",{"type":318,"tag":330,"props":725,"children":727},{"class":332,"line":726},45,[728],{"type":318,"tag":330,"props":729,"children":730},{},[731],{"type":339,"value":732},"  onCancel: \u003Cfunction(customer, surveyResponse)>,\n",{"type":318,"tag":330,"props":734,"children":736},{"class":332,"line":735},46,[737],{"type":318,"tag":330,"props":738,"children":739},{},[740],{"type":339,"value":741},"  onDiscount: \u003Cfunction(customer, coupon)>,\n",{"type":318,"tag":330,"props":743,"children":745},{"class":332,"line":744},47,[746],{"type":318,"tag":330,"props":747,"children":748},{},[749],{"type":339,"value":750},"  onTrialExtension: \u003Cfunction(customer, { trialExtensionDays })>,\n",{"type":318,"tag":330,"props":752,"children":754},{"class":332,"line":753},48,[755],{"type":318,"tag":330,"props":756,"children":757},{},[758],{"type":339,"value":759},"  onPlanChange: \u003Cfunction(customer, { planId })>,\n",{"type":318,"tag":330,"props":761,"children":763},{"class":332,"line":762},49,[764],{"type":318,"tag":330,"props":765,"children":766},{},[767],{"type":339,"value":768},"  onGoToAccount: \u003Cfunction(sessionResults)>,\n",{"type":318,"tag":330,"props":770,"children":772},{"class":332,"line":771},50,[773],{"type":318,"tag":330,"props":774,"children":775},{},[776],{"type":339,"value":777},"  onClose: \u003Cfunction(sessionResults)>,\n",{"type":318,"tag":330,"props":779,"children":781},{"class":332,"line":780},51,[782],{"type":318,"tag":330,"props":783,"children":784},{},[785],{"type":339,"value":786},"  onStepChange: \u003Cfunction(newStep, oldStep)>\n",{"type":318,"tag":330,"props":788,"children":790},{"class":332,"line":789},52,[791],{"type":318,"tag":330,"props":792,"children":793},{"emptyLinePlaceholder":535},[794],{"type":339,"value":538},{"type":318,"tag":330,"props":796,"children":798},{"class":332,"line":797},53,[799],{"type":318,"tag":330,"props":800,"children":801},{},[802],{"type":339,"value":803},"})\n",{"type":318,"tag":805,"props":806,"children":808},"h2",{"id":807},"enabledisable-session-recording",[809],{"type":339,"value":810},"Enable/Disable Session Recording",{"type":318,"tag":812,"props":813,"children":814},"p",{},[815,817,823],{"type":339,"value":816},"By default, session recording is enabled. You can turn off session recording by setting the ",{"type":318,"tag":326,"props":818,"children":820},{"className":819},[],[821],{"type":339,"value":822},"record",{"type":339,"value":824}," option to false in the initialization code (step 3).",{"type":318,"tag":319,"props":826,"children":828},{"className":321,"code":827,"language":323,"meta":313,"style":313},"window.churnkey.init('show', {\n  ...,\n  record: true\n})\n",[829],{"type":318,"tag":326,"props":830,"children":831},{"__ignoreMap":313},[832,839,847,855],{"type":318,"tag":330,"props":833,"children":834},{"class":332,"line":333},[835],{"type":318,"tag":330,"props":836,"children":837},{},[838],{"type":339,"value":340},{"type":318,"tag":330,"props":840,"children":841},{"class":332,"line":343},[842],{"type":318,"tag":330,"props":843,"children":844},{},[845],{"type":339,"value":846},"  ...,\n",{"type":318,"tag":330,"props":848,"children":849},{"class":332,"line":352},[850],{"type":318,"tag":330,"props":851,"children":852},{},[853],{"type":339,"value":854},"  record: true\n",{"type":318,"tag":330,"props":856,"children":857},{"class":332,"line":361},[858],{"type":318,"tag":330,"props":859,"children":860},{},[861],{"type":339,"value":803},{"type":318,"tag":805,"props":863,"children":865},{"id":864},"live-mode-vs-test-mode-vs-sandbox-mode",[866],{"type":339,"value":867},"Live Mode vs Test Mode vs Sandbox Mode",{"type":318,"tag":812,"props":869,"children":870},{},[871,873,879,881,887,889,895],{"type":339,"value":872},"Each mode corresponds to the billing provider (Stripe, Braintree, Chargebee, etc.) environment you're working in. When set to ",{"type":318,"tag":326,"props":874,"children":876},{"className":875},[],[877],{"type":339,"value":878},"live",{"type":339,"value":880}," mode, Churnkey will look for a customer matching ",{"type":318,"tag":326,"props":882,"children":884},{"className":883},[],[885],{"type":339,"value":886},"customerId",{"type":339,"value":888}," in your production environment, and changes made to that customer subscription will be applied in the production environment. If you're not ready for live data, you can set mode to ",{"type":318,"tag":326,"props":890,"children":892},{"className":891},[],[893],{"type":339,"value":894},"test",{"type":339,"value":896}," and Churnkey will work with the test environment of your billing provider.",{"type":318,"tag":812,"props":898,"children":899},{},[900,902,908,910,917],{"type":339,"value":901},"For Stripe users, a third option is available: ",{"type":318,"tag":326,"props":903,"children":905},{"className":904},[],[906],{"type":339,"value":907},"sandbox",{"type":339,"value":909}," mode connects to a completely separate Stripe sandbox account, providing full data isolation from both live and test environments. See the ",{"type":318,"tag":911,"props":912,"children":914},"a",{"href":913},"/billing-providers/stripe#v-stripe-sandbox-mode",[915],{"type":339,"value":916},"Stripe Sandbox Mode documentation",{"type":339,"value":918}," for details.",{"type":318,"tag":319,"props":920,"children":922},{"className":321,"code":921,"language":323,"meta":313,"style":313},"window.churnkey.init('show', {\n  ...,\n  mode: 'live' // 'live', 'test', or 'sandbox' (Stripe only)\n})\n",[923],{"type":318,"tag":326,"props":924,"children":925},{"__ignoreMap":313},[926,933,940,948],{"type":318,"tag":330,"props":927,"children":928},{"class":332,"line":333},[929],{"type":318,"tag":330,"props":930,"children":931},{},[932],{"type":339,"value":340},{"type":318,"tag":330,"props":934,"children":935},{"class":332,"line":343},[936],{"type":318,"tag":330,"props":937,"children":938},{},[939],{"type":339,"value":846},{"type":318,"tag":330,"props":941,"children":942},{"class":332,"line":352},[943],{"type":318,"tag":330,"props":944,"children":945},{},[946],{"type":339,"value":947},"  mode: 'live' // 'live', 'test', or 'sandbox' (Stripe only)\n",{"type":318,"tag":330,"props":949,"children":950},{"class":332,"line":361},[951],{"type":318,"tag":330,"props":952,"children":953},{},[954],{"type":339,"value":803},{"type":318,"tag":805,"props":956,"children":958},{"id":957},"customer-id-vs-subscription-id",[959],{"type":339,"value":960},"Customer ID vs Subscription ID",{"type":318,"tag":962,"props":963,"children":966},"alert",{"type":964,":icon":965},"warning","/icon/paddle-logo.webp",[967,976],{"type":318,"tag":812,"props":968,"children":969},{},[970],{"type":318,"tag":971,"props":972,"children":973},"strong",{},[974],{"type":339,"value":975},"Note for Paddle Users",{"type":318,"tag":812,"props":977,"children":978},{},[979],{"type":339,"value":980},"Pass in just the subscriptionId and we’ll take it from there.",{"type":318,"tag":812,"props":982,"children":983},{},[984],{"type":339,"value":985},"Churnkey connects to your billing provider so that we can take actions on your behalf to update customer subscriptions. In particular, based on the outcome of your Cancel Flow, Churnkey can:",{"type":318,"tag":987,"props":988,"children":989},"ol",{},[990,996,1001],{"type":318,"tag":991,"props":992,"children":993},"li",{},[994],{"type":339,"value":995},"Pause subscription(s)",{"type":318,"tag":991,"props":997,"children":998},{},[999],{"type":339,"value":1000},"Discount subscription(s)",{"type":318,"tag":991,"props":1002,"children":1003},{},[1004],{"type":339,"value":1005},"Cancel subscription(s)",{"type":318,"tag":812,"props":1007,"children":1008},{},[1009,1011,1016,1018,1024],{"type":339,"value":1010},"When initializing Churnkey, we recommend that, in addition to the ",{"type":318,"tag":326,"props":1012,"children":1014},{"className":1013},[],[1015],{"type":339,"value":886},{"type":339,"value":1017}," parameter, you pass in ",{"type":318,"tag":326,"props":1019,"children":1021},{"className":1020},[],[1022],{"type":339,"value":1023},"subscriptionId",{"type":339,"value":1025},". This approach is useful when customers have multiple subscriptions and you want precise control over exactly which subscription is being paused, discounted, or canceled. If you don't support multiple subscriptions and have no intention of doing so, the approach described in the next section might be appropriate.",{"type":318,"tag":812,"props":1027,"children":1028},{},[1029,1031,1036,1038,1047,1049,1057,1058,1063],{"type":339,"value":1030},"If you want Churnkey to make changes more broadly across the customer's entire billing record, you should omit the ",{"type":318,"tag":326,"props":1032,"children":1034},{"className":1033},[],[1035],{"type":339,"value":1023},{"type":339,"value":1037}," parameter ",{"type":318,"tag":971,"props":1039,"children":1040},{},[1041],{"type":318,"tag":1042,"props":1043,"children":1044},"em",{},[1045],{"type":339,"value":1046},"while still including the",{"type":339,"value":1048}," ",{"type":318,"tag":971,"props":1050,"children":1051},{},[1052],{"type":318,"tag":1042,"props":1053,"children":1054},{},[1055],{"type":339,"value":1056},"required",{"type":339,"value":1048},{"type":318,"tag":326,"props":1059,"children":1061},{"className":1060},[],[1062],{"type":339,"value":886},{"type":339,"value":1064}," parameter. This is useful when a customer has multiple plans and you want offers to apply to all current billing.",{"type":318,"tag":812,"props":1066,"children":1067},{},[1068,1070,1075],{"type":339,"value":1069},"When ",{"type":318,"tag":1042,"props":1071,"children":1072},{},[1073],{"type":339,"value":1074},"just a customer ID",{"type":339,"value":1076}," is used, Churnkey will apply billing changes at the customer level, when possible. If the changes cannot be made at the customer level (e.g. Stripe does not allow customer-level pauses), the action will be taken across every active subscription the customer has.",{"type":318,"tag":1078,"props":1079,"children":1081},"h3",{"id":1080},"billing-actions-using-just-customer-id",[1082],{"type":339,"value":1083},"Billing Actions using just Customer ID",{"type":318,"tag":812,"props":1085,"children":1086},{},[1087],{"type":339,"value":1088},"Below are the default actions that Churnkey will take on your behalf if you pass only a customer ID as a configuration option.",{"type":318,"tag":1090,"props":1091,"children":1092},"details",{},[1093,1095,1100,1102,1224,1226,1246,1247,1300,1301],{"type":339,"value":1094}," \n  ",{"type":318,"tag":1096,"props":1097,"children":1098},"summary",{},[1099],{"type":339,"value":246},{"type":339,"value":1101},"\n  ",{"type":318,"tag":1090,"props":1103,"children":1104},{},[1105,1107,1112],{"type":339,"value":1106}," \n    ",{"type":318,"tag":1096,"props":1108,"children":1109},{},[1110],{"type":339,"value":1111},"Cancel",{"type":318,"tag":987,"props":1113,"children":1114},{},[1115,1170],{"type":318,"tag":991,"props":1116,"children":1117},{},[1118,1123],{"type":318,"tag":971,"props":1119,"children":1120},{},[1121],{"type":339,"value":1122},"If not using subscription schedules:",{"type":318,"tag":1124,"props":1125,"children":1126},"ul",{},[1127,1158],{"type":318,"tag":991,"props":1128,"children":1129},{},[1130,1132,1138,1140,1148,1150,1156],{"type":339,"value":1131},"For active and trialing subscriptions, they are set to cancel at the end of the term via ",{"type":318,"tag":326,"props":1133,"children":1135},{"className":1134},[],[1136],{"type":339,"value":1137},"stripe.subscriptions.update(subscriptionId, { cancel_at_period_end: true })",{"type":339,"value":1139}," . If you have set subscriptions to cancel immediately in your ",{"type":318,"tag":911,"props":1141,"children":1145},{"href":1142,"rel":1143},"https://app.churnkey.co/cancellation/advanced-settings",[1144],"nofollow",[1146],{"type":339,"value":1147},"Cancel Flow settings",{"type":339,"value":1149},", subscriptions will cancel immediately via ",{"type":318,"tag":326,"props":1151,"children":1153},{"className":1152},[],[1154],{"type":339,"value":1155},"stripe.subscriptions.del",{"type":339,"value":1157}," .",{"type":318,"tag":991,"props":1159,"children":1160},{},[1161,1163,1168],{"type":339,"value":1162},"Inactive customer subscriptions are always canceled immediately via ",{"type":318,"tag":326,"props":1164,"children":1166},{"className":1165},[],[1167],{"type":339,"value":1155},{"type":339,"value":1169},".",{"type":318,"tag":991,"props":1171,"children":1172},{},[1173,1178],{"type":318,"tag":971,"props":1174,"children":1175},{},[1176],{"type":339,"value":1177},"If using subscription schedules",{"type":318,"tag":1124,"props":1179,"children":1180},{},[1181,1213],{"type":318,"tag":991,"props":1182,"children":1183},{},[1184,1186,1192,1194,1199,1200,1205,1207,1212],{"type":339,"value":1185},"For active and trialing subscriptions, the subscription schedule is first released via ",{"type":318,"tag":326,"props":1187,"children":1189},{"className":1188},[],[1190],{"type":339,"value":1191},"stripe.subscriptionSchedules.release",{"type":339,"value":1193}," , and then is set to cancel at the end of the term via ",{"type":318,"tag":326,"props":1195,"children":1197},{"className":1196},[],[1198],{"type":339,"value":1137},{"type":339,"value":1139},{"type":318,"tag":911,"props":1201,"children":1203},{"href":1142,"rel":1202},[1144],[1204],{"type":339,"value":1147},{"type":339,"value":1206},", subscriptions will be released from their schedule and then canceled immediately via ",{"type":318,"tag":326,"props":1208,"children":1210},{"className":1209},[],[1211],{"type":339,"value":1155},{"type":339,"value":1157},{"type":318,"tag":991,"props":1214,"children":1215},{},[1216,1218],{"type":339,"value":1217},"Inactive customer subscriptions are canceled immediately via ",{"type":318,"tag":326,"props":1219,"children":1221},{"className":1220},[],[1222],{"type":339,"value":1223},"stripe.subscriptionSchedules.cancel",{"type":339,"value":1225},"\n\n\n  ",{"type":318,"tag":1090,"props":1227,"children":1228},{},[1229,1230,1234,1245],{"type":339,"value":1106},{"type":318,"tag":1096,"props":1231,"children":1232},{},[1233],{"type":339,"value":135},{"type":318,"tag":812,"props":1235,"children":1236},{},[1237,1239],{"type":339,"value":1238},"The coupon is applied directly to the Stripe customer via ",{"type":318,"tag":326,"props":1240,"children":1242},{"className":1241},[],[1243],{"type":339,"value":1244},"stripe.customers.update",{"type":339,"value":1101},{"type":339,"value":1101},{"type":318,"tag":1090,"props":1248,"children":1249},{},[1250,1251,1256,1298],{"type":339,"value":1106},{"type":318,"tag":1096,"props":1252,"children":1253},{},[1254],{"type":339,"value":1255},"Pause",{"type":318,"tag":812,"props":1257,"children":1258},{},[1259,1261,1268,1270,1276,1278,1284,1288,1290,1296],{"type":339,"value":1260},"Stripe does not allow a pause to be applied to the customer. Instead each active subscription is set to pause. Churnkey uses ",{"type":318,"tag":911,"props":1262,"children":1265},{"href":1263,"rel":1264},"https://stripe.com/docs/billing/subscriptions/pause",[1144],[1266],{"type":339,"value":1267},"Stripe's built-in pause feature",{"type":339,"value":1269}," which will update the subscription's ",{"type":318,"tag":326,"props":1271,"children":1273},{"className":1272},[],[1274],{"type":339,"value":1275},"pause_collection[behavior]",{"type":339,"value":1277}," to ",{"type":318,"tag":326,"props":1279,"children":1281},{"className":1280},[],[1282],{"type":339,"value":1283},"mark_uncollectible",{"type":318,"tag":971,"props":1285,"children":1286},{},[1287],{"type":339,"value":1169},{"type":339,"value":1289}," The ",{"type":318,"tag":326,"props":1291,"children":1293},{"className":1292},[],[1294],{"type":339,"value":1295},"resumes_at",{"type":339,"value":1297}," field will automatically be set by Churnkey depending on the length of the pause selected.",{"type":339,"value":1299},"\n ",{"type":339,"value":1101},{"type":318,"tag":1090,"props":1302,"children":1303},{},[1304,1305,1310,1315],{"type":339,"value":1106},{"type":318,"tag":1096,"props":1306,"children":1307},{},[1308],{"type":339,"value":1309},"Plan change",{"type":318,"tag":812,"props":1311,"children":1312},{},[1313],{"type":339,"value":1314},"If you are using plan changes, please make sure to pass a subscription ID in addition to a customer ID.",{"type":339,"value":1101},{"type":318,"tag":1090,"props":1317,"children":1318},{},[1319,1320,1324,1325,1339,1340,1354,1355],{"type":339,"value":1094},{"type":318,"tag":1096,"props":1321,"children":1322},{},[1323],{"type":339,"value":266},{"type":339,"value":1101},{"type":318,"tag":1090,"props":1326,"children":1327},{},[1328,1329,1333,1338],{"type":339,"value":1106},{"type":318,"tag":1096,"props":1330,"children":1331},{},[1332],{"type":339,"value":1111},{"type":318,"tag":812,"props":1334,"children":1335},{},[1336],{"type":339,"value":1337},"Every customer subscription is set to cancel at the end of the subscription’s billing month",{"type":339,"value":1101},{"type":339,"value":1101},{"type":318,"tag":1090,"props":1341,"children":1342},{},[1343,1344,1348,1353],{"type":339,"value":1106},{"type":318,"tag":1096,"props":1345,"children":1346},{},[1347],{"type":339,"value":135},{"type":318,"tag":812,"props":1349,"children":1350},{},[1351],{"type":339,"value":1352},"The discount is applied to all customer subscriptions.",{"type":339,"value":1101},{"type":339,"value":1101},{"type":318,"tag":1090,"props":1356,"children":1357},{},[1358,1359,1363,1368],{"type":339,"value":1106},{"type":318,"tag":1096,"props":1360,"children":1361},{},[1362],{"type":339,"value":1255},{"type":318,"tag":812,"props":1364,"children":1365},{},[1366],{"type":339,"value":1367},"A 100% discount is applied to all customer subscriptions for the selected duration.",{"type":339,"value":1101},{"type":318,"tag":1090,"props":1370,"children":1371},{},[1372,1373,1377],{"type":339,"value":1094},{"type":318,"tag":1096,"props":1374,"children":1375},{},[1376],{"type":339,"value":251},{"type":318,"tag":812,"props":1378,"children":1379},{},[1380],{"type":318,"tag":911,"props":1381,"children":1382},{"href":252},[1383,1388],{"type":318,"tag":1384,"props":1385,"children":1387},"img",{"alt":251,"src":1386},"/icon/chargebee.svg",[],{"type":339,"value":1389}," Chargebee",{"type":318,"tag":1090,"props":1391,"children":1392},{},[1393,1394,1399],{"type":339,"value":1094},{"type":318,"tag":1096,"props":1395,"children":1396},{},[1397],{"type":339,"value":1398},"Paddle",{"type":318,"tag":812,"props":1400,"children":1401},{},[1402],{"type":318,"tag":911,"props":1403,"children":1404},{"href":257},[1405,1408],{"type":318,"tag":1384,"props":1406,"children":1407},{"alt":256,"src":965},[],{"type":339,"value":1409}," Paddle Classic",{"type":318,"tag":1078,"props":1411,"children":1413},{"id":1412},"billing-actions-using-customer-id-subscription-id",[1414],{"type":339,"value":1415},"Billing Actions using Customer ID + Subscription ID",{"type":318,"tag":812,"props":1417,"children":1418},{},[1419],{"type":339,"value":1420},"Below are the default actions that Churnkey will take on your behalf if you pass both a customer ID and subscription ID as configuration options.",{"type":318,"tag":1090,"props":1422,"children":1423},{},[1424,1425,1429,1430,1531,1551,1552,1591,1592],{"type":339,"value":1101},{"type":318,"tag":1096,"props":1426,"children":1427},{},[1428],{"type":339,"value":246},{"type":339,"value":1101},{"type":318,"tag":1090,"props":1431,"children":1432},{},[1433,1435,1439,1446,1482,1490],{"type":339,"value":1434},"\n    ",{"type":318,"tag":1096,"props":1436,"children":1437},{},[1438],{"type":339,"value":1111},{"type":318,"tag":812,"props":1440,"children":1441},{},[1442],{"type":318,"tag":971,"props":1443,"children":1444},{},[1445],{"type":339,"value":1122},{"type":318,"tag":1124,"props":1447,"children":1448},{},[1449,1472],{"type":318,"tag":991,"props":1450,"children":1451},{},[1452,1453,1458,1460,1465,1466,1471],{"type":339,"value":1131},{"type":318,"tag":326,"props":1454,"children":1456},{"className":1455},[],[1457],{"type":339,"value":1137},{"type":339,"value":1459},". If you have set subscriptions to cancel immediately in your ",{"type":318,"tag":911,"props":1461,"children":1463},{"href":1142,"rel":1462},[1144],[1464],{"type":339,"value":1147},{"type":339,"value":1149},{"type":318,"tag":326,"props":1467,"children":1469},{"className":1468},[],[1470],{"type":339,"value":1155},{"type":339,"value":1169},{"type":318,"tag":991,"props":1473,"children":1474},{},[1475,1476,1481],{"type":339,"value":1162},{"type":318,"tag":326,"props":1477,"children":1479},{"className":1478},[],[1480],{"type":339,"value":1155},{"type":339,"value":1169},{"type":318,"tag":812,"props":1483,"children":1484},{},[1485],{"type":318,"tag":971,"props":1486,"children":1487},{},[1488],{"type":339,"value":1489},"If using subscription schedules:",{"type":318,"tag":1124,"props":1491,"children":1492},{},[1493,1522],{"type":318,"tag":991,"props":1494,"children":1495},{},[1496,1497,1502,1504,1509,1510,1515,1516,1521],{"type":339,"value":1185},{"type":318,"tag":326,"props":1498,"children":1500},{"className":1499},[],[1501],{"type":339,"value":1191},{"type":339,"value":1503},", and then is set to cancel at the end of the term via ",{"type":318,"tag":326,"props":1505,"children":1507},{"className":1506},[],[1508],{"type":339,"value":1137},{"type":339,"value":1459},{"type":318,"tag":911,"props":1511,"children":1513},{"href":1142,"rel":1512},[1144],[1514],{"type":339,"value":1147},{"type":339,"value":1206},{"type":318,"tag":326,"props":1517,"children":1519},{"className":1518},[],[1520],{"type":339,"value":1155},{"type":339,"value":1169},{"type":318,"tag":991,"props":1523,"children":1524},{},[1525,1526],{"type":339,"value":1217},{"type":318,"tag":326,"props":1527,"children":1529},{"className":1528},[],[1530],{"type":339,"value":1223},{"type":318,"tag":1090,"props":1532,"children":1533},{},[1534,1535,1539,1550],{"type":339,"value":1101},{"type":318,"tag":1096,"props":1536,"children":1537},{},[1538],{"type":339,"value":135},{"type":318,"tag":812,"props":1540,"children":1541},{},[1542,1544],{"type":339,"value":1543},"The coupon is applied to the specified subscription via ",{"type":318,"tag":326,"props":1545,"children":1547},{"className":1546},[],[1548],{"type":339,"value":1549},"stripe.subscriptions.update",{"type":339,"value":1101},{"type":339,"value":1101},{"type":318,"tag":1090,"props":1553,"children":1554},{},[1555,1556,1560,1590],{"type":339,"value":1434},{"type":318,"tag":1096,"props":1557,"children":1558},{},[1559],{"type":339,"value":1255},{"type":318,"tag":812,"props":1561,"children":1562},{},[1563,1565,1570,1571,1576,1577,1582,1584,1589],{"type":339,"value":1564},"The specified subscription is set to pause. Churnkey uses ",{"type":318,"tag":911,"props":1566,"children":1568},{"href":1263,"rel":1567},[1144],[1569],{"type":339,"value":1267},{"type":339,"value":1269},{"type":318,"tag":326,"props":1572,"children":1574},{"className":1573},[],[1575],{"type":339,"value":1275},{"type":339,"value":1277},{"type":318,"tag":326,"props":1578,"children":1580},{"className":1579},[],[1581],{"type":339,"value":1283},{"type":339,"value":1583},". The ",{"type":318,"tag":326,"props":1585,"children":1587},{"className":1586},[],[1588],{"type":339,"value":1295},{"type":339,"value":1297},{"type":339,"value":1101},{"type":339,"value":1101},{"type":318,"tag":1090,"props":1593,"children":1594},{},[1595,1596,1601,1621],{"type":339,"value":1434},{"type":318,"tag":1096,"props":1597,"children":1598},{},[1599],{"type":339,"value":1600},"Plan Change",{"type":318,"tag":812,"props":1602,"children":1603},{},[1604,1606,1611,1613,1620],{"type":339,"value":1605},"The specific subscription is updated to the new plan via ",{"type":318,"tag":326,"props":1607,"children":1609},{"className":1608},[],[1610],{"type":339,"value":1549},{"type":339,"value":1612},". You can optionally set to ",{"type":318,"tag":911,"props":1614,"children":1617},{"href":1615,"rel":1616},"https://stripe.com/docs/billing/subscriptions/prorations",[1144],[1618],{"type":339,"value":1619},"not prorate changes",{"type":339,"value":1169},{"type":339,"value":1101},{"type":318,"tag":1090,"props":1623,"children":1624},{},[1625,1626,1630,1631,1645,1646,1660,1661],{"type":339,"value":1101},{"type":318,"tag":1096,"props":1627,"children":1628},{},[1629],{"type":339,"value":266},{"type":339,"value":1101},{"type":318,"tag":1090,"props":1632,"children":1633},{},[1634,1635,1639,1644],{"type":339,"value":1434},{"type":318,"tag":1096,"props":1636,"children":1637},{},[1638],{"type":339,"value":1111},{"type":318,"tag":812,"props":1640,"children":1641},{},[1642],{"type":339,"value":1643},"The specified subscription is set to cancel at the end of the billing month.",{"type":339,"value":1101},{"type":339,"value":1101},{"type":318,"tag":1090,"props":1647,"children":1648},{},[1649,1650,1654,1659],{"type":339,"value":1434},{"type":318,"tag":1096,"props":1651,"children":1652},{},[1653],{"type":339,"value":135},{"type":318,"tag":812,"props":1655,"children":1656},{},[1657],{"type":339,"value":1658},"The discount is applied to the specified subscription.",{"type":339,"value":1101},{"type":339,"value":1101},{"type":318,"tag":1090,"props":1662,"children":1663},{},[1664,1665,1669,1674],{"type":339,"value":1434},{"type":318,"tag":1096,"props":1666,"children":1667},{},[1668],{"type":339,"value":1255},{"type":318,"tag":812,"props":1670,"children":1671},{},[1672],{"type":339,"value":1673},"A 100% discount is applied to the subscription for the selected duration.",{"type":339,"value":1101},{"type":318,"tag":1090,"props":1676,"children":1677},{},[1678,1679,1683],{"type":339,"value":1101},{"type":318,"tag":1096,"props":1680,"children":1681},{},[1682],{"type":339,"value":251},{"type":318,"tag":812,"props":1684,"children":1685},{},[1686],{"type":318,"tag":911,"props":1687,"children":1688},{"href":252},[1689,1692],{"type":318,"tag":1384,"props":1690,"children":1691},{"alt":251,"src":1386},[],{"type":339,"value":1389},{"type":318,"tag":1090,"props":1694,"children":1695},{},[1696,1697,1701],{"type":339,"value":1101},{"type":318,"tag":1096,"props":1698,"children":1699},{},[1700],{"type":339,"value":1398},{"type":318,"tag":812,"props":1702,"children":1703},{},[1704],{"type":318,"tag":911,"props":1705,"children":1706},{"href":257},[1707,1710],{"type":318,"tag":1384,"props":1708,"children":1709},{"alt":256,"src":965},[],{"type":339,"value":1409},{"type":318,"tag":805,"props":1712,"children":1714},{"id":1713},"custom-attributes",[1715],{"type":339,"value":1716},"Custom Attributes",{"type":318,"tag":812,"props":1718,"children":1719},{},[1720,1722,1728,1730,1737],{"type":339,"value":1721},"When initializing the Cancel Flow, you can pass in ",{"type":318,"tag":326,"props":1723,"children":1725},{"className":1724},[],[1726],{"type":339,"value":1727},"customerAttributes",{"type":339,"value":1729}," which can be used for ",{"type":318,"tag":911,"props":1731,"children":1734},{"href":1732,"rel":1733},"https://churnkey.co/feature/customer-segmentation",[1144],[1735],{"type":339,"value":1736},"customer segmentation",{"type":339,"value":1169},{"type":318,"tag":987,"props":1739,"children":1740},{},[1741,1769,1796],{"type":318,"tag":991,"props":1742,"children":1743},{},[1744,1746,1753],{"type":339,"value":1745},"Define a new custom attribute in the \"Advanced Settings\" tab of the ",{"type":318,"tag":911,"props":1747,"children":1750},{"href":1748,"rel":1749},"https://app.churnkey.co/flows/settings",[1144],[1751],{"type":339,"value":1752},"Cancel Flows Builder page",{"type":318,"tag":987,"props":1754,"children":1755},{},[1756],{"type":318,"tag":991,"props":1757,"children":1758},{},[1759,1761,1767],{"type":339,"value":1760},"Example: ",{"type":318,"tag":326,"props":1762,"children":1764},{"className":1763},[],[1765],{"type":339,"value":1766},"videosCreated",{"type":339,"value":1768},", which will represent the total number of videos a customer has created on our example platform",{"type":318,"tag":991,"props":1770,"children":1771},{},[1772,1774,1779,1781],{"type":339,"value":1773},"Use this custom attribute to create a new audience of a ",{"type":318,"tag":971,"props":1775,"children":1776},{},[1777],{"type":339,"value":1778},"segmented",{"type":339,"value":1780}," Cancel Flow",{"type":318,"tag":987,"props":1782,"children":1783},{},[1784],{"type":318,"tag":991,"props":1785,"children":1786},{},[1787,1789,1794],{"type":339,"value":1788},"Example: create a segment which targets customers where ",{"type":318,"tag":326,"props":1790,"children":1792},{"className":1791},[],[1793],{"type":339,"value":1766},{"type":339,"value":1795}," is more than 20. Tailor the copy to acknowledge that these customers have been power users and offer more generous temporary discounts",{"type":318,"tag":991,"props":1797,"children":1798},{},[1799,1801,1806,1808,1813,1815,1821],{"type":339,"value":1800},"Pass in ",{"type":318,"tag":326,"props":1802,"children":1804},{"className":1803},[],[1805],{"type":339,"value":1766},{"type":339,"value":1807}," under ",{"type":318,"tag":326,"props":1809,"children":1811},{"className":1810},[],[1812],{"type":339,"value":1727},{"type":339,"value":1814}," when calling ",{"type":318,"tag":326,"props":1816,"children":1818},{"className":1817},[],[1819],{"type":339,"value":1820},"window.churnkey.init()",{"type":318,"tag":319,"props":1822,"children":1824},{"className":321,"code":1823,"language":323,"meta":313,"style":313},"window.churnkey.init('show', {\n  customerId: 'CUSTOMER_ID', // required\n  authHash: 'HMAC_HASH', // required\n  appId: 'YOUR_APP_ID', // required\n  customerAttributes: {\n    videosCreated: 28, // data about the customer you provide\n  },\n});\n",[1825],{"type":318,"tag":326,"props":1826,"children":1827},{"__ignoreMap":313},[1828,1835,1843,1851,1859,1866,1874,1881],{"type":318,"tag":330,"props":1829,"children":1830},{"class":332,"line":333},[1831],{"type":318,"tag":330,"props":1832,"children":1833},{},[1834],{"type":339,"value":340},{"type":318,"tag":330,"props":1836,"children":1837},{"class":332,"line":343},[1838],{"type":318,"tag":330,"props":1839,"children":1840},{},[1841],{"type":339,"value":1842},"  customerId: 'CUSTOMER_ID', // required\n",{"type":318,"tag":330,"props":1844,"children":1845},{"class":332,"line":352},[1846],{"type":318,"tag":330,"props":1847,"children":1848},{},[1849],{"type":339,"value":1850},"  authHash: 'HMAC_HASH', // required\n",{"type":318,"tag":330,"props":1852,"children":1853},{"class":332,"line":361},[1854],{"type":318,"tag":330,"props":1855,"children":1856},{},[1857],{"type":339,"value":1858},"  appId: 'YOUR_APP_ID', // required\n",{"type":318,"tag":330,"props":1860,"children":1861},{"class":332,"line":370},[1862],{"type":318,"tag":330,"props":1863,"children":1864},{},[1865],{"type":339,"value":430},{"type":318,"tag":330,"props":1867,"children":1868},{"class":332,"line":379},[1869],{"type":318,"tag":330,"props":1870,"children":1871},{},[1872],{"type":339,"value":1873},"    videosCreated: 28, // data about the customer you provide\n",{"type":318,"tag":330,"props":1875,"children":1876},{"class":332,"line":388},[1877],{"type":318,"tag":330,"props":1878,"children":1879},{},[1880],{"type":339,"value":448},{"type":318,"tag":330,"props":1882,"children":1883},{"class":332,"line":397},[1884],{"type":318,"tag":330,"props":1885,"children":1886},{},[1887],{"type":339,"value":1888},"});\n",{"type":318,"tag":805,"props":1890,"children":1892},{"id":1891},"customer-segmentation-by-metadata",[1893],{"type":339,"value":1894},"Customer Segmentation by Metadata",{"type":318,"tag":812,"props":1896,"children":1897},{},[1898,1900,1905],{"type":339,"value":1899},"You can leverage your existing customer and subscription metadata for ",{"type":318,"tag":911,"props":1901,"children":1903},{"href":1732,"rel":1902},[1144],[1904],{"type":339,"value":1736},{"type":339,"value":1906}," purposes.",{"type":318,"tag":812,"props":1908,"children":1909},{},[1910,1912,1917],{"type":339,"value":1911},"Suppose you have a ",{"type":318,"tag":326,"props":1913,"children":1915},{"className":1914},[],[1916],{"type":339,"value":1766},{"type":339,"value":1918}," metadata field already set for all your customers.",{"type":318,"tag":987,"props":1920,"children":1921},{},[1922,1948,1971],{"type":318,"tag":991,"props":1923,"children":1924},{},[1925,1927,1932,1934],{"type":339,"value":1926},"Set up a new custom attribute in the \"Flow Settings\" tab of the ",{"type":318,"tag":911,"props":1928,"children":1930},{"href":1748,"rel":1929},[1144],[1931],{"type":339,"value":1752},{"type":339,"value":1933},". Here you are letting us know what fields you are using in your metadata: their names and the type of data they contain.\n",{"type":318,"tag":987,"props":1935,"children":1936},{},[1937],{"type":318,"tag":991,"props":1938,"children":1939},{},[1940,1941,1946],{"type":339,"value":1760},{"type":318,"tag":326,"props":1942,"children":1944},{"className":1943},[],[1945],{"type":339,"value":1766},{"type":339,"value":1947},", which will represent the total number of videos a customer has created on our example platform.",{"type":318,"tag":991,"props":1949,"children":1950},{},[1951,1952,1956,1958],{"type":339,"value":1773},{"type":318,"tag":971,"props":1953,"children":1954},{},[1955],{"type":339,"value":1778},{"type":339,"value":1957}," Cancel Flow.\n",{"type":318,"tag":987,"props":1959,"children":1960},{},[1961],{"type":318,"tag":991,"props":1962,"children":1963},{},[1964,1965,1970],{"type":339,"value":1788},{"type":318,"tag":326,"props":1966,"children":1968},{"className":1967},[],[1969],{"type":339,"value":1766},{"type":339,"value":1795},{"type":318,"tag":991,"props":1972,"children":1973},{},[1974,1976,1981],{"type":339,"value":1975},"All done! Whenever an end-customer opens the Embed, we will look up the field ",{"type":318,"tag":326,"props":1977,"children":1979},{"className":1978},[],[1980],{"type":339,"value":1766},{"type":339,"value":1982}," in their customer metadata and subscription metadata. If we find it, we will use that value to evaluate your segment conditions.",{"type":318,"tag":805,"props":1984,"children":1986},{"id":1985},"bypass-offer-accepted-screen",[1987],{"type":339,"value":1988},"Bypass Offer Accepted Screen",{"type":318,"tag":812,"props":1990,"children":1991},{},[1992,1994,2000,2002,2008],{"type":339,"value":1993},"If a previously discount or pause offer is still in effect, we will message this to the customer. This pattern is designed to remind the customer of the offer and maximize retention. However, you can disable this check using our ",{"type":318,"tag":326,"props":1995,"children":1997},{"className":1996},[],[1998],{"type":339,"value":1999},"bypassDiscountAppliedScreen",{"type":339,"value":2001}," and ",{"type":318,"tag":326,"props":2003,"children":2005},{"className":2004},[],[2006],{"type":339,"value":2007},"bypassPauseAppliedScreen",{"type":339,"value":2009}," configuration parameters.",{"type":318,"tag":812,"props":2011,"children":2012},{},[2013],{"type":318,"tag":1384,"props":2014,"children":2017},{"alt":2015,"src":2016},"Bypass offer accepted screen","/img/bypass-offer-accepted-screen.jpg",[],{"type":318,"tag":319,"props":2019,"children":2021},{"className":321,"code":2020,"language":323,"meta":313,"style":313},"window.churnkey.init('show', {\n  ...,\n  bypassDiscountAppliedScreen: false,\n  bypassPauseAppliedScreen: false,\n})\n",[2022],{"type":318,"tag":326,"props":2023,"children":2024},{"__ignoreMap":313},[2025,2032,2039,2046,2053],{"type":318,"tag":330,"props":2026,"children":2027},{"class":332,"line":333},[2028],{"type":318,"tag":330,"props":2029,"children":2030},{},[2031],{"type":339,"value":340},{"type":318,"tag":330,"props":2033,"children":2034},{"class":332,"line":343},[2035],{"type":318,"tag":330,"props":2036,"children":2037},{},[2038],{"type":339,"value":846},{"type":318,"tag":330,"props":2040,"children":2041},{"class":332,"line":352},[2042],{"type":318,"tag":330,"props":2043,"children":2044},{},[2045],{"type":339,"value":412},{"type":318,"tag":330,"props":2047,"children":2048},{"class":332,"line":361},[2049],{"type":318,"tag":330,"props":2050,"children":2051},{},[2052],{"type":339,"value":421},{"type":318,"tag":330,"props":2054,"children":2055},{"class":332,"line":370},[2056],{"type":318,"tag":330,"props":2057,"children":2058},{},[2059],{"type":339,"value":803},{"type":318,"tag":2061,"props":2062,"children":2064},"h1",{"id":2063},"dynamic-offers",[2065],{"type":339,"value":2066},"Dynamic Offers",{"type":318,"tag":962,"props":2068,"children":2069},{"type":964},[2070,2078],{"type":318,"tag":812,"props":2071,"children":2072},{},[2073],{"type":318,"tag":971,"props":2074,"children":2075},{},[2076],{"type":339,"value":2077},"Advanced Usage",{"type":318,"tag":812,"props":2079,"children":2080},{},[2081],{"type":339,"value":2082},"Dynamically override the offers shown to your customers",{"type":318,"tag":812,"props":2084,"children":2085},{},[2086],{"type":339,"value":2087},"You can optionally pass plan IDs and/or a coupon ID which will override the default offer(s) for you flow.",{"type":318,"tag":319,"props":2089,"children":2091},{"className":321,"code":2090,"language":323,"meta":313,"style":313},"window.churnkey.init('show', {\n  ...,\n  dynamicOffers: {\n    discount: {\n      couponId: 'override-coupon-id',\n    },\n    planChange: {\n      planIds: ['price_abc', 'price_xyz'],\n    }\n  },\n})\n",[2092],{"type":318,"tag":326,"props":2093,"children":2094},{"__ignoreMap":313},[2095,2102,2109,2116,2123,2130,2137,2144,2151,2158,2165],{"type":318,"tag":330,"props":2096,"children":2097},{"class":332,"line":333},[2098],{"type":318,"tag":330,"props":2099,"children":2100},{},[2101],{"type":339,"value":340},{"type":318,"tag":330,"props":2103,"children":2104},{"class":332,"line":343},[2105],{"type":318,"tag":330,"props":2106,"children":2107},{},[2108],{"type":339,"value":846},{"type":318,"tag":330,"props":2110,"children":2111},{"class":332,"line":352},[2112],{"type":318,"tag":330,"props":2113,"children":2114},{},[2115],{"type":339,"value":556},{"type":318,"tag":330,"props":2117,"children":2118},{"class":332,"line":361},[2119],{"type":318,"tag":330,"props":2120,"children":2121},{},[2122],{"type":339,"value":565},{"type":318,"tag":330,"props":2124,"children":2125},{"class":332,"line":370},[2126],{"type":318,"tag":330,"props":2127,"children":2128},{},[2129],{"type":339,"value":574},{"type":318,"tag":330,"props":2131,"children":2132},{"class":332,"line":379},[2133],{"type":318,"tag":330,"props":2134,"children":2135},{},[2136],{"type":339,"value":583},{"type":318,"tag":330,"props":2138,"children":2139},{"class":332,"line":388},[2140],{"type":318,"tag":330,"props":2141,"children":2142},{},[2143],{"type":339,"value":592},{"type":318,"tag":330,"props":2145,"children":2146},{"class":332,"line":397},[2147],{"type":318,"tag":330,"props":2148,"children":2149},{},[2150],{"type":339,"value":601},{"type":318,"tag":330,"props":2152,"children":2153},{"class":332,"line":406},[2154],{"type":318,"tag":330,"props":2155,"children":2156},{},[2157],{"type":339,"value":520},{"type":318,"tag":330,"props":2159,"children":2160},{"class":332,"line":415},[2161],{"type":318,"tag":330,"props":2162,"children":2163},{},[2164],{"type":339,"value":448},{"type":318,"tag":330,"props":2166,"children":2167},{"class":332,"line":424},[2168],{"type":318,"tag":330,"props":2169,"children":2170},{},[2171],{"type":339,"value":803},{"type":318,"tag":812,"props":2173,"children":2174},{},[2175],{"type":339,"value":2176},"Note that these overrides, if present, will take the place of all existing discount and plan change offers in your Cancel Flow, respectively. We advise you to still include default discount and plan change settings in your Cancel Flow.",{"type":318,"tag":805,"props":2178,"children":2180},{"id":2179},"custom-callbacks",[2181],{"type":339,"value":2182},"Custom Callbacks",{"type":318,"tag":812,"props":2184,"children":2185},{},[2186,2188,2193,2194,2199],{"type":339,"value":2187},"Churnkey provides two types of callbacks for hooking into the Cancel Flow: ",{"type":318,"tag":971,"props":2189,"children":2190},{},[2191],{"type":339,"value":2192},"handler callbacks",{"type":339,"value":2001},{"type":318,"tag":971,"props":2195,"children":2196},{},[2197],{"type":339,"value":2198},"listener callbacks",{"type":339,"value":1169},{"type":318,"tag":1078,"props":2201,"children":2203},{"id":2202},"handler-callbacks",[2204],{"type":339,"value":2205},"Handler Callbacks",{"type":318,"tag":812,"props":2207,"children":2208},{},[2209,2214,2216],{"type":318,"tag":971,"props":2210,"children":2211},{},[2212],{"type":339,"value":2213},"Handler callbacks",{"type":339,"value":2215}," are intended for when you want to handle changes to a customer's subscription instead of having Churnkey do it on your behalf. ",{"type":318,"tag":971,"props":2217,"children":2218},{},[2219],{"type":339,"value":2220},"If a handler callback for a customer event is defined, Churnkey will not take action on your behalf when this event occurs.",{"type":318,"tag":812,"props":2222,"children":2223},{},[2224,2226,2232,2234,2241,2243,2249,2251,2256,2258,2264,2266,2271],{"type":339,"value":2225},"Most handler type callbacks (with the exception of ",{"type":318,"tag":326,"props":2227,"children":2229},{"className":2228},[],[2230],{"type":339,"value":2231},"handleSupportRequest",{"type":339,"value":2233},") are ",{"type":318,"tag":911,"props":2235,"children":2238},{"href":2236,"rel":2237},"https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Promise",[1144],[2239],{"type":339,"value":2240},"JavaScript Promise objects",{"type":339,"value":2242},". Calling ",{"type":318,"tag":326,"props":2244,"children":2246},{"className":2245},[],[2247],{"type":339,"value":2248},"resolve",{"type":339,"value":2250}," will advance Churnkey's flow to a ",{"type":318,"tag":971,"props":2252,"children":2253},{},[2254],{"type":339,"value":2255},"success state",{"type":339,"value":2257},". Optionally, you can pass a message which will be shown to the customer. Calling ",{"type":318,"tag":326,"props":2259,"children":2261},{"className":2260},[],[2262],{"type":339,"value":2263},"reject",{"type":339,"value":2265}," will advance Churnkey's to an ",{"type":318,"tag":971,"props":2267,"children":2268},{},[2269],{"type":339,"value":2270},"error state",{"type":339,"value":2272},". Again, you can optionally pass a message to show the customer.",{"type":318,"tag":319,"props":2274,"children":2276},{"className":321,"code":2275,"language":323,"meta":313,"style":313},"{\n    // AVAILABLE NOW\n    handlePause: \u003CPromise>,\n    handleCancel: \u003CPromise>,\n    handleDiscount: \u003CPromise>,\n    handleTrialExtension: \u003CPromise>,\n    handleRedirect: \u003CPromise\u003C(customer, redirectConfig)>,\n    handleSupportRequest: \u003Cfunction>\n    handlePlanChange: \u003CPromise\u003C(customer, { plan })>,\n}\n",[2277],{"type":318,"tag":326,"props":2278,"children":2279},{"__ignoreMap":313},[2280,2288,2296,2304,2312,2320,2328,2336,2344,2352],{"type":318,"tag":330,"props":2281,"children":2282},{"class":332,"line":333},[2283],{"type":318,"tag":330,"props":2284,"children":2285},{},[2286],{"type":339,"value":2287},"{\n",{"type":318,"tag":330,"props":2289,"children":2290},{"class":332,"line":343},[2291],{"type":318,"tag":330,"props":2292,"children":2293},{},[2294],{"type":339,"value":2295},"    // AVAILABLE NOW\n",{"type":318,"tag":330,"props":2297,"children":2298},{"class":332,"line":352},[2299],{"type":318,"tag":330,"props":2300,"children":2301},{},[2302],{"type":339,"value":2303},"    handlePause: \u003CPromise>,\n",{"type":318,"tag":330,"props":2305,"children":2306},{"class":332,"line":361},[2307],{"type":318,"tag":330,"props":2308,"children":2309},{},[2310],{"type":339,"value":2311},"    handleCancel: \u003CPromise>,\n",{"type":318,"tag":330,"props":2313,"children":2314},{"class":332,"line":370},[2315],{"type":318,"tag":330,"props":2316,"children":2317},{},[2318],{"type":339,"value":2319},"    handleDiscount: \u003CPromise>,\n",{"type":318,"tag":330,"props":2321,"children":2322},{"class":332,"line":379},[2323],{"type":318,"tag":330,"props":2324,"children":2325},{},[2326],{"type":339,"value":2327},"    handleTrialExtension: \u003CPromise>,\n",{"type":318,"tag":330,"props":2329,"children":2330},{"class":332,"line":388},[2331],{"type":318,"tag":330,"props":2332,"children":2333},{},[2334],{"type":339,"value":2335},"    handleRedirect: \u003CPromise\u003C(customer, redirectConfig)>,\n",{"type":318,"tag":330,"props":2337,"children":2338},{"class":332,"line":397},[2339],{"type":318,"tag":330,"props":2340,"children":2341},{},[2342],{"type":339,"value":2343},"    handleSupportRequest: \u003Cfunction>\n",{"type":318,"tag":330,"props":2345,"children":2346},{"class":332,"line":406},[2347],{"type":318,"tag":330,"props":2348,"children":2349},{},[2350],{"type":339,"value":2351},"    handlePlanChange: \u003CPromise\u003C(customer, { plan })>,\n",{"type":318,"tag":330,"props":2353,"children":2354},{"class":332,"line":415},[2355],{"type":318,"tag":330,"props":2356,"children":2357},{},[2358],{"type":339,"value":2359},"}\n",{"type":318,"tag":1078,"props":2361,"children":2363},{"id":2362},"listener-callbacks",[2364],{"type":339,"value":2365},"Listener Callbacks",{"type":318,"tag":812,"props":2367,"children":2368},{},[2369,2371],{"type":339,"value":2370},"Listener callbacks are used to listen for events so that you can take appropriate action in your application. ",{"type":318,"tag":971,"props":2372,"children":2373},{},[2374],{"type":339,"value":2375},"Unlike handler callbacks, if listener callbacks are defined, Churnkey will still take action on your behalf to update customer accounts in Stripe.",{"type":318,"tag":812,"props":2377,"children":2378},{},[2379,2381,2387,2389,2396],{"type":339,"value":2380},"An example use case for the ",{"type":318,"tag":326,"props":2382,"children":2384},{"className":2383},[],[2385],{"type":339,"value":2386},"onCancel",{"type":339,"value":2388}," listener callback would be initiate client-side, client-specific business logic which needs to take place when a customer cancels there account, such as limiting the features available to them. Often times, this same logic client-side logic can be implemented using ",{"type":318,"tag":911,"props":2390,"children":2393},{"href":2391,"rel":2392},"https://stripe.com/docs/webhooks",[1144],[2394],{"type":339,"value":2395},"Stripe webhooks",{"type":339,"value":2397},", and it will typically just come down to what works best for your application.",{"type":318,"tag":319,"props":2399,"children":2401},{"className":321,"code":2400,"language":323,"meta":313,"style":313},"{\n    // AVAILABLE NOW\n    onPause: \u003Cfunction(customer, { pauseDuration }>,\n    onCancel: \u003Cfunction(customer, surveyResponse)>,\n    onDiscount: \u003Cfunction(customer, coupon)>,\n    onTrialExtension: \u003Cfunction(customer, { trialExtensionDays })>,\n    onPlanChange: \u003Cfunction(customer, { planId })>,\n}\n",[2402],{"type":318,"tag":326,"props":2403,"children":2404},{"__ignoreMap":313},[2405,2412,2419,2427,2435,2443,2451,2459],{"type":318,"tag":330,"props":2406,"children":2407},{"class":332,"line":333},[2408],{"type":318,"tag":330,"props":2409,"children":2410},{},[2411],{"type":339,"value":2287},{"type":318,"tag":330,"props":2413,"children":2414},{"class":332,"line":343},[2415],{"type":318,"tag":330,"props":2416,"children":2417},{},[2418],{"type":339,"value":2295},{"type":318,"tag":330,"props":2420,"children":2421},{"class":332,"line":352},[2422],{"type":318,"tag":330,"props":2423,"children":2424},{},[2425],{"type":339,"value":2426},"    onPause: \u003Cfunction(customer, { pauseDuration }>,\n",{"type":318,"tag":330,"props":2428,"children":2429},{"class":332,"line":361},[2430],{"type":318,"tag":330,"props":2431,"children":2432},{},[2433],{"type":339,"value":2434},"    onCancel: \u003Cfunction(customer, surveyResponse)>,\n",{"type":318,"tag":330,"props":2436,"children":2437},{"class":332,"line":370},[2438],{"type":318,"tag":330,"props":2439,"children":2440},{},[2441],{"type":339,"value":2442},"    onDiscount: \u003Cfunction(customer, coupon)>,\n",{"type":318,"tag":330,"props":2444,"children":2445},{"class":332,"line":379},[2446],{"type":318,"tag":330,"props":2447,"children":2448},{},[2449],{"type":339,"value":2450},"    onTrialExtension: \u003Cfunction(customer, { trialExtensionDays })>,\n",{"type":318,"tag":330,"props":2452,"children":2453},{"class":332,"line":388},[2454],{"type":318,"tag":330,"props":2455,"children":2456},{},[2457],{"type":339,"value":2458},"    onPlanChange: \u003Cfunction(customer, { planId })>,\n",{"type":318,"tag":330,"props":2460,"children":2461},{"class":332,"line":397},[2462],{"type":318,"tag":330,"props":2463,"children":2464},{},[2465],{"type":339,"value":2359},{"type":318,"tag":1078,"props":2467,"children":2469},{"id":2468},"example-callbacks-for-custom-pause-and-cancellation-handling",[2470],{"type":339,"value":2471},"Example callbacks for custom pause and cancellation handling",{"type":318,"tag":812,"props":2473,"children":2474},{},[2475,2477,2483,2485,2491,2493,2499],{"type":339,"value":2476},"For example, if you want to implement your own pause logic (instead of using ",{"type":318,"tag":911,"props":2478,"children":2480},{"href":1263,"rel":2479},[1144],[2481],{"type":339,"value":2482},"Stripe's default pausing mechanism",{"type":339,"value":2484},") you can defined the ",{"type":318,"tag":326,"props":2486,"children":2488},{"className":2487},[],[2489],{"type":339,"value":2490},"handlePause",{"type":339,"value":2492}," option. Similarly, you can use the ",{"type":318,"tag":326,"props":2494,"children":2496},{"className":2495},[],[2497],{"type":339,"value":2498},"handleCancel",{"type":339,"value":2500}," option to implement your own cancellation. These callbacks will be fired in when your customer selects that they would like to pause or cancel their subscription, respectively. And, if the respective callbacks are defined, Churnkey will not attempt to take action on your behalf by interfacing with Stripe to pause or cancel the subscription.",{"type":318,"tag":319,"props":2502,"children":2504},{"className":321,"code":2503,"language":323,"meta":313,"style":313},"window.churnkey.init('show', {\n  appId: 'YOUR_APP_ID',\n  customerId: 'STRIPE_CUSTOMER_ID',\n  authHash: 'HMAC_HASH,\n  handlePause: (customer, { pauseDuration }) => {\n    return new Promise(async (resolve, reject) => {\n      try {\n        //////////\n        // YOUR CUSTOM PAUSING FUNCTION GOES HERE\n        //////////\n\n        // Optionally, display a custom message by passing a `message` when resolving\n        // if you don't pass a message, a generic pause confirmation message will be shown\n        resolve({ message: `Account has been paused for ${pauseDuration} month${duration === 1 ? '' : 's'}` });\n      } catch (e) {\n        console.log(e);\n        reject({ message: 'Failed to pause account. Please reach out to us through our live chat.' });\n      }\n    });\n  },\n  handleCancel: (customer, surveyAnswer) => {\n    // customer is the Stripe customer object (string)\n    // surveyAnswer is the reason they're leaving (string)\n    return new Promise(async (resolve, reject) => {\n      try {\n        ///////////\n        // CANCEL THE CUSTOMERS SUBSCRIPTION HERE\n        //////////\n\n        // Optionally, display a custom message by passing a `message` when resolving\n        // if you don't pass a message, the generic message below will be displayed\n        resolve({ message: 'Your account has been canceled. You will not be billed again' });\n      } catch (e) {\n        console.log(e);\n        reject({ message: 'Failed to cancel account. Please reach out to us through our live chat.' });\n      }\n    });\n  },\n})\n",[2505],{"type":318,"tag":326,"props":2506,"children":2507},{"__ignoreMap":313},[2508,2515,2523,2531,2539,2547,2555,2563,2571,2579,2586,2593,2601,2609,2617,2625,2633,2641,2649,2657,2664,2672,2680,2688,2695,2702,2710,2718,2725,2732,2739,2747,2755,2762,2769,2777,2784,2791,2798],{"type":318,"tag":330,"props":2509,"children":2510},{"class":332,"line":333},[2511],{"type":318,"tag":330,"props":2512,"children":2513},{},[2514],{"type":339,"value":340},{"type":318,"tag":330,"props":2516,"children":2517},{"class":332,"line":343},[2518],{"type":318,"tag":330,"props":2519,"children":2520},{},[2521],{"type":339,"value":2522},"  appId: 'YOUR_APP_ID',\n",{"type":318,"tag":330,"props":2524,"children":2525},{"class":332,"line":352},[2526],{"type":318,"tag":330,"props":2527,"children":2528},{},[2529],{"type":339,"value":2530},"  customerId: 'STRIPE_CUSTOMER_ID',\n",{"type":318,"tag":330,"props":2532,"children":2533},{"class":332,"line":361},[2534],{"type":318,"tag":330,"props":2535,"children":2536},{},[2537],{"type":339,"value":2538},"  authHash: 'HMAC_HASH,\n",{"type":318,"tag":330,"props":2540,"children":2541},{"class":332,"line":370},[2542],{"type":318,"tag":330,"props":2543,"children":2544},{},[2545],{"type":339,"value":2546},"  handlePause: (customer, { pauseDuration }) => {\n",{"type":318,"tag":330,"props":2548,"children":2549},{"class":332,"line":379},[2550],{"type":318,"tag":330,"props":2551,"children":2552},{},[2553],{"type":339,"value":2554},"    return new Promise(async (resolve, reject) => {\n",{"type":318,"tag":330,"props":2556,"children":2557},{"class":332,"line":388},[2558],{"type":318,"tag":330,"props":2559,"children":2560},{},[2561],{"type":339,"value":2562},"      try {\n",{"type":318,"tag":330,"props":2564,"children":2565},{"class":332,"line":397},[2566],{"type":318,"tag":330,"props":2567,"children":2568},{},[2569],{"type":339,"value":2570},"        //////////\n",{"type":318,"tag":330,"props":2572,"children":2573},{"class":332,"line":406},[2574],{"type":318,"tag":330,"props":2575,"children":2576},{},[2577],{"type":339,"value":2578},"        // YOUR CUSTOM PAUSING FUNCTION GOES HERE\n",{"type":318,"tag":330,"props":2580,"children":2581},{"class":332,"line":415},[2582],{"type":318,"tag":330,"props":2583,"children":2584},{},[2585],{"type":339,"value":2570},{"type":318,"tag":330,"props":2587,"children":2588},{"class":332,"line":424},[2589],{"type":318,"tag":330,"props":2590,"children":2591},{"emptyLinePlaceholder":535},[2592],{"type":339,"value":538},{"type":318,"tag":330,"props":2594,"children":2595},{"class":332,"line":433},[2596],{"type":318,"tag":330,"props":2597,"children":2598},{},[2599],{"type":339,"value":2600},"        // Optionally, display a custom message by passing a `message` when resolving\n",{"type":318,"tag":330,"props":2602,"children":2603},{"class":332,"line":442},[2604],{"type":318,"tag":330,"props":2605,"children":2606},{},[2607],{"type":339,"value":2608},"        // if you don't pass a message, a generic pause confirmation message will be shown\n",{"type":318,"tag":330,"props":2610,"children":2611},{"class":332,"line":451},[2612],{"type":318,"tag":330,"props":2613,"children":2614},{},[2615],{"type":339,"value":2616},"        resolve({ message: `Account has been paused for ${pauseDuration} month${duration === 1 ? '' : 's'}` });\n",{"type":318,"tag":330,"props":2618,"children":2619},{"class":332,"line":460},[2620],{"type":318,"tag":330,"props":2621,"children":2622},{},[2623],{"type":339,"value":2624},"      } catch (e) {\n",{"type":318,"tag":330,"props":2626,"children":2627},{"class":332,"line":469},[2628],{"type":318,"tag":330,"props":2629,"children":2630},{},[2631],{"type":339,"value":2632},"        console.log(e);\n",{"type":318,"tag":330,"props":2634,"children":2635},{"class":332,"line":478},[2636],{"type":318,"tag":330,"props":2637,"children":2638},{},[2639],{"type":339,"value":2640},"        reject({ message: 'Failed to pause account. Please reach out to us through our live chat.' });\n",{"type":318,"tag":330,"props":2642,"children":2643},{"class":332,"line":487},[2644],{"type":318,"tag":330,"props":2645,"children":2646},{},[2647],{"type":339,"value":2648},"      }\n",{"type":318,"tag":330,"props":2650,"children":2651},{"class":332,"line":496},[2652],{"type":318,"tag":330,"props":2653,"children":2654},{},[2655],{"type":339,"value":2656},"    });\n",{"type":318,"tag":330,"props":2658,"children":2659},{"class":332,"line":505},[2660],{"type":318,"tag":330,"props":2661,"children":2662},{},[2663],{"type":339,"value":448},{"type":318,"tag":330,"props":2665,"children":2666},{"class":332,"line":514},[2667],{"type":318,"tag":330,"props":2668,"children":2669},{},[2670],{"type":339,"value":2671},"  handleCancel: (customer, surveyAnswer) => {\n",{"type":318,"tag":330,"props":2673,"children":2674},{"class":332,"line":523},[2675],{"type":318,"tag":330,"props":2676,"children":2677},{},[2678],{"type":339,"value":2679},"    // customer is the Stripe customer object (string)\n",{"type":318,"tag":330,"props":2681,"children":2682},{"class":332,"line":531},[2683],{"type":318,"tag":330,"props":2684,"children":2685},{},[2686],{"type":339,"value":2687},"    // surveyAnswer is the reason they're leaving (string)\n",{"type":318,"tag":330,"props":2689,"children":2690},{"class":332,"line":541},[2691],{"type":318,"tag":330,"props":2692,"children":2693},{},[2694],{"type":339,"value":2554},{"type":318,"tag":330,"props":2696,"children":2697},{"class":332,"line":550},[2698],{"type":318,"tag":330,"props":2699,"children":2700},{},[2701],{"type":339,"value":2562},{"type":318,"tag":330,"props":2703,"children":2704},{"class":332,"line":559},[2705],{"type":318,"tag":330,"props":2706,"children":2707},{},[2708],{"type":339,"value":2709},"        ///////////\n",{"type":318,"tag":330,"props":2711,"children":2712},{"class":332,"line":568},[2713],{"type":318,"tag":330,"props":2714,"children":2715},{},[2716],{"type":339,"value":2717},"        // CANCEL THE CUSTOMERS SUBSCRIPTION HERE\n",{"type":318,"tag":330,"props":2719,"children":2720},{"class":332,"line":577},[2721],{"type":318,"tag":330,"props":2722,"children":2723},{},[2724],{"type":339,"value":2570},{"type":318,"tag":330,"props":2726,"children":2727},{"class":332,"line":586},[2728],{"type":318,"tag":330,"props":2729,"children":2730},{"emptyLinePlaceholder":535},[2731],{"type":339,"value":538},{"type":318,"tag":330,"props":2733,"children":2734},{"class":332,"line":595},[2735],{"type":318,"tag":330,"props":2736,"children":2737},{},[2738],{"type":339,"value":2600},{"type":318,"tag":330,"props":2740,"children":2741},{"class":332,"line":604},[2742],{"type":318,"tag":330,"props":2743,"children":2744},{},[2745],{"type":339,"value":2746},"        // if you don't pass a message, the generic message below will be displayed\n",{"type":318,"tag":330,"props":2748,"children":2749},{"class":332,"line":612},[2750],{"type":318,"tag":330,"props":2751,"children":2752},{},[2753],{"type":339,"value":2754},"        resolve({ message: 'Your account has been canceled. You will not be billed again' });\n",{"type":318,"tag":330,"props":2756,"children":2757},{"class":332,"line":620},[2758],{"type":318,"tag":330,"props":2759,"children":2760},{},[2761],{"type":339,"value":2624},{"type":318,"tag":330,"props":2763,"children":2764},{"class":332,"line":628},[2765],{"type":318,"tag":330,"props":2766,"children":2767},{},[2768],{"type":339,"value":2632},{"type":318,"tag":330,"props":2770,"children":2771},{"class":332,"line":637},[2772],{"type":318,"tag":330,"props":2773,"children":2774},{},[2775],{"type":339,"value":2776},"        reject({ message: 'Failed to cancel account. Please reach out to us through our live chat.' });\n",{"type":318,"tag":330,"props":2778,"children":2779},{"class":332,"line":646},[2780],{"type":318,"tag":330,"props":2781,"children":2782},{},[2783],{"type":339,"value":2648},{"type":318,"tag":330,"props":2785,"children":2786},{"class":332,"line":655},[2787],{"type":318,"tag":330,"props":2788,"children":2789},{},[2790],{"type":339,"value":2656},{"type":318,"tag":330,"props":2792,"children":2793},{"class":332,"line":664},[2794],{"type":318,"tag":330,"props":2795,"children":2796},{},[2797],{"type":339,"value":448},{"type":318,"tag":330,"props":2799,"children":2800},{"class":332,"line":673},[2801],{"type":318,"tag":330,"props":2802,"children":2803},{},[2804],{"type":339,"value":803},{"type":318,"tag":1078,"props":2806,"children":2808},{"id":2807},"example-support-request-callback-connect-with-intercom-crisp-etc",[2809],{"type":339,"value":2810},"Example support request callback (connect with Intercom, Crisp, etc.)",{"type":318,"tag":812,"props":2812,"children":2813},{},[2814,2816,2821,2823,2828,2830,2835],{"type":339,"value":2815},"The below example snippet implements ",{"type":318,"tag":326,"props":2817,"children":2819},{"className":2818},[],[2820],{"type":339,"value":2231},{"type":339,"value":2822},", triggering an Intercom chat. ",{"type":318,"tag":326,"props":2824,"children":2826},{"className":2825},[],[2827],{"type":339,"value":2231},{"type":339,"value":2829}," is slightly different than the other handle-type callbacks in that it is a normal function, not a promise. This is intended as implementations of ",{"type":318,"tag":326,"props":2831,"children":2833},{"className":2832},[],[2834],{"type":339,"value":2231},{"type":339,"value":2836}," should not require backend changes and should (in nearly all cases) be synchronous.",{"type":318,"tag":319,"props":2838,"children":2840},{"className":321,"code":2839,"language":323,"meta":313,"style":313},"window.churnkey.init('show', {\n  appId: 'YOUR_APP_ID',\n  customerId: 'STRIPE_CUSTOMER_ID',\n  authHash: 'HMAC_HASH,\n  handleSupportRequest: customer => {\n    console.log(customer);\n    window.Intercom('showNewMessage', 'Attention: Offboarding Customer Needs Help ASAP.\\n');\n    window.churnkey.hide();\n  },\n})\n",[2841],{"type":318,"tag":326,"props":2842,"children":2843},{"__ignoreMap":313},[2844,2851,2858,2865,2872,2880,2888,2896,2904,2911],{"type":318,"tag":330,"props":2845,"children":2846},{"class":332,"line":333},[2847],{"type":318,"tag":330,"props":2848,"children":2849},{},[2850],{"type":339,"value":340},{"type":318,"tag":330,"props":2852,"children":2853},{"class":332,"line":343},[2854],{"type":318,"tag":330,"props":2855,"children":2856},{},[2857],{"type":339,"value":2522},{"type":318,"tag":330,"props":2859,"children":2860},{"class":332,"line":352},[2861],{"type":318,"tag":330,"props":2862,"children":2863},{},[2864],{"type":339,"value":2530},{"type":318,"tag":330,"props":2866,"children":2867},{"class":332,"line":361},[2868],{"type":318,"tag":330,"props":2869,"children":2870},{},[2871],{"type":339,"value":2538},{"type":318,"tag":330,"props":2873,"children":2874},{"class":332,"line":370},[2875],{"type":318,"tag":330,"props":2876,"children":2877},{},[2878],{"type":339,"value":2879},"  handleSupportRequest: customer => {\n",{"type":318,"tag":330,"props":2881,"children":2882},{"class":332,"line":379},[2883],{"type":318,"tag":330,"props":2884,"children":2885},{},[2886],{"type":339,"value":2887},"    console.log(customer);\n",{"type":318,"tag":330,"props":2889,"children":2890},{"class":332,"line":388},[2891],{"type":318,"tag":330,"props":2892,"children":2893},{},[2894],{"type":339,"value":2895},"    window.Intercom('showNewMessage', 'Attention: Offboarding Customer Needs Help ASAP.\\n');\n",{"type":318,"tag":330,"props":2897,"children":2898},{"class":332,"line":397},[2899],{"type":318,"tag":330,"props":2900,"children":2901},{},[2902],{"type":339,"value":2903},"    window.churnkey.hide();\n",{"type":318,"tag":330,"props":2905,"children":2906},{"class":332,"line":406},[2907],{"type":318,"tag":330,"props":2908,"children":2909},{},[2910],{"type":339,"value":448},{"type":318,"tag":330,"props":2912,"children":2913},{"class":332,"line":415},[2914],{"type":318,"tag":330,"props":2915,"children":2916},{},[2917],{"type":339,"value":803},{"type":318,"tag":1078,"props":2919,"children":2921},{"id":2920},"example-step-change-listener",[2922],{"type":339,"value":2923},"Example Step Change Listener",{"type":318,"tag":812,"props":2925,"children":2926},{},[2927,2929,2935],{"type":339,"value":2928},"If you would like to use the ",{"type":318,"tag":326,"props":2930,"children":2932},{"className":2931},[],[2933],{"type":339,"value":2934},"onStepChange(newStep, oldStep)",{"type":339,"value":2936}," listener, each step has the following structure",{"type":318,"tag":319,"props":2938,"children":2942},{"className":2939,"code":2940,"language":2941,"meta":313,"style":313},"language-coffeescript shiki shiki-themes github-light-default github-light-default github-dark-default","{\n    \"stepType\": \"OFFER\",\n    \"header\": \"Need Some Time Off? No Problem!\",\n    \"description\": \"\u003Cp>We totally get it. Everyone needs a break sometimes. Did you know you can pause your subscription for up to 3 months, free of charge? When you're ready, your favorite shows and movies will be right here waiting for you.\u003C/p>\",\n    \"offer\": {\n        \"guid\": \"90b5af40-be1d-4c2c-aa93-c3d3007234da\",\n        \"offerType\": \"PLAN_CHANGE\", // or PAUSE or DISCOUNT or TRIAL_EXTENSION\n    },\n}\n","coffeescript",[2943],{"type":318,"tag":326,"props":2944,"children":2945},{"__ignoreMap":313},[2946,2953,2961,2969,2977,2985,2993,3001,3008],{"type":318,"tag":330,"props":2947,"children":2948},{"class":332,"line":333},[2949],{"type":318,"tag":330,"props":2950,"children":2951},{},[2952],{"type":339,"value":2287},{"type":318,"tag":330,"props":2954,"children":2955},{"class":332,"line":343},[2956],{"type":318,"tag":330,"props":2957,"children":2958},{},[2959],{"type":339,"value":2960},"    \"stepType\": \"OFFER\",\n",{"type":318,"tag":330,"props":2962,"children":2963},{"class":332,"line":352},[2964],{"type":318,"tag":330,"props":2965,"children":2966},{},[2967],{"type":339,"value":2968},"    \"header\": \"Need Some Time Off? No Problem!\",\n",{"type":318,"tag":330,"props":2970,"children":2971},{"class":332,"line":361},[2972],{"type":318,"tag":330,"props":2973,"children":2974},{},[2975],{"type":339,"value":2976},"    \"description\": \"\u003Cp>We totally get it. Everyone needs a break sometimes. Did you know you can pause your subscription for up to 3 months, free of charge? When you're ready, your favorite shows and movies will be right here waiting for you.\u003C/p>\",\n",{"type":318,"tag":330,"props":2978,"children":2979},{"class":332,"line":370},[2980],{"type":318,"tag":330,"props":2981,"children":2982},{},[2983],{"type":339,"value":2984},"    \"offer\": {\n",{"type":318,"tag":330,"props":2986,"children":2987},{"class":332,"line":379},[2988],{"type":318,"tag":330,"props":2989,"children":2990},{},[2991],{"type":339,"value":2992},"        \"guid\": \"90b5af40-be1d-4c2c-aa93-c3d3007234da\",\n",{"type":318,"tag":330,"props":2994,"children":2995},{"class":332,"line":388},[2996],{"type":318,"tag":330,"props":2997,"children":2998},{},[2999],{"type":339,"value":3000},"        \"offerType\": \"PLAN_CHANGE\", // or PAUSE or DISCOUNT or TRIAL_EXTENSION\n",{"type":318,"tag":330,"props":3002,"children":3003},{"class":332,"line":397},[3004],{"type":318,"tag":330,"props":3005,"children":3006},{},[3007],{"type":339,"value":583},{"type":318,"tag":330,"props":3009,"children":3010},{"class":332,"line":406},[3011],{"type":318,"tag":330,"props":3012,"children":3013},{},[3014],{"type":339,"value":2359},{"type":318,"tag":805,"props":3016,"children":3018},{"id":3017},"utility-functions",[3019],{"type":339,"value":3020},"Utility Functions",{"type":318,"tag":812,"props":3022,"children":3023},{},[3024],{"type":339,"value":3025},"Churnkey stores temporary flow state to keep track of survey responses and if a customer has already completed a flow to show messages like \"Your discount has been applied\", if the flow is triggered again. Depending on your application, you may want to clear this state manually, or each time the flow is retriggered.",{"type":318,"tag":319,"props":3027,"children":3029},{"className":321,"code":3028,"language":323,"meta":313,"style":313},"// used to reset internal state, useful for calling when a customer logs out\nwindow.churnkey.clearState()\n\n// used in place of window.churnkey.init('show',...)\n// first clears internal state and then calls window.churnkey.init('show',...\nwindow.churnkey.init('restart', ...\n",[3030],{"type":318,"tag":326,"props":3031,"children":3032},{"__ignoreMap":313},[3033,3041,3049,3056,3064,3072],{"type":318,"tag":330,"props":3034,"children":3035},{"class":332,"line":333},[3036],{"type":318,"tag":330,"props":3037,"children":3038},{},[3039],{"type":339,"value":3040},"// used to reset internal state, useful for calling when a customer logs out\n",{"type":318,"tag":330,"props":3042,"children":3043},{"class":332,"line":343},[3044],{"type":318,"tag":330,"props":3045,"children":3046},{},[3047],{"type":339,"value":3048},"window.churnkey.clearState()\n",{"type":318,"tag":330,"props":3050,"children":3051},{"class":332,"line":352},[3052],{"type":318,"tag":330,"props":3053,"children":3054},{"emptyLinePlaceholder":535},[3055],{"type":339,"value":538},{"type":318,"tag":330,"props":3057,"children":3058},{"class":332,"line":361},[3059],{"type":318,"tag":330,"props":3060,"children":3061},{},[3062],{"type":339,"value":3063},"// used in place of window.churnkey.init('show',...)\n",{"type":318,"tag":330,"props":3065,"children":3066},{"class":332,"line":370},[3067],{"type":318,"tag":330,"props":3068,"children":3069},{},[3070],{"type":339,"value":3071},"// first clears internal state and then calls window.churnkey.init('show',...\n",{"type":318,"tag":330,"props":3073,"children":3074},{"class":332,"line":379},[3075],{"type":318,"tag":330,"props":3076,"children":3077},{},[3078],{"type":339,"value":3079},"window.churnkey.init('restart', ...\n",{"type":318,"tag":3081,"props":3082,"children":3083},"style",{},[3084],{"type":339,"value":3085},"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":313,"searchDepth":352,"depth":352,"links":3087},[3088,3089,3090,3094,3095,3096,3097,3104],{"id":807,"depth":343,"text":810},{"id":864,"depth":343,"text":867},{"id":957,"depth":343,"text":960,"children":3091},[3092,3093],{"id":1080,"depth":352,"text":1083},{"id":1412,"depth":352,"text":1415},{"id":1713,"depth":343,"text":1716},{"id":1891,"depth":343,"text":1894},{"id":1985,"depth":343,"text":1988},{"id":2179,"depth":343,"text":2182,"children":3098},[3099,3100,3101,3102,3103],{"id":2202,"depth":352,"text":2205},{"id":2362,"depth":352,"text":2365},{"id":2468,"depth":352,"text":2471},{"id":2807,"depth":352,"text":2810},{"id":2920,"depth":352,"text":2923},{"id":3017,"depth":343,"text":3020},"markdown","content","2.cancel-flows/3.further-configuration.md","2.cancel-flows/3.further-configuration","md",{"loc":29},[3112,3113],{"_path":24,"title":23,"description":26},{"_path":34,"title":33,"description":36},1775515566722]