Getting Started

Building Blocks

Custom Fields

Subscription Features

Localization

Invoices

Credits

Order Management

Billing Features

Taxes

Payment Methods

Direct Debit Payments

Configuring Gateways

Revenue Recovery

Chargebee Moments(Checkout and Portal)

Notifications

Reports and Analytics

Data Privacy & Security

Fraud Management

Migration

Open Source Resources

Other Features

API Integration

Third Party Integrations

LeadDyno 

LeadDyno is a major stakeholder in affiliate marketing, allowing you to automate lead conversions, cancellations and affiliate compensations for purchases made via Chargebee.

Using this seamless integration, you can send transaction details to LeadDyno along with the affiliate id and track the affiliate's conversion and commission.

In-app Checkout users 

If you are using Chargebee's in-app checkout, follow the steps below to set up the integration

1) Add Drop in script

Add the following code to the head tag of your website,

<script type="text/javascript" src="https://static.leaddyno.com/js"> </script>

<script>
LeadDyno.key="PUBLIC_API_Key"; // public LeadDyno API key
LeadDyno.recordVisit();
LeadDyno.autoWatch();

$( document ).ready(function() {
var trackingId = LeadDyno.devTools.getTrackingId();
var cbInstance = Chargebee.getInstance();
var cart = cbInstance.getCart();
cart.setAffiliateToken(trackingId); //for Chargebee to track the affiliate id and pass it in subscription information
});
</script>

2) Configure a webhook in Chargebee

Navigate to the Webhook Settings page in Chargebee, and then,

  1. Create a new webhook named "LeadDyno"
  2. Enter the Webhook URL as: https://collector.leaddyno.com/chargebee_webhook?key= (Replace it with your private LeadDyno API key)
  3. Keep the other configurations unchanged and click Create Webhook.

Completing the above setup will enable LeadDyno to track any lead conversions or cancellations made and even calculate the affiliate compensation for purchases.

Full page Checkout users 

If you are using Chargebee's full page checkout, follow the steps below to set up the integration

1) Add Drop in script

Add the following code to the head tag of your website,

<script type="text/javascript" src="https://static.leaddyno.com/js"> </script>

<script>
LeadDyno.key="YOUR PUBLIC KEY"; // public LeadDyno API key
LeadDyno.recordVisit();
LeadDyno.autoWatch();
LeadDyno.initChargebee(); // <-- updates all Chargebee links with tracking id
</script>

2) Configure a webhook in Chargebee

Follow the steps given above for In-app Checkout.

Completing the above setup will enable LeadDyno to track any lead conversions or cancellations made and even calculate the affiliate compensation for purchases.

API based Checkout Integration 

If you are completely accessing Chargebee using API, there is an extra step you need to take for completing the integration.

Input LeadDyno Affiliate ID as parameter. It can be retrieved from LeadDyno's Javascript API .

1) Add Drop in script

To set up visitor and conversion tracking, copy the following code and add it to the head tag of your website.

<script type="text/javascript" src="https://static.leaddyno.com/js"> </script>

<script>
LeadDyno.key="YOUR PUBLIC KEY"; // public LeadDyno API key
LeadDyno.recordVisit();
LeadDyno.autoWatch();

</script>

2) Identify the Affiliate ID for the visitor

LeadDyno's Javascript library helps in identifying the Affiliate ID of any visit through an affiliate with the help of their JS library.

var affiliateId = LeadDyno.devTools.getTrackingId();

*3) Pass the affiliate id to Chargebee Subscription creation API *

While calling ‘Create Subscription API' for creating a subscription in Chargebee, pass this Affiliate ID as "affiliate_token".

4) Configure a webhook in Chargebee

Follow the steps given above for In-app Checkout.

Completing the above setup will enable LeadDyno to track any lead conversions or cancellations made and even calculate the affiliate compensation for purchases.

FAQs 

1) Can I choose to give different commissions to different affiliates?
Yes, you can choose to give different commissions to different affiliates. To do this, create an affiliate in LeadDyno and assign the affiliate to an affiliate type. While creating a commission rule, choose this particular affiliate type, the selected commission rule will then be applied to all affiliate transactions made through the Affiliate ID corresponding to the affiliate type.

2) How does the integration process recurring subscriptions?

Once a webhook is configured in Chargebee, every transaction created will be sent to LeadDyno along with the Affiliate ID. LeadDyno listens to Chargebee's "payment_succeeded" event and processes the commission for the Affiliate ID based on the commission rules defined. If you choose not to give commissions for recurring transactions, you can do so by configuring the "Repeat Payment" options under Commission settings on LeadDyno.

3) How does the integration process multiple subscriptions for a customer?

Once the webhook is configured in Chargebee, every transaction created will be sent to LeadDyno along with the Affiliate ID. LeadDyno listens to Chargebee's "payment_succeeded" event and processes the commission for the Affiliate ID, based on the commission rules defined. If you choose not to give commissions for multiple subscriptions for a customer, you can do so by setting "Pay Commissions for Multiple Purchases" configuration under Settings > Affiliate settings to No.

Limitations 

  • Currently LeadDyno only listens to "payment_succeeded" event in Chargebee. This is a limitation because, Chargebee has introduced a lot of features for delayed billing and affiliate commission might get delayed until the actual payment happens.

Was this article helpful?
Loading…