[{"data":1,"prerenderedAt":2740},["ShallowReactive",2],{"navigation":3,"/data-integrations/webhooks":310,"/data-integrations/webhooks-surround":2737},[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":227,"_dir":311,"_draft":312,"_partial":312,"_locale":313,"title":226,"description":229,"body":314,"_type":2731,"_id":228,"_source":2732,"_file":2733,"_stem":2734,"_extension":2735,"sitemap":2736},"data-integrations",false,"",{"type":315,"children":316,"toc":2721},"root",[317,325,330,346,353,358,386,392,397,1222,1229,1824,1845,1851,1856,1864,1920,1928,1933,2024,2032,2196,2206,2212,2274,2280,2415,2421,2463,2715],{"type":318,"tag":319,"props":320,"children":321},"element","p",{},[322],{"type":323,"value":324},"text","Webhooks enable Churnkey to push real-time event notifications to your application. Once you’ve registered an endpoint URL, Churnkey will send a secure HTTPS POST request to that URL every time one of your customers completes a Churnkey session. The JSON payload will include session information like their survey response, any freeform feedback they left, and the outcome of the session e.g. subscription pause, cancellation, discount, or if they abandoned the cancellation flow.",{"type":318,"tag":319,"props":326,"children":327},{},[328],{"type":323,"value":329},"Webhooks can be managed from your Churnkey account",{"type":318,"tag":319,"props":331,"children":332},{},[333],{"type":318,"tag":334,"props":335,"children":339},"a",{"href":336,"rel":337},"https://app.churnkey.co/settings/integrations",[338],"nofollow",[340],{"type":318,"tag":341,"props":342,"children":343},"strong",{},[344],{"type":323,"value":345},"Manage Webhooks",{"type":318,"tag":347,"props":348,"children":350},"h2",{"id":349},"use-cases",[351],{"type":323,"value":352},"Use Cases",{"type":318,"tag":319,"props":354,"children":355},{},[356],{"type":323,"value":357},"Clients use Churnkey webhooks to:",{"type":318,"tag":359,"props":360,"children":361},"ul",{},[362,376,381],{"type":318,"tag":363,"props":364,"children":365},"li",{},[366,368],{"type":323,"value":367},"Update customer profile information in CRMs such as Hubspot or Intercom\n",{"type":318,"tag":359,"props":369,"children":370},{},[371],{"type":318,"tag":363,"props":372,"children":373},{},[374],{"type":323,"value":375},"Example: marking every customer who cited “technical difficulties” in their survey response for a tutorial email campaign",{"type":318,"tag":363,"props":377,"children":378},{},[379],{"type":323,"value":380},"Create a customized Slack thread where customer success teams can discuss next steps for customer retention",{"type":318,"tag":363,"props":382,"children":383},{},[384],{"type":323,"value":385},"Send “secret plan” offers to customers who already declined offers on Churnkey Please note that for business logic related directly to customer billing and subscriptions, we recommend you use Stripe webhooks. This accounts for the possibility that subscriptions may be modified outside of the Churnkey flow.",{"type":318,"tag":347,"props":387,"children":389},{"id":388},"webhook-event-data",[390],{"type":323,"value":391},"Webhook Event Data",{"type":318,"tag":319,"props":393,"children":394},{},[395],{"type":323,"value":396},"As soon as a webhook is enabled, Churnkey will start to stream new event notifications to that URL. These will be HTTPS POST requests with a JSON payload of the below format:",{"type":318,"tag":398,"props":399,"children":403},"pre",{"className":400,"code":401,"language":402,"meta":313,"style":313},"language-tsx shiki shiki-themes github-light-default github-light-default github-dark-default","\ntype SegmentFilter = {\n  attribute: string;\n  operand: string;\n  value: string[];\n  type: string;\n}\n\ntype Segment = {\n  name: string;\n  filter: SegmentFilter[];\n}\n\ntype ABTest = {\n  name: string;\n  id: string;\n}\n\ntype DiscountConfig = {\n  couponId: string;\n  customDuration: string;\n}\n\ntype PauseConfig = {\n  maxPauseLength: number;\n  pauseInterval: string;\n  datePicker: boolean;\n}\n\ntype TrialExtensionConfig = {\n  trialExtensionDays: number;\n}\n\ntype PlanChangeConfig = {\n  options: string[];\n}\n\ntype RedirectConfig = {\n  redirectUrl: string;\n  redirectLabel: string;\n}\n\ntype PresentedOffer = {\n  guid: string;\n  offerType: 'DISCOUNT' | 'PAUSE' | 'PLAN_CHANGE' | 'CONTACT' | 'TRIAL_EXTENSION' | 'REDIRECT';\n  discountConfig?: DiscountConfig;\n  pauseConfig?: PauseConfig;\n  trialExtensionConfig?: TrialExtensionConfig;\n  planChangeConfig?: PlanChangeConfig;\n  redirectConfig?: RedirectConfig;\n}\n\ntype AcceptedOffer = {\n  guid: string;\n  offerType: 'discount' | 'pause' | 'plan change' | 'contact' | 'trial extension' | 'redirect';\n  pauseEndDate?: Date;\n  pauseInterval?: 'MONTH' | 'WEEK';\n  pauseDuration?: number;\n  pauseEndDate?: Date; // if specific date chosen\n  newPlanId?: string;\n  newPlanPrice?: number;\n  redirectUrl?: string;\n  couponId?: string;\n  couponType?: 'PERCENT' | 'AMOUNT';\n  couponAmount?: number;\n  couponDuration?: number;\n  trialExtensionDays?: number;\n}\n\ntype Session = {\n  result: 'abort' | 'cancel' | 'pause' | 'discount' | 'plan_change' | 'contact' | 'trial_extension' | 'redirect';\n  presentedOffers: PresentedOffer[];\n  acceptedOffer?: AcceptedOffer;\n  mode: 'TEST' | 'LIVE';\n  segment?: Segment;\n  abTest?: ABTest;\n  subscriptionId: string;\n  feedback?: string; // freeform feedback\n  surveyResponse?: string;\n  followupQuestion?: string; // from survey selection\n  followupResponse?: string; // from survey selection\n}\n\ntype SessionData = {\n  session: Session;\n  // customer from payment provider with expanded subscription(s)\n  customer: StripeCustomer | ChargebeeCustomer | ...\n}\n\nexport type SessionWebhookPayload = {\n  event: 'session' | 'dunning';\n  data: SessionData;\n}\n","tsx",[404],{"type":318,"tag":405,"props":406,"children":407},"code",{"__ignoreMap":313},[408,420,429,438,447,456,465,474,482,491,500,509,517,525,534,542,551,559,567,576,585,594,602,610,619,628,637,646,654,662,671,680,688,696,705,714,722,730,739,748,757,765,773,782,791,800,809,818,827,836,845,853,861,870,878,887,896,905,914,923,932,941,950,959,968,977,986,995,1003,1011,1020,1029,1038,1047,1056,1065,1074,1083,1092,1101,1110,1119,1127,1135,1144,1153,1162,1171,1179,1187,1196,1205,1214],{"type":318,"tag":409,"props":410,"children":413},"span",{"class":411,"line":412},"line",1,[414],{"type":318,"tag":409,"props":415,"children":417},{"emptyLinePlaceholder":416},true,[418],{"type":323,"value":419},"\n",{"type":318,"tag":409,"props":421,"children":423},{"class":411,"line":422},2,[424],{"type":318,"tag":409,"props":425,"children":426},{},[427],{"type":323,"value":428},"type SegmentFilter = {\n",{"type":318,"tag":409,"props":430,"children":432},{"class":411,"line":431},3,[433],{"type":318,"tag":409,"props":434,"children":435},{},[436],{"type":323,"value":437},"  attribute: string;\n",{"type":318,"tag":409,"props":439,"children":441},{"class":411,"line":440},4,[442],{"type":318,"tag":409,"props":443,"children":444},{},[445],{"type":323,"value":446},"  operand: string;\n",{"type":318,"tag":409,"props":448,"children":450},{"class":411,"line":449},5,[451],{"type":318,"tag":409,"props":452,"children":453},{},[454],{"type":323,"value":455},"  value: string[];\n",{"type":318,"tag":409,"props":457,"children":459},{"class":411,"line":458},6,[460],{"type":318,"tag":409,"props":461,"children":462},{},[463],{"type":323,"value":464},"  type: string;\n",{"type":318,"tag":409,"props":466,"children":468},{"class":411,"line":467},7,[469],{"type":318,"tag":409,"props":470,"children":471},{},[472],{"type":323,"value":473},"}\n",{"type":318,"tag":409,"props":475,"children":477},{"class":411,"line":476},8,[478],{"type":318,"tag":409,"props":479,"children":480},{"emptyLinePlaceholder":416},[481],{"type":323,"value":419},{"type":318,"tag":409,"props":483,"children":485},{"class":411,"line":484},9,[486],{"type":318,"tag":409,"props":487,"children":488},{},[489],{"type":323,"value":490},"type Segment = {\n",{"type":318,"tag":409,"props":492,"children":494},{"class":411,"line":493},10,[495],{"type":318,"tag":409,"props":496,"children":497},{},[498],{"type":323,"value":499},"  name: string;\n",{"type":318,"tag":409,"props":501,"children":503},{"class":411,"line":502},11,[504],{"type":318,"tag":409,"props":505,"children":506},{},[507],{"type":323,"value":508},"  filter: SegmentFilter[];\n",{"type":318,"tag":409,"props":510,"children":512},{"class":411,"line":511},12,[513],{"type":318,"tag":409,"props":514,"children":515},{},[516],{"type":323,"value":473},{"type":318,"tag":409,"props":518,"children":520},{"class":411,"line":519},13,[521],{"type":318,"tag":409,"props":522,"children":523},{"emptyLinePlaceholder":416},[524],{"type":323,"value":419},{"type":318,"tag":409,"props":526,"children":528},{"class":411,"line":527},14,[529],{"type":318,"tag":409,"props":530,"children":531},{},[532],{"type":323,"value":533},"type ABTest = {\n",{"type":318,"tag":409,"props":535,"children":537},{"class":411,"line":536},15,[538],{"type":318,"tag":409,"props":539,"children":540},{},[541],{"type":323,"value":499},{"type":318,"tag":409,"props":543,"children":545},{"class":411,"line":544},16,[546],{"type":318,"tag":409,"props":547,"children":548},{},[549],{"type":323,"value":550},"  id: string;\n",{"type":318,"tag":409,"props":552,"children":554},{"class":411,"line":553},17,[555],{"type":318,"tag":409,"props":556,"children":557},{},[558],{"type":323,"value":473},{"type":318,"tag":409,"props":560,"children":562},{"class":411,"line":561},18,[563],{"type":318,"tag":409,"props":564,"children":565},{"emptyLinePlaceholder":416},[566],{"type":323,"value":419},{"type":318,"tag":409,"props":568,"children":570},{"class":411,"line":569},19,[571],{"type":318,"tag":409,"props":572,"children":573},{},[574],{"type":323,"value":575},"type DiscountConfig = {\n",{"type":318,"tag":409,"props":577,"children":579},{"class":411,"line":578},20,[580],{"type":318,"tag":409,"props":581,"children":582},{},[583],{"type":323,"value":584},"  couponId: string;\n",{"type":318,"tag":409,"props":586,"children":588},{"class":411,"line":587},21,[589],{"type":318,"tag":409,"props":590,"children":591},{},[592],{"type":323,"value":593},"  customDuration: string;\n",{"type":318,"tag":409,"props":595,"children":597},{"class":411,"line":596},22,[598],{"type":318,"tag":409,"props":599,"children":600},{},[601],{"type":323,"value":473},{"type":318,"tag":409,"props":603,"children":605},{"class":411,"line":604},23,[606],{"type":318,"tag":409,"props":607,"children":608},{"emptyLinePlaceholder":416},[609],{"type":323,"value":419},{"type":318,"tag":409,"props":611,"children":613},{"class":411,"line":612},24,[614],{"type":318,"tag":409,"props":615,"children":616},{},[617],{"type":323,"value":618},"type PauseConfig = {\n",{"type":318,"tag":409,"props":620,"children":622},{"class":411,"line":621},25,[623],{"type":318,"tag":409,"props":624,"children":625},{},[626],{"type":323,"value":627},"  maxPauseLength: number;\n",{"type":318,"tag":409,"props":629,"children":631},{"class":411,"line":630},26,[632],{"type":318,"tag":409,"props":633,"children":634},{},[635],{"type":323,"value":636},"  pauseInterval: string;\n",{"type":318,"tag":409,"props":638,"children":640},{"class":411,"line":639},27,[641],{"type":318,"tag":409,"props":642,"children":643},{},[644],{"type":323,"value":645},"  datePicker: boolean;\n",{"type":318,"tag":409,"props":647,"children":649},{"class":411,"line":648},28,[650],{"type":318,"tag":409,"props":651,"children":652},{},[653],{"type":323,"value":473},{"type":318,"tag":409,"props":655,"children":657},{"class":411,"line":656},29,[658],{"type":318,"tag":409,"props":659,"children":660},{"emptyLinePlaceholder":416},[661],{"type":323,"value":419},{"type":318,"tag":409,"props":663,"children":665},{"class":411,"line":664},30,[666],{"type":318,"tag":409,"props":667,"children":668},{},[669],{"type":323,"value":670},"type TrialExtensionConfig = {\n",{"type":318,"tag":409,"props":672,"children":674},{"class":411,"line":673},31,[675],{"type":318,"tag":409,"props":676,"children":677},{},[678],{"type":323,"value":679},"  trialExtensionDays: number;\n",{"type":318,"tag":409,"props":681,"children":683},{"class":411,"line":682},32,[684],{"type":318,"tag":409,"props":685,"children":686},{},[687],{"type":323,"value":473},{"type":318,"tag":409,"props":689,"children":691},{"class":411,"line":690},33,[692],{"type":318,"tag":409,"props":693,"children":694},{"emptyLinePlaceholder":416},[695],{"type":323,"value":419},{"type":318,"tag":409,"props":697,"children":699},{"class":411,"line":698},34,[700],{"type":318,"tag":409,"props":701,"children":702},{},[703],{"type":323,"value":704},"type PlanChangeConfig = {\n",{"type":318,"tag":409,"props":706,"children":708},{"class":411,"line":707},35,[709],{"type":318,"tag":409,"props":710,"children":711},{},[712],{"type":323,"value":713},"  options: string[];\n",{"type":318,"tag":409,"props":715,"children":717},{"class":411,"line":716},36,[718],{"type":318,"tag":409,"props":719,"children":720},{},[721],{"type":323,"value":473},{"type":318,"tag":409,"props":723,"children":725},{"class":411,"line":724},37,[726],{"type":318,"tag":409,"props":727,"children":728},{"emptyLinePlaceholder":416},[729],{"type":323,"value":419},{"type":318,"tag":409,"props":731,"children":733},{"class":411,"line":732},38,[734],{"type":318,"tag":409,"props":735,"children":736},{},[737],{"type":323,"value":738},"type RedirectConfig = {\n",{"type":318,"tag":409,"props":740,"children":742},{"class":411,"line":741},39,[743],{"type":318,"tag":409,"props":744,"children":745},{},[746],{"type":323,"value":747},"  redirectUrl: string;\n",{"type":318,"tag":409,"props":749,"children":751},{"class":411,"line":750},40,[752],{"type":318,"tag":409,"props":753,"children":754},{},[755],{"type":323,"value":756},"  redirectLabel: string;\n",{"type":318,"tag":409,"props":758,"children":760},{"class":411,"line":759},41,[761],{"type":318,"tag":409,"props":762,"children":763},{},[764],{"type":323,"value":473},{"type":318,"tag":409,"props":766,"children":768},{"class":411,"line":767},42,[769],{"type":318,"tag":409,"props":770,"children":771},{"emptyLinePlaceholder":416},[772],{"type":323,"value":419},{"type":318,"tag":409,"props":774,"children":776},{"class":411,"line":775},43,[777],{"type":318,"tag":409,"props":778,"children":779},{},[780],{"type":323,"value":781},"type PresentedOffer = {\n",{"type":318,"tag":409,"props":783,"children":785},{"class":411,"line":784},44,[786],{"type":318,"tag":409,"props":787,"children":788},{},[789],{"type":323,"value":790},"  guid: string;\n",{"type":318,"tag":409,"props":792,"children":794},{"class":411,"line":793},45,[795],{"type":318,"tag":409,"props":796,"children":797},{},[798],{"type":323,"value":799},"  offerType: 'DISCOUNT' | 'PAUSE' | 'PLAN_CHANGE' | 'CONTACT' | 'TRIAL_EXTENSION' | 'REDIRECT';\n",{"type":318,"tag":409,"props":801,"children":803},{"class":411,"line":802},46,[804],{"type":318,"tag":409,"props":805,"children":806},{},[807],{"type":323,"value":808},"  discountConfig?: DiscountConfig;\n",{"type":318,"tag":409,"props":810,"children":812},{"class":411,"line":811},47,[813],{"type":318,"tag":409,"props":814,"children":815},{},[816],{"type":323,"value":817},"  pauseConfig?: PauseConfig;\n",{"type":318,"tag":409,"props":819,"children":821},{"class":411,"line":820},48,[822],{"type":318,"tag":409,"props":823,"children":824},{},[825],{"type":323,"value":826},"  trialExtensionConfig?: TrialExtensionConfig;\n",{"type":318,"tag":409,"props":828,"children":830},{"class":411,"line":829},49,[831],{"type":318,"tag":409,"props":832,"children":833},{},[834],{"type":323,"value":835},"  planChangeConfig?: PlanChangeConfig;\n",{"type":318,"tag":409,"props":837,"children":839},{"class":411,"line":838},50,[840],{"type":318,"tag":409,"props":841,"children":842},{},[843],{"type":323,"value":844},"  redirectConfig?: RedirectConfig;\n",{"type":318,"tag":409,"props":846,"children":848},{"class":411,"line":847},51,[849],{"type":318,"tag":409,"props":850,"children":851},{},[852],{"type":323,"value":473},{"type":318,"tag":409,"props":854,"children":856},{"class":411,"line":855},52,[857],{"type":318,"tag":409,"props":858,"children":859},{"emptyLinePlaceholder":416},[860],{"type":323,"value":419},{"type":318,"tag":409,"props":862,"children":864},{"class":411,"line":863},53,[865],{"type":318,"tag":409,"props":866,"children":867},{},[868],{"type":323,"value":869},"type AcceptedOffer = {\n",{"type":318,"tag":409,"props":871,"children":873},{"class":411,"line":872},54,[874],{"type":318,"tag":409,"props":875,"children":876},{},[877],{"type":323,"value":790},{"type":318,"tag":409,"props":879,"children":881},{"class":411,"line":880},55,[882],{"type":318,"tag":409,"props":883,"children":884},{},[885],{"type":323,"value":886},"  offerType: 'discount' | 'pause' | 'plan change' | 'contact' | 'trial extension' | 'redirect';\n",{"type":318,"tag":409,"props":888,"children":890},{"class":411,"line":889},56,[891],{"type":318,"tag":409,"props":892,"children":893},{},[894],{"type":323,"value":895},"  pauseEndDate?: Date;\n",{"type":318,"tag":409,"props":897,"children":899},{"class":411,"line":898},57,[900],{"type":318,"tag":409,"props":901,"children":902},{},[903],{"type":323,"value":904},"  pauseInterval?: 'MONTH' | 'WEEK';\n",{"type":318,"tag":409,"props":906,"children":908},{"class":411,"line":907},58,[909],{"type":318,"tag":409,"props":910,"children":911},{},[912],{"type":323,"value":913},"  pauseDuration?: number;\n",{"type":318,"tag":409,"props":915,"children":917},{"class":411,"line":916},59,[918],{"type":318,"tag":409,"props":919,"children":920},{},[921],{"type":323,"value":922},"  pauseEndDate?: Date; // if specific date chosen\n",{"type":318,"tag":409,"props":924,"children":926},{"class":411,"line":925},60,[927],{"type":318,"tag":409,"props":928,"children":929},{},[930],{"type":323,"value":931},"  newPlanId?: string;\n",{"type":318,"tag":409,"props":933,"children":935},{"class":411,"line":934},61,[936],{"type":318,"tag":409,"props":937,"children":938},{},[939],{"type":323,"value":940},"  newPlanPrice?: number;\n",{"type":318,"tag":409,"props":942,"children":944},{"class":411,"line":943},62,[945],{"type":318,"tag":409,"props":946,"children":947},{},[948],{"type":323,"value":949},"  redirectUrl?: string;\n",{"type":318,"tag":409,"props":951,"children":953},{"class":411,"line":952},63,[954],{"type":318,"tag":409,"props":955,"children":956},{},[957],{"type":323,"value":958},"  couponId?: string;\n",{"type":318,"tag":409,"props":960,"children":962},{"class":411,"line":961},64,[963],{"type":318,"tag":409,"props":964,"children":965},{},[966],{"type":323,"value":967},"  couponType?: 'PERCENT' | 'AMOUNT';\n",{"type":318,"tag":409,"props":969,"children":971},{"class":411,"line":970},65,[972],{"type":318,"tag":409,"props":973,"children":974},{},[975],{"type":323,"value":976},"  couponAmount?: number;\n",{"type":318,"tag":409,"props":978,"children":980},{"class":411,"line":979},66,[981],{"type":318,"tag":409,"props":982,"children":983},{},[984],{"type":323,"value":985},"  couponDuration?: number;\n",{"type":318,"tag":409,"props":987,"children":989},{"class":411,"line":988},67,[990],{"type":318,"tag":409,"props":991,"children":992},{},[993],{"type":323,"value":994},"  trialExtensionDays?: number;\n",{"type":318,"tag":409,"props":996,"children":998},{"class":411,"line":997},68,[999],{"type":318,"tag":409,"props":1000,"children":1001},{},[1002],{"type":323,"value":473},{"type":318,"tag":409,"props":1004,"children":1006},{"class":411,"line":1005},69,[1007],{"type":318,"tag":409,"props":1008,"children":1009},{"emptyLinePlaceholder":416},[1010],{"type":323,"value":419},{"type":318,"tag":409,"props":1012,"children":1014},{"class":411,"line":1013},70,[1015],{"type":318,"tag":409,"props":1016,"children":1017},{},[1018],{"type":323,"value":1019},"type Session = {\n",{"type":318,"tag":409,"props":1021,"children":1023},{"class":411,"line":1022},71,[1024],{"type":318,"tag":409,"props":1025,"children":1026},{},[1027],{"type":323,"value":1028},"  result: 'abort' | 'cancel' | 'pause' | 'discount' | 'plan_change' | 'contact' | 'trial_extension' | 'redirect';\n",{"type":318,"tag":409,"props":1030,"children":1032},{"class":411,"line":1031},72,[1033],{"type":318,"tag":409,"props":1034,"children":1035},{},[1036],{"type":323,"value":1037},"  presentedOffers: PresentedOffer[];\n",{"type":318,"tag":409,"props":1039,"children":1041},{"class":411,"line":1040},73,[1042],{"type":318,"tag":409,"props":1043,"children":1044},{},[1045],{"type":323,"value":1046},"  acceptedOffer?: AcceptedOffer;\n",{"type":318,"tag":409,"props":1048,"children":1050},{"class":411,"line":1049},74,[1051],{"type":318,"tag":409,"props":1052,"children":1053},{},[1054],{"type":323,"value":1055},"  mode: 'TEST' | 'LIVE';\n",{"type":318,"tag":409,"props":1057,"children":1059},{"class":411,"line":1058},75,[1060],{"type":318,"tag":409,"props":1061,"children":1062},{},[1063],{"type":323,"value":1064},"  segment?: Segment;\n",{"type":318,"tag":409,"props":1066,"children":1068},{"class":411,"line":1067},76,[1069],{"type":318,"tag":409,"props":1070,"children":1071},{},[1072],{"type":323,"value":1073},"  abTest?: ABTest;\n",{"type":318,"tag":409,"props":1075,"children":1077},{"class":411,"line":1076},77,[1078],{"type":318,"tag":409,"props":1079,"children":1080},{},[1081],{"type":323,"value":1082},"  subscriptionId: string;\n",{"type":318,"tag":409,"props":1084,"children":1086},{"class":411,"line":1085},78,[1087],{"type":318,"tag":409,"props":1088,"children":1089},{},[1090],{"type":323,"value":1091},"  feedback?: string; // freeform feedback\n",{"type":318,"tag":409,"props":1093,"children":1095},{"class":411,"line":1094},79,[1096],{"type":318,"tag":409,"props":1097,"children":1098},{},[1099],{"type":323,"value":1100},"  surveyResponse?: string;\n",{"type":318,"tag":409,"props":1102,"children":1104},{"class":411,"line":1103},80,[1105],{"type":318,"tag":409,"props":1106,"children":1107},{},[1108],{"type":323,"value":1109},"  followupQuestion?: string; // from survey selection\n",{"type":318,"tag":409,"props":1111,"children":1113},{"class":411,"line":1112},81,[1114],{"type":318,"tag":409,"props":1115,"children":1116},{},[1117],{"type":323,"value":1118},"  followupResponse?: string; // from survey selection\n",{"type":318,"tag":409,"props":1120,"children":1122},{"class":411,"line":1121},82,[1123],{"type":318,"tag":409,"props":1124,"children":1125},{},[1126],{"type":323,"value":473},{"type":318,"tag":409,"props":1128,"children":1130},{"class":411,"line":1129},83,[1131],{"type":318,"tag":409,"props":1132,"children":1133},{"emptyLinePlaceholder":416},[1134],{"type":323,"value":419},{"type":318,"tag":409,"props":1136,"children":1138},{"class":411,"line":1137},84,[1139],{"type":318,"tag":409,"props":1140,"children":1141},{},[1142],{"type":323,"value":1143},"type SessionData = {\n",{"type":318,"tag":409,"props":1145,"children":1147},{"class":411,"line":1146},85,[1148],{"type":318,"tag":409,"props":1149,"children":1150},{},[1151],{"type":323,"value":1152},"  session: Session;\n",{"type":318,"tag":409,"props":1154,"children":1156},{"class":411,"line":1155},86,[1157],{"type":318,"tag":409,"props":1158,"children":1159},{},[1160],{"type":323,"value":1161},"  // customer from payment provider with expanded subscription(s)\n",{"type":318,"tag":409,"props":1163,"children":1165},{"class":411,"line":1164},87,[1166],{"type":318,"tag":409,"props":1167,"children":1168},{},[1169],{"type":323,"value":1170},"  customer: StripeCustomer | ChargebeeCustomer | ...\n",{"type":318,"tag":409,"props":1172,"children":1174},{"class":411,"line":1173},88,[1175],{"type":318,"tag":409,"props":1176,"children":1177},{},[1178],{"type":323,"value":473},{"type":318,"tag":409,"props":1180,"children":1182},{"class":411,"line":1181},89,[1183],{"type":318,"tag":409,"props":1184,"children":1185},{"emptyLinePlaceholder":416},[1186],{"type":323,"value":419},{"type":318,"tag":409,"props":1188,"children":1190},{"class":411,"line":1189},90,[1191],{"type":318,"tag":409,"props":1192,"children":1193},{},[1194],{"type":323,"value":1195},"export type SessionWebhookPayload = {\n",{"type":318,"tag":409,"props":1197,"children":1199},{"class":411,"line":1198},91,[1200],{"type":318,"tag":409,"props":1201,"children":1202},{},[1203],{"type":323,"value":1204},"  event: 'session' | 'dunning';\n",{"type":318,"tag":409,"props":1206,"children":1208},{"class":411,"line":1207},92,[1209],{"type":318,"tag":409,"props":1210,"children":1211},{},[1212],{"type":323,"value":1213},"  data: SessionData;\n",{"type":318,"tag":409,"props":1215,"children":1217},{"class":411,"line":1216},93,[1218],{"type":318,"tag":409,"props":1219,"children":1220},{},[1221],{"type":323,"value":473},{"type":318,"tag":1223,"props":1224,"children":1226},"h3",{"id":1225},"example-session-webhook-payload",[1227],{"type":323,"value":1228},"Example Session Webhook Payload",{"type":318,"tag":398,"props":1230,"children":1234},{"className":1231,"code":1232,"language":1233,"meta":313,"style":313},"language-json shiki shiki-themes github-light-default github-light-default github-dark-default","{\n  \"event\": \"session\",\n  \"data\": {\n    \"customer\": \u003CUP TO DATE CUSTOMER>,\n    \"session\": {\n      \"result\": \"pause\", // pause, discount, cancel, abort\n      \"feedback\": \"Freeform feedback from customer\",\n      \"surveyResponse\": \"Too Expensive\",\n      \"mode\": \"LIVE\", // billing mode, LIVE or TEST,\n      \"usedClickToCancel\": true, // If customer clicked on the Cancel Now button \n      \"customAttributes\": {\n        \"favoriteAnimal\": \"penguin\" // All customAttributes you sent during the session\n      },\n      \"followupQuestion\": \"From survey question\",\n      \"followupResponse\": \"Customer response to survey follow-up question\",\n      \"acceptedOffer\": {\n        // details below\n        \"offerType\": \"PAUSE\",\n        \"pauseDuration\": 2,\n      },\n      // Segment information will be sent if the customer belonged to a segment defined in Churnkey\n      \"segment\": {\n        \"name\": \"My annual customers\",\n        \"filter\": [{\n          \"attribute\": \"BILLING_INTERVAL\",\n          \"operand\": \"INCLUDES\",\n          \"value\": [\"YEAR\"]\n        }]\n      },\n      \"abTest\": {\n        \"name\": \"A/B test for discount percentage\",\n        \"id\": \"Unique ID for AB Test\"\n      }\n    }\n  }\n}\n","json",[1235],{"type":318,"tag":405,"props":1236,"children":1237},{"__ignoreMap":313},[1238,1247,1272,1285,1322,1334,1362,1383,1404,1430,1457,1469,1491,1499,1520,1541,1553,1561,1582,1603,1610,1618,1630,1651,1664,1685,1706,1729,1737,1744,1756,1776,1793,1801,1809,1817],{"type":318,"tag":409,"props":1239,"children":1240},{"class":411,"line":412},[1241],{"type":318,"tag":409,"props":1242,"children":1244},{"style":1243},"--shiki-light:#1F2328;--shiki-default:#1F2328;--shiki-dark:#E6EDF3",[1245],{"type":323,"value":1246},"{\n",{"type":318,"tag":409,"props":1248,"children":1249},{"class":411,"line":422},[1250,1256,1261,1267],{"type":318,"tag":409,"props":1251,"children":1253},{"style":1252},"--shiki-light:#116329;--shiki-default:#116329;--shiki-dark:#7EE787",[1254],{"type":323,"value":1255},"  \"event\"",{"type":318,"tag":409,"props":1257,"children":1258},{"style":1243},[1259],{"type":323,"value":1260},": ",{"type":318,"tag":409,"props":1262,"children":1264},{"style":1263},"--shiki-light:#0A3069;--shiki-default:#0A3069;--shiki-dark:#A5D6FF",[1265],{"type":323,"value":1266},"\"session\"",{"type":318,"tag":409,"props":1268,"children":1269},{"style":1243},[1270],{"type":323,"value":1271},",\n",{"type":318,"tag":409,"props":1273,"children":1274},{"class":411,"line":431},[1275,1280],{"type":318,"tag":409,"props":1276,"children":1277},{"style":1252},[1278],{"type":323,"value":1279},"  \"data\"",{"type":318,"tag":409,"props":1281,"children":1282},{"style":1243},[1283],{"type":323,"value":1284},": {\n",{"type":318,"tag":409,"props":1286,"children":1287},{"class":411,"line":440},[1288,1293,1297,1303,1308,1313,1318],{"type":318,"tag":409,"props":1289,"children":1290},{"style":1252},[1291],{"type":323,"value":1292},"    \"customer\"",{"type":318,"tag":409,"props":1294,"children":1295},{"style":1243},[1296],{"type":323,"value":1260},{"type":318,"tag":409,"props":1298,"children":1300},{"style":1299},"--shiki-light:#82071E;--shiki-default:#82071E;--shiki-dark:#FFA198;--shiki-light-font-style:italic;--shiki-default-font-style:italic;--shiki-dark-font-style:italic",[1301],{"type":323,"value":1302},"\u003CUP",{"type":318,"tag":409,"props":1304,"children":1305},{"style":1299},[1306],{"type":323,"value":1307}," TO",{"type":318,"tag":409,"props":1309,"children":1310},{"style":1299},[1311],{"type":323,"value":1312}," DATE",{"type":318,"tag":409,"props":1314,"children":1315},{"style":1299},[1316],{"type":323,"value":1317}," CUSTOMER>",{"type":318,"tag":409,"props":1319,"children":1320},{"style":1243},[1321],{"type":323,"value":1271},{"type":318,"tag":409,"props":1323,"children":1324},{"class":411,"line":449},[1325,1330],{"type":318,"tag":409,"props":1326,"children":1327},{"style":1252},[1328],{"type":323,"value":1329},"    \"session\"",{"type":318,"tag":409,"props":1331,"children":1332},{"style":1243},[1333],{"type":323,"value":1284},{"type":318,"tag":409,"props":1335,"children":1336},{"class":411,"line":458},[1337,1342,1346,1351,1356],{"type":318,"tag":409,"props":1338,"children":1339},{"style":1252},[1340],{"type":323,"value":1341},"      \"result\"",{"type":318,"tag":409,"props":1343,"children":1344},{"style":1243},[1345],{"type":323,"value":1260},{"type":318,"tag":409,"props":1347,"children":1348},{"style":1263},[1349],{"type":323,"value":1350},"\"pause\"",{"type":318,"tag":409,"props":1352,"children":1353},{"style":1243},[1354],{"type":323,"value":1355},", ",{"type":318,"tag":409,"props":1357,"children":1359},{"style":1358},"--shiki-light:#6E7781;--shiki-default:#6E7781;--shiki-dark:#8B949E",[1360],{"type":323,"value":1361},"// pause, discount, cancel, abort\n",{"type":318,"tag":409,"props":1363,"children":1364},{"class":411,"line":467},[1365,1370,1374,1379],{"type":318,"tag":409,"props":1366,"children":1367},{"style":1252},[1368],{"type":323,"value":1369},"      \"feedback\"",{"type":318,"tag":409,"props":1371,"children":1372},{"style":1243},[1373],{"type":323,"value":1260},{"type":318,"tag":409,"props":1375,"children":1376},{"style":1263},[1377],{"type":323,"value":1378},"\"Freeform feedback from customer\"",{"type":318,"tag":409,"props":1380,"children":1381},{"style":1243},[1382],{"type":323,"value":1271},{"type":318,"tag":409,"props":1384,"children":1385},{"class":411,"line":476},[1386,1391,1395,1400],{"type":318,"tag":409,"props":1387,"children":1388},{"style":1252},[1389],{"type":323,"value":1390},"      \"surveyResponse\"",{"type":318,"tag":409,"props":1392,"children":1393},{"style":1243},[1394],{"type":323,"value":1260},{"type":318,"tag":409,"props":1396,"children":1397},{"style":1263},[1398],{"type":323,"value":1399},"\"Too Expensive\"",{"type":318,"tag":409,"props":1401,"children":1402},{"style":1243},[1403],{"type":323,"value":1271},{"type":318,"tag":409,"props":1405,"children":1406},{"class":411,"line":484},[1407,1412,1416,1421,1425],{"type":318,"tag":409,"props":1408,"children":1409},{"style":1252},[1410],{"type":323,"value":1411},"      \"mode\"",{"type":318,"tag":409,"props":1413,"children":1414},{"style":1243},[1415],{"type":323,"value":1260},{"type":318,"tag":409,"props":1417,"children":1418},{"style":1263},[1419],{"type":323,"value":1420},"\"LIVE\"",{"type":318,"tag":409,"props":1422,"children":1423},{"style":1243},[1424],{"type":323,"value":1355},{"type":318,"tag":409,"props":1426,"children":1427},{"style":1358},[1428],{"type":323,"value":1429},"// billing mode, LIVE or TEST,\n",{"type":318,"tag":409,"props":1431,"children":1432},{"class":411,"line":493},[1433,1438,1442,1448,1452],{"type":318,"tag":409,"props":1434,"children":1435},{"style":1252},[1436],{"type":323,"value":1437},"      \"usedClickToCancel\"",{"type":318,"tag":409,"props":1439,"children":1440},{"style":1243},[1441],{"type":323,"value":1260},{"type":318,"tag":409,"props":1443,"children":1445},{"style":1444},"--shiki-light:#0550AE;--shiki-default:#0550AE;--shiki-dark:#79C0FF",[1446],{"type":323,"value":1447},"true",{"type":318,"tag":409,"props":1449,"children":1450},{"style":1243},[1451],{"type":323,"value":1355},{"type":318,"tag":409,"props":1453,"children":1454},{"style":1358},[1455],{"type":323,"value":1456},"// If customer clicked on the Cancel Now button \n",{"type":318,"tag":409,"props":1458,"children":1459},{"class":411,"line":502},[1460,1465],{"type":318,"tag":409,"props":1461,"children":1462},{"style":1252},[1463],{"type":323,"value":1464},"      \"customAttributes\"",{"type":318,"tag":409,"props":1466,"children":1467},{"style":1243},[1468],{"type":323,"value":1284},{"type":318,"tag":409,"props":1470,"children":1471},{"class":411,"line":511},[1472,1477,1481,1486],{"type":318,"tag":409,"props":1473,"children":1474},{"style":1252},[1475],{"type":323,"value":1476},"        \"favoriteAnimal\"",{"type":318,"tag":409,"props":1478,"children":1479},{"style":1243},[1480],{"type":323,"value":1260},{"type":318,"tag":409,"props":1482,"children":1483},{"style":1263},[1484],{"type":323,"value":1485},"\"penguin\"",{"type":318,"tag":409,"props":1487,"children":1488},{"style":1358},[1489],{"type":323,"value":1490}," // All customAttributes you sent during the session\n",{"type":318,"tag":409,"props":1492,"children":1493},{"class":411,"line":519},[1494],{"type":318,"tag":409,"props":1495,"children":1496},{"style":1243},[1497],{"type":323,"value":1498},"      },\n",{"type":318,"tag":409,"props":1500,"children":1501},{"class":411,"line":527},[1502,1507,1511,1516],{"type":318,"tag":409,"props":1503,"children":1504},{"style":1252},[1505],{"type":323,"value":1506},"      \"followupQuestion\"",{"type":318,"tag":409,"props":1508,"children":1509},{"style":1243},[1510],{"type":323,"value":1260},{"type":318,"tag":409,"props":1512,"children":1513},{"style":1263},[1514],{"type":323,"value":1515},"\"From survey question\"",{"type":318,"tag":409,"props":1517,"children":1518},{"style":1243},[1519],{"type":323,"value":1271},{"type":318,"tag":409,"props":1521,"children":1522},{"class":411,"line":536},[1523,1528,1532,1537],{"type":318,"tag":409,"props":1524,"children":1525},{"style":1252},[1526],{"type":323,"value":1527},"      \"followupResponse\"",{"type":318,"tag":409,"props":1529,"children":1530},{"style":1243},[1531],{"type":323,"value":1260},{"type":318,"tag":409,"props":1533,"children":1534},{"style":1263},[1535],{"type":323,"value":1536},"\"Customer response to survey follow-up question\"",{"type":318,"tag":409,"props":1538,"children":1539},{"style":1243},[1540],{"type":323,"value":1271},{"type":318,"tag":409,"props":1542,"children":1543},{"class":411,"line":544},[1544,1549],{"type":318,"tag":409,"props":1545,"children":1546},{"style":1252},[1547],{"type":323,"value":1548},"      \"acceptedOffer\"",{"type":318,"tag":409,"props":1550,"children":1551},{"style":1243},[1552],{"type":323,"value":1284},{"type":318,"tag":409,"props":1554,"children":1555},{"class":411,"line":553},[1556],{"type":318,"tag":409,"props":1557,"children":1558},{"style":1358},[1559],{"type":323,"value":1560},"        // details below\n",{"type":318,"tag":409,"props":1562,"children":1563},{"class":411,"line":561},[1564,1569,1573,1578],{"type":318,"tag":409,"props":1565,"children":1566},{"style":1252},[1567],{"type":323,"value":1568},"        \"offerType\"",{"type":318,"tag":409,"props":1570,"children":1571},{"style":1243},[1572],{"type":323,"value":1260},{"type":318,"tag":409,"props":1574,"children":1575},{"style":1263},[1576],{"type":323,"value":1577},"\"PAUSE\"",{"type":318,"tag":409,"props":1579,"children":1580},{"style":1243},[1581],{"type":323,"value":1271},{"type":318,"tag":409,"props":1583,"children":1584},{"class":411,"line":569},[1585,1590,1594,1599],{"type":318,"tag":409,"props":1586,"children":1587},{"style":1252},[1588],{"type":323,"value":1589},"        \"pauseDuration\"",{"type":318,"tag":409,"props":1591,"children":1592},{"style":1243},[1593],{"type":323,"value":1260},{"type":318,"tag":409,"props":1595,"children":1596},{"style":1444},[1597],{"type":323,"value":1598},"2",{"type":318,"tag":409,"props":1600,"children":1601},{"style":1243},[1602],{"type":323,"value":1271},{"type":318,"tag":409,"props":1604,"children":1605},{"class":411,"line":578},[1606],{"type":318,"tag":409,"props":1607,"children":1608},{"style":1243},[1609],{"type":323,"value":1498},{"type":318,"tag":409,"props":1611,"children":1612},{"class":411,"line":587},[1613],{"type":318,"tag":409,"props":1614,"children":1615},{"style":1358},[1616],{"type":323,"value":1617},"      // Segment information will be sent if the customer belonged to a segment defined in Churnkey\n",{"type":318,"tag":409,"props":1619,"children":1620},{"class":411,"line":596},[1621,1626],{"type":318,"tag":409,"props":1622,"children":1623},{"style":1252},[1624],{"type":323,"value":1625},"      \"segment\"",{"type":318,"tag":409,"props":1627,"children":1628},{"style":1243},[1629],{"type":323,"value":1284},{"type":318,"tag":409,"props":1631,"children":1632},{"class":411,"line":604},[1633,1638,1642,1647],{"type":318,"tag":409,"props":1634,"children":1635},{"style":1252},[1636],{"type":323,"value":1637},"        \"name\"",{"type":318,"tag":409,"props":1639,"children":1640},{"style":1243},[1641],{"type":323,"value":1260},{"type":318,"tag":409,"props":1643,"children":1644},{"style":1263},[1645],{"type":323,"value":1646},"\"My annual customers\"",{"type":318,"tag":409,"props":1648,"children":1649},{"style":1243},[1650],{"type":323,"value":1271},{"type":318,"tag":409,"props":1652,"children":1653},{"class":411,"line":612},[1654,1659],{"type":318,"tag":409,"props":1655,"children":1656},{"style":1252},[1657],{"type":323,"value":1658},"        \"filter\"",{"type":318,"tag":409,"props":1660,"children":1661},{"style":1243},[1662],{"type":323,"value":1663},": [{\n",{"type":318,"tag":409,"props":1665,"children":1666},{"class":411,"line":621},[1667,1672,1676,1681],{"type":318,"tag":409,"props":1668,"children":1669},{"style":1252},[1670],{"type":323,"value":1671},"          \"attribute\"",{"type":318,"tag":409,"props":1673,"children":1674},{"style":1243},[1675],{"type":323,"value":1260},{"type":318,"tag":409,"props":1677,"children":1678},{"style":1263},[1679],{"type":323,"value":1680},"\"BILLING_INTERVAL\"",{"type":318,"tag":409,"props":1682,"children":1683},{"style":1243},[1684],{"type":323,"value":1271},{"type":318,"tag":409,"props":1686,"children":1687},{"class":411,"line":630},[1688,1693,1697,1702],{"type":318,"tag":409,"props":1689,"children":1690},{"style":1252},[1691],{"type":323,"value":1692},"          \"operand\"",{"type":318,"tag":409,"props":1694,"children":1695},{"style":1243},[1696],{"type":323,"value":1260},{"type":318,"tag":409,"props":1698,"children":1699},{"style":1263},[1700],{"type":323,"value":1701},"\"INCLUDES\"",{"type":318,"tag":409,"props":1703,"children":1704},{"style":1243},[1705],{"type":323,"value":1271},{"type":318,"tag":409,"props":1707,"children":1708},{"class":411,"line":639},[1709,1714,1719,1724],{"type":318,"tag":409,"props":1710,"children":1711},{"style":1252},[1712],{"type":323,"value":1713},"          \"value\"",{"type":318,"tag":409,"props":1715,"children":1716},{"style":1243},[1717],{"type":323,"value":1718},": [",{"type":318,"tag":409,"props":1720,"children":1721},{"style":1263},[1722],{"type":323,"value":1723},"\"YEAR\"",{"type":318,"tag":409,"props":1725,"children":1726},{"style":1243},[1727],{"type":323,"value":1728},"]\n",{"type":318,"tag":409,"props":1730,"children":1731},{"class":411,"line":648},[1732],{"type":318,"tag":409,"props":1733,"children":1734},{"style":1243},[1735],{"type":323,"value":1736},"        }]\n",{"type":318,"tag":409,"props":1738,"children":1739},{"class":411,"line":656},[1740],{"type":318,"tag":409,"props":1741,"children":1742},{"style":1243},[1743],{"type":323,"value":1498},{"type":318,"tag":409,"props":1745,"children":1746},{"class":411,"line":664},[1747,1752],{"type":318,"tag":409,"props":1748,"children":1749},{"style":1252},[1750],{"type":323,"value":1751},"      \"abTest\"",{"type":318,"tag":409,"props":1753,"children":1754},{"style":1243},[1755],{"type":323,"value":1284},{"type":318,"tag":409,"props":1757,"children":1758},{"class":411,"line":673},[1759,1763,1767,1772],{"type":318,"tag":409,"props":1760,"children":1761},{"style":1252},[1762],{"type":323,"value":1637},{"type":318,"tag":409,"props":1764,"children":1765},{"style":1243},[1766],{"type":323,"value":1260},{"type":318,"tag":409,"props":1768,"children":1769},{"style":1263},[1770],{"type":323,"value":1771},"\"A/B test for discount percentage\"",{"type":318,"tag":409,"props":1773,"children":1774},{"style":1243},[1775],{"type":323,"value":1271},{"type":318,"tag":409,"props":1777,"children":1778},{"class":411,"line":682},[1779,1784,1788],{"type":318,"tag":409,"props":1780,"children":1781},{"style":1252},[1782],{"type":323,"value":1783},"        \"id\"",{"type":318,"tag":409,"props":1785,"children":1786},{"style":1243},[1787],{"type":323,"value":1260},{"type":318,"tag":409,"props":1789,"children":1790},{"style":1263},[1791],{"type":323,"value":1792},"\"Unique ID for AB Test\"\n",{"type":318,"tag":409,"props":1794,"children":1795},{"class":411,"line":690},[1796],{"type":318,"tag":409,"props":1797,"children":1798},{"style":1243},[1799],{"type":323,"value":1800},"      }\n",{"type":318,"tag":409,"props":1802,"children":1803},{"class":411,"line":698},[1804],{"type":318,"tag":409,"props":1805,"children":1806},{"style":1243},[1807],{"type":323,"value":1808},"    }\n",{"type":318,"tag":409,"props":1810,"children":1811},{"class":411,"line":707},[1812],{"type":318,"tag":409,"props":1813,"children":1814},{"style":1243},[1815],{"type":323,"value":1816},"  }\n",{"type":318,"tag":409,"props":1818,"children":1819},{"class":411,"line":716},[1820],{"type":318,"tag":409,"props":1821,"children":1822},{"style":1243},[1823],{"type":323,"value":473},{"type":318,"tag":319,"props":1825,"children":1826},{},[1827,1829,1835,1837,1843],{"type":323,"value":1828},"If a customer accepts an offer through Churnkey, the ",{"type":318,"tag":405,"props":1830,"children":1832},{"className":1831},[],[1833],{"type":323,"value":1834},"data.session",{"type":323,"value":1836}," object will include an ",{"type":318,"tag":405,"props":1838,"children":1840},{"className":1839},[],[1841],{"type":323,"value":1842},"acceptedOffer",{"type":323,"value":1844}," property with information about the offer they accepted. Depending on the offer type, this object will look different.",{"type":318,"tag":1223,"props":1846,"children":1848},{"id":1847},"webhook-signature-verification",[1849],{"type":323,"value":1850},"Webhook Signature Verification",{"type":318,"tag":319,"props":1852,"children":1853},{},[1854],{"type":323,"value":1855},"For enhanced security and data integrity, every webhook sent by our service is accompanied by a signature. This allows you to verify that the webhook was genuinely sent from our servers.",{"type":318,"tag":319,"props":1857,"children":1858},{},[1859],{"type":318,"tag":341,"props":1860,"children":1861},{},[1862],{"type":323,"value":1863},"How We Sign Outgoing Webhooks",{"type":318,"tag":1865,"props":1866,"children":1867},"ol",{},[1868,1878,1899],{"type":318,"tag":363,"props":1869,"children":1870},{},[1871,1876],{"type":318,"tag":341,"props":1872,"children":1873},{},[1874],{"type":323,"value":1875},"Payload Stringification:",{"type":323,"value":1877}," We first convert the webhook payload to a string by using JSON stringify.",{"type":318,"tag":363,"props":1879,"children":1880},{},[1881,1886,1888,1897],{"type":318,"tag":341,"props":1882,"children":1883},{},[1884],{"type":323,"value":1885},"HMAC Computation:",{"type":323,"value":1887}," Using the SHA256 algorithm, an HMAC (Hash-based Message Authentication Code) is computed on the stringified payload. The secret key for this HMAC computation is the ",{"type":318,"tag":341,"props":1889,"children":1890},{},[1891],{"type":318,"tag":405,"props":1892,"children":1894},{"className":1893},[],[1895],{"type":323,"value":1896},"webhookSecret",{"type":323,"value":1898}," associated with your organization.",{"type":318,"tag":363,"props":1900,"children":1901},{},[1902,1907,1909,1918],{"type":318,"tag":341,"props":1903,"children":1904},{},[1905],{"type":323,"value":1906},"Header Attachment:",{"type":323,"value":1908}," The resulting hash from the HMAC computation is then attached to the outgoing webhook as a header named ",{"type":318,"tag":341,"props":1910,"children":1911},{},[1912],{"type":318,"tag":405,"props":1913,"children":1915},{"className":1914},[],[1916],{"type":323,"value":1917},"ck-signature",{"type":323,"value":1919},".",{"type":318,"tag":319,"props":1921,"children":1922},{},[1923],{"type":318,"tag":341,"props":1924,"children":1925},{},[1926],{"type":323,"value":1927},"How to Verify the Webhook Signature",{"type":318,"tag":319,"props":1929,"children":1930},{},[1931],{"type":323,"value":1932},"To verify the webhook signature on your end:",{"type":318,"tag":1865,"props":1934,"children":1935},{},[1936,1964,1984,2004],{"type":318,"tag":363,"props":1937,"children":1938},{},[1939,1944,1946,1954,1956,1963],{"type":318,"tag":341,"props":1940,"children":1941},{},[1942],{"type":323,"value":1943},"Retrieve the Secret:",{"type":323,"value":1945}," Get your ",{"type":318,"tag":341,"props":1947,"children":1948},{},[1949],{"type":318,"tag":405,"props":1950,"children":1952},{"className":1951},[],[1953],{"type":323,"value":1896},{"type":323,"value":1955}," from our service. This is your org secret key which can be found on ",{"type":318,"tag":334,"props":1957,"children":1960},{"href":1958,"rel":1959},"https://app.churnkey.co/settings/account",[338],[1961],{"type":323,"value":1962},"Churnkey | Settings | Account",{"type":323,"value":1919},{"type":318,"tag":363,"props":1965,"children":1966},{},[1967,1972,1974,1982],{"type":318,"tag":341,"props":1968,"children":1969},{},[1970],{"type":323,"value":1971},"Capture the Payload and Signature:",{"type":323,"value":1973}," When you receive a webhook, capture the payload (body) and the value of the ",{"type":318,"tag":341,"props":1975,"children":1976},{},[1977],{"type":318,"tag":405,"props":1978,"children":1980},{"className":1979},[],[1981],{"type":323,"value":1917},{"type":323,"value":1983}," header.",{"type":318,"tag":363,"props":1985,"children":1986},{},[1987,1992,1994,2002],{"type":318,"tag":341,"props":1988,"children":1989},{},[1990],{"type":323,"value":1991},"Compute the HMAC:",{"type":323,"value":1993}," Use the SHA256 algorithm to compute an HMAC on the payload, using your ",{"type":318,"tag":341,"props":1995,"children":1996},{},[1997],{"type":318,"tag":405,"props":1998,"children":2000},{"className":1999},[],[2001],{"type":323,"value":1896},{"type":323,"value":2003}," as the secret key.",{"type":318,"tag":363,"props":2005,"children":2006},{},[2007,2012,2014,2022],{"type":318,"tag":341,"props":2008,"children":2009},{},[2010],{"type":323,"value":2011},"Match the Signatures:",{"type":323,"value":2013}," Compare the computed HMAC value (from the previous step) with the ",{"type":318,"tag":341,"props":2015,"children":2016},{},[2017],{"type":318,"tag":405,"props":2018,"children":2020},{"className":2019},[],[2021],{"type":323,"value":1917},{"type":323,"value":2023}," value you captured. If the two match, then the webhook is verified and was genuinely sent by our service.",{"type":318,"tag":319,"props":2025,"children":2026},{},[2027],{"type":318,"tag":341,"props":2028,"children":2029},{},[2030],{"type":323,"value":2031},"Node.js Code Example",{"type":318,"tag":398,"props":2033,"children":2037},{"className":2034,"code":2035,"language":2036,"meta":313,"style":313},"language-jsx shiki shiki-themes github-light-default github-light-default github-dark-default","const crypto = require('crypto');\n// find your account secret under Cancel Flow API Key: https://app.churnkey.co/settings/account\nfunction verifyWebhookSignature(payload, receivedSignature, secret) {\n  // Compute the HMAC\n  const computedHmac = crypto.createHmac('sha256', secret).update(JSON.stringify(payload)).digest('hex');\n\n  // Compare the computed HMAC with the received signature\n  return computedHmac === receivedSignature;\n}\n\n// Usage:\nconst payload = req.body; // assuming you are using a body-parser middleware in Express.js\nconst receivedSignature = req.headers['ck-signature'];\nconst secret = 'YOUR_WEBHOOK_SECRET'; // Retrieve this from our service or your configuration\n\nif (verifyWebhookSignature(payload, receivedSignature, secret)) {\n  console.log('Webhook signature is valid!');\n} else {\n  console.log('Webhook signature is invalid or has been tampered with.');\n}\n","jsx",[2038],{"type":318,"tag":405,"props":2039,"children":2040},{"__ignoreMap":313},[2041,2049,2057,2065,2073,2081,2088,2096,2104,2111,2118,2126,2134,2142,2150,2157,2165,2173,2181,2189],{"type":318,"tag":409,"props":2042,"children":2043},{"class":411,"line":412},[2044],{"type":318,"tag":409,"props":2045,"children":2046},{},[2047],{"type":323,"value":2048},"const crypto = require('crypto');\n",{"type":318,"tag":409,"props":2050,"children":2051},{"class":411,"line":422},[2052],{"type":318,"tag":409,"props":2053,"children":2054},{},[2055],{"type":323,"value":2056},"// find your account secret under Cancel Flow API Key: https://app.churnkey.co/settings/account\n",{"type":318,"tag":409,"props":2058,"children":2059},{"class":411,"line":431},[2060],{"type":318,"tag":409,"props":2061,"children":2062},{},[2063],{"type":323,"value":2064},"function verifyWebhookSignature(payload, receivedSignature, secret) {\n",{"type":318,"tag":409,"props":2066,"children":2067},{"class":411,"line":440},[2068],{"type":318,"tag":409,"props":2069,"children":2070},{},[2071],{"type":323,"value":2072},"  // Compute the HMAC\n",{"type":318,"tag":409,"props":2074,"children":2075},{"class":411,"line":449},[2076],{"type":318,"tag":409,"props":2077,"children":2078},{},[2079],{"type":323,"value":2080},"  const computedHmac = crypto.createHmac('sha256', secret).update(JSON.stringify(payload)).digest('hex');\n",{"type":318,"tag":409,"props":2082,"children":2083},{"class":411,"line":458},[2084],{"type":318,"tag":409,"props":2085,"children":2086},{"emptyLinePlaceholder":416},[2087],{"type":323,"value":419},{"type":318,"tag":409,"props":2089,"children":2090},{"class":411,"line":467},[2091],{"type":318,"tag":409,"props":2092,"children":2093},{},[2094],{"type":323,"value":2095},"  // Compare the computed HMAC with the received signature\n",{"type":318,"tag":409,"props":2097,"children":2098},{"class":411,"line":476},[2099],{"type":318,"tag":409,"props":2100,"children":2101},{},[2102],{"type":323,"value":2103},"  return computedHmac === receivedSignature;\n",{"type":318,"tag":409,"props":2105,"children":2106},{"class":411,"line":484},[2107],{"type":318,"tag":409,"props":2108,"children":2109},{},[2110],{"type":323,"value":473},{"type":318,"tag":409,"props":2112,"children":2113},{"class":411,"line":493},[2114],{"type":318,"tag":409,"props":2115,"children":2116},{"emptyLinePlaceholder":416},[2117],{"type":323,"value":419},{"type":318,"tag":409,"props":2119,"children":2120},{"class":411,"line":502},[2121],{"type":318,"tag":409,"props":2122,"children":2123},{},[2124],{"type":323,"value":2125},"// Usage:\n",{"type":318,"tag":409,"props":2127,"children":2128},{"class":411,"line":511},[2129],{"type":318,"tag":409,"props":2130,"children":2131},{},[2132],{"type":323,"value":2133},"const payload = req.body; // assuming you are using a body-parser middleware in Express.js\n",{"type":318,"tag":409,"props":2135,"children":2136},{"class":411,"line":519},[2137],{"type":318,"tag":409,"props":2138,"children":2139},{},[2140],{"type":323,"value":2141},"const receivedSignature = req.headers['ck-signature'];\n",{"type":318,"tag":409,"props":2143,"children":2144},{"class":411,"line":527},[2145],{"type":318,"tag":409,"props":2146,"children":2147},{},[2148],{"type":323,"value":2149},"const secret = 'YOUR_WEBHOOK_SECRET'; // Retrieve this from our service or your configuration\n",{"type":318,"tag":409,"props":2151,"children":2152},{"class":411,"line":536},[2153],{"type":318,"tag":409,"props":2154,"children":2155},{"emptyLinePlaceholder":416},[2156],{"type":323,"value":419},{"type":318,"tag":409,"props":2158,"children":2159},{"class":411,"line":544},[2160],{"type":318,"tag":409,"props":2161,"children":2162},{},[2163],{"type":323,"value":2164},"if (verifyWebhookSignature(payload, receivedSignature, secret)) {\n",{"type":318,"tag":409,"props":2166,"children":2167},{"class":411,"line":553},[2168],{"type":318,"tag":409,"props":2169,"children":2170},{},[2171],{"type":323,"value":2172},"  console.log('Webhook signature is valid!');\n",{"type":318,"tag":409,"props":2174,"children":2175},{"class":411,"line":561},[2176],{"type":318,"tag":409,"props":2177,"children":2178},{},[2179],{"type":323,"value":2180},"} else {\n",{"type":318,"tag":409,"props":2182,"children":2183},{"class":411,"line":569},[2184],{"type":318,"tag":409,"props":2185,"children":2186},{},[2187],{"type":323,"value":2188},"  console.log('Webhook signature is invalid or has been tampered with.');\n",{"type":318,"tag":409,"props":2190,"children":2191},{"class":411,"line":578},[2192],{"type":318,"tag":409,"props":2193,"children":2194},{},[2195],{"type":323,"value":473},{"type":318,"tag":319,"props":2197,"children":2198},{},[2199,2201],{"type":323,"value":2200},"For more code examples, please check the server side HMAC signing on ",{"type":318,"tag":334,"props":2202,"children":2203},{"href":19},[2204],{"type":323,"value":2205},"Installing Churnkey",{"type":318,"tag":1223,"props":2207,"children":2209},{"id":2208},"pause-offer-accepted",[2210],{"type":323,"value":2211},"Pause offer accepted",{"type":318,"tag":398,"props":2213,"children":2215},{"className":1231,"code":2214,"language":1233,"meta":313,"style":313},"{\n  \"offerType\": \"PAUSE\",\n  \"pauseDuration\": 2 // pause duration in months\n}\n",[2216],{"type":318,"tag":405,"props":2217,"children":2218},{"__ignoreMap":313},[2219,2226,2246,2267],{"type":318,"tag":409,"props":2220,"children":2221},{"class":411,"line":412},[2222],{"type":318,"tag":409,"props":2223,"children":2224},{"style":1243},[2225],{"type":323,"value":1246},{"type":318,"tag":409,"props":2227,"children":2228},{"class":411,"line":422},[2229,2234,2238,2242],{"type":318,"tag":409,"props":2230,"children":2231},{"style":1252},[2232],{"type":323,"value":2233},"  \"offerType\"",{"type":318,"tag":409,"props":2235,"children":2236},{"style":1243},[2237],{"type":323,"value":1260},{"type":318,"tag":409,"props":2239,"children":2240},{"style":1263},[2241],{"type":323,"value":1577},{"type":318,"tag":409,"props":2243,"children":2244},{"style":1243},[2245],{"type":323,"value":1271},{"type":318,"tag":409,"props":2247,"children":2248},{"class":411,"line":431},[2249,2254,2258,2262],{"type":318,"tag":409,"props":2250,"children":2251},{"style":1252},[2252],{"type":323,"value":2253},"  \"pauseDuration\"",{"type":318,"tag":409,"props":2255,"children":2256},{"style":1243},[2257],{"type":323,"value":1260},{"type":318,"tag":409,"props":2259,"children":2260},{"style":1444},[2261],{"type":323,"value":1598},{"type":318,"tag":409,"props":2263,"children":2264},{"style":1358},[2265],{"type":323,"value":2266}," // pause duration in months\n",{"type":318,"tag":409,"props":2268,"children":2269},{"class":411,"line":440},[2270],{"type":318,"tag":409,"props":2271,"children":2272},{"style":1243},[2273],{"type":323,"value":473},{"type":318,"tag":1223,"props":2275,"children":2277},{"id":2276},"discount-offer-accepted",[2278],{"type":323,"value":2279},"Discount offer accepted",{"type":318,"tag":398,"props":2281,"children":2283},{"className":1231,"code":2282,"language":1233,"meta":313,"style":313},"{\n  \"offerType\": \"DISCOUNT\",\n  \"couponId\": \"my_coupon_id\", // coupon Id in Stripe/Chargebee, discount ID in Braintree\n  \"couponType\": \"PERCENT\", // PERCENT or AMOUNT\n  \"couponAmount\": 30,\n  \"couponDuration\": 2 // coupon duration in months - null if forever coupon\n}\n",[2284],{"type":318,"tag":405,"props":2285,"children":2286},{"__ignoreMap":313},[2287,2294,2314,2340,2366,2387,2408],{"type":318,"tag":409,"props":2288,"children":2289},{"class":411,"line":412},[2290],{"type":318,"tag":409,"props":2291,"children":2292},{"style":1243},[2293],{"type":323,"value":1246},{"type":318,"tag":409,"props":2295,"children":2296},{"class":411,"line":422},[2297,2301,2305,2310],{"type":318,"tag":409,"props":2298,"children":2299},{"style":1252},[2300],{"type":323,"value":2233},{"type":318,"tag":409,"props":2302,"children":2303},{"style":1243},[2304],{"type":323,"value":1260},{"type":318,"tag":409,"props":2306,"children":2307},{"style":1263},[2308],{"type":323,"value":2309},"\"DISCOUNT\"",{"type":318,"tag":409,"props":2311,"children":2312},{"style":1243},[2313],{"type":323,"value":1271},{"type":318,"tag":409,"props":2315,"children":2316},{"class":411,"line":431},[2317,2322,2326,2331,2335],{"type":318,"tag":409,"props":2318,"children":2319},{"style":1252},[2320],{"type":323,"value":2321},"  \"couponId\"",{"type":318,"tag":409,"props":2323,"children":2324},{"style":1243},[2325],{"type":323,"value":1260},{"type":318,"tag":409,"props":2327,"children":2328},{"style":1263},[2329],{"type":323,"value":2330},"\"my_coupon_id\"",{"type":318,"tag":409,"props":2332,"children":2333},{"style":1243},[2334],{"type":323,"value":1355},{"type":318,"tag":409,"props":2336,"children":2337},{"style":1358},[2338],{"type":323,"value":2339},"// coupon Id in Stripe/Chargebee, discount ID in Braintree\n",{"type":318,"tag":409,"props":2341,"children":2342},{"class":411,"line":440},[2343,2348,2352,2357,2361],{"type":318,"tag":409,"props":2344,"children":2345},{"style":1252},[2346],{"type":323,"value":2347},"  \"couponType\"",{"type":318,"tag":409,"props":2349,"children":2350},{"style":1243},[2351],{"type":323,"value":1260},{"type":318,"tag":409,"props":2353,"children":2354},{"style":1263},[2355],{"type":323,"value":2356},"\"PERCENT\"",{"type":318,"tag":409,"props":2358,"children":2359},{"style":1243},[2360],{"type":323,"value":1355},{"type":318,"tag":409,"props":2362,"children":2363},{"style":1358},[2364],{"type":323,"value":2365},"// PERCENT or AMOUNT\n",{"type":318,"tag":409,"props":2367,"children":2368},{"class":411,"line":449},[2369,2374,2378,2383],{"type":318,"tag":409,"props":2370,"children":2371},{"style":1252},[2372],{"type":323,"value":2373},"  \"couponAmount\"",{"type":318,"tag":409,"props":2375,"children":2376},{"style":1243},[2377],{"type":323,"value":1260},{"type":318,"tag":409,"props":2379,"children":2380},{"style":1444},[2381],{"type":323,"value":2382},"30",{"type":318,"tag":409,"props":2384,"children":2385},{"style":1243},[2386],{"type":323,"value":1271},{"type":318,"tag":409,"props":2388,"children":2389},{"class":411,"line":458},[2390,2395,2399,2403],{"type":318,"tag":409,"props":2391,"children":2392},{"style":1252},[2393],{"type":323,"value":2394},"  \"couponDuration\"",{"type":318,"tag":409,"props":2396,"children":2397},{"style":1243},[2398],{"type":323,"value":1260},{"type":318,"tag":409,"props":2400,"children":2401},{"style":1444},[2402],{"type":323,"value":1598},{"type":318,"tag":409,"props":2404,"children":2405},{"style":1358},[2406],{"type":323,"value":2407}," // coupon duration in months - null if forever coupon\n",{"type":318,"tag":409,"props":2409,"children":2410},{"class":411,"line":467},[2411],{"type":318,"tag":409,"props":2412,"children":2413},{"style":1243},[2414],{"type":323,"value":473},{"type":318,"tag":347,"props":2416,"children":2418},{"id":2417},"dunning-webhook-data",[2419],{"type":323,"value":2420},"Dunning Webhook Data",{"type":318,"tag":319,"props":2422,"children":2423},{},[2424,2426,2432,2434,2440,2442,2448,2449,2455,2456,2462],{"type":323,"value":2425},"If you have webhooks enabled and use dunning, Churnkey will stream email event notifications to your webhook URL. There are multiple events for each email based on the recipient’s actions. Potential ",{"type":318,"tag":405,"props":2427,"children":2429},{"className":2428},[],[2430],{"type":323,"value":2431},"action",{"type":323,"value":2433}," values are ",{"type":318,"tag":405,"props":2435,"children":2437},{"className":2436},[],[2438],{"type":323,"value":2439},"DELIVERY",{"type":323,"value":2441},", ",{"type":318,"tag":405,"props":2443,"children":2445},{"className":2444},[],[2446],{"type":323,"value":2447},"BOUNCE",{"type":323,"value":2441},{"type":318,"tag":405,"props":2450,"children":2452},{"className":2451},[],[2453],{"type":323,"value":2454},"OPEN",{"type":323,"value":2441},{"type":318,"tag":405,"props":2457,"children":2459},{"className":2458},[],[2460],{"type":323,"value":2461},"CLICK",{"type":323,"value":1919},{"type":318,"tag":398,"props":2464,"children":2466},{"className":1231,"code":2465,"language":1233,"meta":313,"style":313},"{\n  \"event\": \"dunning\",\n  \"data\": {\n    \"email\": {\n      \"emailTo\": \"john.doe@gmail.com\",\n      \"subject\": \"Need help with your subscription?\",\n      \"from\": \"info@acme.com\",\n      \"action\": \"DELIVERY\", // DELIVERY, BOUNCE, OPEN, or CLICK\n      \"emailCount\": 2, // This emails order in the campaign\n      \"emailsRemaining\": 3 // Emails remaining in campaign\n    },\n    \"customer\": \"cus_XXXXXXXXXXXX\",\n    \"invoice\": \"inv_XXXXXXXXXXXX\"\n  }\n}\n",[2467],{"type":318,"tag":405,"props":2468,"children":2469},{"__ignoreMap":313},[2470,2477,2497,2508,2520,2541,2562,2583,2609,2634,2656,2664,2684,2701,2708],{"type":318,"tag":409,"props":2471,"children":2472},{"class":411,"line":412},[2473],{"type":318,"tag":409,"props":2474,"children":2475},{"style":1243},[2476],{"type":323,"value":1246},{"type":318,"tag":409,"props":2478,"children":2479},{"class":411,"line":422},[2480,2484,2488,2493],{"type":318,"tag":409,"props":2481,"children":2482},{"style":1252},[2483],{"type":323,"value":1255},{"type":318,"tag":409,"props":2485,"children":2486},{"style":1243},[2487],{"type":323,"value":1260},{"type":318,"tag":409,"props":2489,"children":2490},{"style":1263},[2491],{"type":323,"value":2492},"\"dunning\"",{"type":318,"tag":409,"props":2494,"children":2495},{"style":1243},[2496],{"type":323,"value":1271},{"type":318,"tag":409,"props":2498,"children":2499},{"class":411,"line":431},[2500,2504],{"type":318,"tag":409,"props":2501,"children":2502},{"style":1252},[2503],{"type":323,"value":1279},{"type":318,"tag":409,"props":2505,"children":2506},{"style":1243},[2507],{"type":323,"value":1284},{"type":318,"tag":409,"props":2509,"children":2510},{"class":411,"line":440},[2511,2516],{"type":318,"tag":409,"props":2512,"children":2513},{"style":1252},[2514],{"type":323,"value":2515},"    \"email\"",{"type":318,"tag":409,"props":2517,"children":2518},{"style":1243},[2519],{"type":323,"value":1284},{"type":318,"tag":409,"props":2521,"children":2522},{"class":411,"line":449},[2523,2528,2532,2537],{"type":318,"tag":409,"props":2524,"children":2525},{"style":1252},[2526],{"type":323,"value":2527},"      \"emailTo\"",{"type":318,"tag":409,"props":2529,"children":2530},{"style":1243},[2531],{"type":323,"value":1260},{"type":318,"tag":409,"props":2533,"children":2534},{"style":1263},[2535],{"type":323,"value":2536},"\"john.doe@gmail.com\"",{"type":318,"tag":409,"props":2538,"children":2539},{"style":1243},[2540],{"type":323,"value":1271},{"type":318,"tag":409,"props":2542,"children":2543},{"class":411,"line":458},[2544,2549,2553,2558],{"type":318,"tag":409,"props":2545,"children":2546},{"style":1252},[2547],{"type":323,"value":2548},"      \"subject\"",{"type":318,"tag":409,"props":2550,"children":2551},{"style":1243},[2552],{"type":323,"value":1260},{"type":318,"tag":409,"props":2554,"children":2555},{"style":1263},[2556],{"type":323,"value":2557},"\"Need help with your subscription?\"",{"type":318,"tag":409,"props":2559,"children":2560},{"style":1243},[2561],{"type":323,"value":1271},{"type":318,"tag":409,"props":2563,"children":2564},{"class":411,"line":467},[2565,2570,2574,2579],{"type":318,"tag":409,"props":2566,"children":2567},{"style":1252},[2568],{"type":323,"value":2569},"      \"from\"",{"type":318,"tag":409,"props":2571,"children":2572},{"style":1243},[2573],{"type":323,"value":1260},{"type":318,"tag":409,"props":2575,"children":2576},{"style":1263},[2577],{"type":323,"value":2578},"\"info@acme.com\"",{"type":318,"tag":409,"props":2580,"children":2581},{"style":1243},[2582],{"type":323,"value":1271},{"type":318,"tag":409,"props":2584,"children":2585},{"class":411,"line":476},[2586,2591,2595,2600,2604],{"type":318,"tag":409,"props":2587,"children":2588},{"style":1252},[2589],{"type":323,"value":2590},"      \"action\"",{"type":318,"tag":409,"props":2592,"children":2593},{"style":1243},[2594],{"type":323,"value":1260},{"type":318,"tag":409,"props":2596,"children":2597},{"style":1263},[2598],{"type":323,"value":2599},"\"DELIVERY\"",{"type":318,"tag":409,"props":2601,"children":2602},{"style":1243},[2603],{"type":323,"value":1355},{"type":318,"tag":409,"props":2605,"children":2606},{"style":1358},[2607],{"type":323,"value":2608},"// DELIVERY, BOUNCE, OPEN, or CLICK\n",{"type":318,"tag":409,"props":2610,"children":2611},{"class":411,"line":484},[2612,2617,2621,2625,2629],{"type":318,"tag":409,"props":2613,"children":2614},{"style":1252},[2615],{"type":323,"value":2616},"      \"emailCount\"",{"type":318,"tag":409,"props":2618,"children":2619},{"style":1243},[2620],{"type":323,"value":1260},{"type":318,"tag":409,"props":2622,"children":2623},{"style":1444},[2624],{"type":323,"value":1598},{"type":318,"tag":409,"props":2626,"children":2627},{"style":1243},[2628],{"type":323,"value":1355},{"type":318,"tag":409,"props":2630,"children":2631},{"style":1358},[2632],{"type":323,"value":2633},"// This emails order in the campaign\n",{"type":318,"tag":409,"props":2635,"children":2636},{"class":411,"line":493},[2637,2642,2646,2651],{"type":318,"tag":409,"props":2638,"children":2639},{"style":1252},[2640],{"type":323,"value":2641},"      \"emailsRemaining\"",{"type":318,"tag":409,"props":2643,"children":2644},{"style":1243},[2645],{"type":323,"value":1260},{"type":318,"tag":409,"props":2647,"children":2648},{"style":1444},[2649],{"type":323,"value":2650},"3",{"type":318,"tag":409,"props":2652,"children":2653},{"style":1358},[2654],{"type":323,"value":2655}," // Emails remaining in campaign\n",{"type":318,"tag":409,"props":2657,"children":2658},{"class":411,"line":502},[2659],{"type":318,"tag":409,"props":2660,"children":2661},{"style":1243},[2662],{"type":323,"value":2663},"    },\n",{"type":318,"tag":409,"props":2665,"children":2666},{"class":411,"line":511},[2667,2671,2675,2680],{"type":318,"tag":409,"props":2668,"children":2669},{"style":1252},[2670],{"type":323,"value":1292},{"type":318,"tag":409,"props":2672,"children":2673},{"style":1243},[2674],{"type":323,"value":1260},{"type":318,"tag":409,"props":2676,"children":2677},{"style":1263},[2678],{"type":323,"value":2679},"\"cus_XXXXXXXXXXXX\"",{"type":318,"tag":409,"props":2681,"children":2682},{"style":1243},[2683],{"type":323,"value":1271},{"type":318,"tag":409,"props":2685,"children":2686},{"class":411,"line":519},[2687,2692,2696],{"type":318,"tag":409,"props":2688,"children":2689},{"style":1252},[2690],{"type":323,"value":2691},"    \"invoice\"",{"type":318,"tag":409,"props":2693,"children":2694},{"style":1243},[2695],{"type":323,"value":1260},{"type":318,"tag":409,"props":2697,"children":2698},{"style":1263},[2699],{"type":323,"value":2700},"\"inv_XXXXXXXXXXXX\"\n",{"type":318,"tag":409,"props":2702,"children":2703},{"class":411,"line":527},[2704],{"type":318,"tag":409,"props":2705,"children":2706},{"style":1243},[2707],{"type":323,"value":1816},{"type":318,"tag":409,"props":2709,"children":2710},{"class":411,"line":536},[2711],{"type":318,"tag":409,"props":2712,"children":2713},{"style":1243},[2714],{"type":323,"value":473},{"type":318,"tag":2716,"props":2717,"children":2718},"style",{},[2719],{"type":323,"value":2720},"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":431,"depth":431,"links":2722},[2723,2724,2730],{"id":349,"depth":422,"text":352},{"id":388,"depth":422,"text":391,"children":2725},[2726,2727,2728,2729],{"id":1225,"depth":431,"text":1228},{"id":1847,"depth":431,"text":1850},{"id":2208,"depth":431,"text":2211},{"id":2276,"depth":431,"text":2279},{"id":2417,"depth":422,"text":2420},"markdown","content","6.data-integrations/2.webhooks.md","6.data-integrations/2.webhooks","md",{"loc":227},[2738,2739],{"_path":222,"title":221,"description":224},{"_path":232,"title":231,"description":234},1775515570375]