---
title: Maxio
description: Integrate Churnkey with your Maxio (formerly Chargify) account
---

## How to Connect Your Maxio Account

After you register for a Churnkey account, you can connect it to your Maxio account on our [Settings | Billing Provider](https://app.churnkey.co/settings/billing-provider) page. You can enter both test site and live site credentials. The test credentials are optional, but recommended for testing your Cancel Flow in a staging environment before going live with Churnkey.

[**Manage Maxio Connection in Churnkey**](https://app.churnkey.co/settings/billing-provider)

### Step 1. Creating an API Key

Your API key is used to apply pauses, discounts, and cancellations to customer subscriptions on your behalf. Here's how to generate one:

1. [Log in to your Maxio account](https://app.chargify.com/login)
2. Navigate to Config - Integrations - API Keys
3. Click "New API Key"
4. Copy the API Key
5. Add the API Key to your Churnkey account on the [Billing Provider Settings page](https://app.churnkey.co/settings/billing-provider)
6. Recommended: Once an API key is created, you can navigate back to the API Keys page and add a description to it to help you identify it as the Churnkey API key.

## How is the Maxio connection used?

### I. Add discounts to your Cancel Flow

::alert{type="warning" emoji="💡"}
**Coupons in Test Mode**
When testing coupons in your flow in test mode, we recommend creating coupons in your Maxio test site with the same code as your production coupons. For example, if you have a coupon code "40-OFF-2-MONTHS" in production, create an identical coupon in your test site with the same code.
::

After connecting Maxio, you will be able to offer discounts in your Cancel Flow. While building your flow, note that coupons are only pulled from your live Maxio account, not the test site that you connected.

1. In the "Offers" tab of the flow builder, select "Apply Maxio Coupon"
2. Choose your desired coupon from the "Maxio Coupon" dropdown

### II. Personalize Cancel Flows with customer attributes and segmentation

Create targeted Cancel Flows using customer segmentation based on subscription attributes. This allows you to provide different experiences for different customer segments.

**Available attributes for segmentation**

- Product
- Price Point
- Subscription age
- Subscription creation date
- Billing interval (monthly, quarterly, annual, etc)
- Trial vs Active subscription

### III. Updating customer subscriptions

Churnkey manages subscription updates automatically when customers interact with your Cancel Flow. Here are the actions Churnkey can perform:

#### Pause a Subscription

Churnkey implements subscription pausing through Maxio's hold functionality. When a customer pauses their subscription:
- The subscription status is changed to `on_hold`
- A resume date is set based on the selected pause duration
- Billing is suspended until the resume date

You can configure maximum pause durations in your offboarding flow settings.

#### Apply a Discount

Discounts are applied to customer subscriptions using Maxio's coupon system. An existing subscription can accommodate multiple discounts/coupon codes. This is only applicable if each coupon is stackable. For more information on stackable coupons, we recommend reviewing [Maxio's coupon documentation](https://maxio.zendesk.com/hc/en-us/articles/24261259337101-Coupons-and-Subscriptions#stackability-rules).

#### Cancel a Subscription

By default, Churnkey sets subscriptions to cancel at period end using Maxio's `initiateDelayedCancellation` method. Immediate cancellation is also available, which uses the `cancelSubscription` method from Maxio's API.

#### Switch Plans

Plan changes are handled through Maxio's `migrateSubscriptionProduct` method. Optionally, you can choose to `preservePeriod` by setting the proration setting to `true` in [Churnkey Cancel Flow Settings](https://app.churnkey.co/cancellation/advanced-settings).
