How To Setup a Chargebee Affiliate program


Integrating Chargebee with OSI Affiliate Software is very easy. Follow the steps shown below.


Step 1. Log in to your Chargebee account, click Product Catalog, and select the plan.


Step 2. Click Grab Script  

Step 3. Copy both codes on your landing page.

Step 4. Below actions click Edit.

Step 5. Update Redirect URL with your thank you page link i.e


https://www.YourWebSite.com/chargebee_thankyou.html?plan_price={{plan.price}}&subscription_id={{subscription.id}}&customer_email={{customer.email}}

Step 6. Go back to Settings and below select the Configure Chargebee then Add weebhook.

Step  7.  Put any name & use the following URL.


https://YourOSISubDomain.ositracker.com/Chargebee/webhooks

Replace YourOSISubDomain with your OSI Affiliate Software Subdomain.


 Step 8.


Put copied codes in step 1 on your landing page i.e

https://www.YourWebSite.com/chargebee_landing.html

<!DOCTYPE html>

<html>

<head>

<title>Chargebee Subscribe</title>

<script src="https://js.chargebee.com/v2/chargebee.js" data-cb-site="***testing-test" ></script>

</head>

<body>

<h1>Chargebee Subscribe</h1>

<a href="javascript:void(0)" data-cb-type="checkout" data-cb-plan-id="cbdemo_hustle" >subscribe (cbdemo_hustle)</a>

</body>

</html>

Step 9.

Add following code on you thank you page i.e

https://www.YourWebSite.com/chargebee_thankyou.html

<!DOCTYPE html>

<html>

<head>

<title>Chargebee Thankyou</title>

</head>

<body>

<h1>Chargebee Thankyou</h1>

<div id="st_code"></div>

<script>

var OSISubDomain = 'YourOSISubDomain';

</script>

<script src="https://www.ositracker.com/js/chargebee_thankyou.js"></script>

</body>

</html>


Replace YourOSISubDomain with your OSI Affiliate Software subdomain