Back

BrainTree

Integrate BrainTree with Churn Solution

How to connect BrainTree and Churn Solution:

Once you sign up for a Churn Solution account, you can connect your company with your live BrainTree account through our Network Page. You'll need your public and private keys to connect your Braintree account.

Step 1: Braintree User with Proper Permissions

To connect with Churn Solution, you’ll need to provide the Private and Public API keys for your user. Make sure this user has admin permissions or the necessary role and user permissions. Each Braintree API key is connected to a specific user, and every user has an assigned role. You can see all users connected to your Braintree account on the Team page of the Braintree dashboard.

Two Ways to Obtain API Credentials:

Option A: Use an Account Admin

Ensure you are logged in as a user with Account Admin and API Access permissions (as shown below).

Option B: Create a New User and Role for Churn Solution

If you'd prefer to create a new user and role, ensure it has the permissions listed below.

Required Role Permissions:

  • Transactions
  • Customer Management
  • Recurring Billing
  • Webhooks

Example of a role with sufficient permissions.

Required User Permissions:

If you're setting up a new user, assign them the Account Admin role or the newly created Churn Solution role with the following permissions, as shown below:

  • API Access
  • Roles (either Account Admin or the Churn Solution Role with the necessary permissions)
  • Merchant Accounts - All

Step 2: Generate an API Key

  1. Navigate to API Settings by clicking the gear icon in the top right corner and selecting API.
  2. Click on + Generate New API Key to create a new key.
  3. Click View next to your new API key to reveal the private and the public key.

Step 3. Add API Credentials to Churn Solution

The API credentials public key and private key can be connected to your Churn Solution account on the Billing Provider Settings page or via Manage Connection switcher on the dashboard by adding new connection.

Step 4. Add Webhook Notifications

To enable Churn Solution to monitor reactivation rates (including pauses and discounts) and track total boosted revenue from your cancel flow, you'll need to set up a webhook in your Braintree account.

To do that

  1. Go to the Webhooks tab on the API Management settings page in Braintree.
  2. Add a webhook using the URL: https://webhooks-handler.churnsolution.com/braintree_connect?appId=YOUR_CHURNSOLUTION_APP_ID (replace YOUR_CHURNSOLUTION_APP_ID with your actual App ID, which you can find on your Churn Solution Integration page).

Ensure you enable notifications for all subscription events. As shown below

After your account is successfully connected, you'll see a label indicating that the connection was successful and your data will begin to be imported into Churn Solution.

How is BrainTree used with Churn Solution?

Audience Segmentation

With segmentation, you can target specific customers based on subscription attributes and give them customized cancel flows.

Churn Solution imports Customers, Subscriptions, Coupons and Plans from Braintree.

Available segmentation attributes

  • Plan
  • Subscription Status
  • Subscription Price
  • Subscription Start Date
  • Billing Interval
  • Subscription Age
  • Subscription Discounts
You can also segment your customers with custom attributes by passing it through the session api for each customer

Updating Customer Subscriptions

When a customer goes through your cancellation flow and accepts a pause or discount offer, Churn Solution manages the billing updates for you. Here’s what Churn Solution can do on your behalf:

Pause a Subscription:

Braintree does not have a native “pause” feature. Churn Solution emulates a pause by applying a 100% discount temporarily, this will be done by creating a discount in your Braintree dashboard with the ID CHURNSOLUTION_PAUSE.

If a customer chooses to pause their account during the cancellation flow, Churn Solution will apply a discount equal to the subscription price, effectively creating a 100% discount for the chosen duration.

To implement a custom pause function, use the handlePause callback (refer to Custom Callbacks for details).

Apply Discounts

Braintree does not support percentage discounts and has limited customization options for fixed amount discounts. Churn Solution allows you to overcome these limitations by creating a discount in your Braintree dashboard with the ID CHURNSOLUTION_BASE_DISCOUNT.

After you connect Braintree, you’ll be able to offer your customers discounts as part of your cancel flow.

In the Offers page of the cancellation flow, follow these steps to select a Coupon offer:

  1. Select Coupon ID: Choose the desired coupon ID from the drop-down menu labelled Braintree Coupon. If a recently added coupon doesn't appear in Churn Solution, click Reload Coupons to refresh the list.
  2. Add Discounts: Since Braintree doesn’t support fixed amount or percentage discounts directly, Churn Solution can handle this for you. Create a discount in the Braintree dashboard with the ID CHURNSOLUTION_BASE_DISCOUNT.
    • Click Add Coupon to choose whether to add a fixed amount discount (specify the amount off and whether it is one-time, recurring, or indefinite) or a percentage discount (specify the percentage off and its duration) as shown below.
  3. Customers who applied to this cancellation flow will be able to claim the coupon you offer.

If you would like to implement a customer function for applying discounts, you can do so using the handleDiscount callback (see Custom Callbacks).

When setting up your flows, ensure you specify how many times users can claim discounts and pause offers. You can manage these settings through the offer redemption options)

Cancel Subscription

Churn Solution handles cancellation subscriptions for your customers. This is done by cancelling the subscription immediately. Subscriptions are cancelled right away. you can also manage the cancellation settings to be at the end of the billing period

If you prefer to implement a customized function for canceling subscriptions, you can do so using the handleCancel callback (refer to Custom Callbacks).

Calculating boosted revenues:

After connect your Braintree account, you can track your customer reactivations and boosted revenue, which refers to the additional income generated from customers who stayed subscribed rather than canceling after entering the cancellation flow.

Be sure to add the webhook handler to your Braintree dashboard to enable us to track all relevant statistics for you.

You can track boosted revenue on your Churn Solution dashboard.

Scroll to Top