We have bought the step-by-step guide on how to apply affiliate referral to a customer's subscription through API.
1. Create an affiliate link to your website under Pabbly Subscription -> Affiliate -> Affiliate Settings -> Affiliate Link.
2. Now, once the customer is redirected to your website after clicking on the affiliate's referral link, you'll get _pac as a cookie and _paclt as a cookie period under the query param.
Here is the sample URL -
3. You can store this cookie for your webpage.
4. Now, whenever the customer purchases your product, you can use our "Create Customer With Subscription" API - https://apidocs.pabbly.com/#fa365f13-a67c-4973-8967-0e4db2c2a109 and add _pac value with key "pabbly_affiliate" so that the commission will be created automatically under your Pabbly account.
For example -
Now, you need to pass this "pabbly_affiliate" key value data to the header -> cookie. Refer the attached image.
1. Create an affiliate link to your website under Pabbly Subscription -> Affiliate -> Affiliate Settings -> Affiliate Link.
2. Now, once the customer is redirected to your website after clicking on the affiliate's referral link, you'll get _pac as a cookie and _paclt as a cookie period under the query param.
Here is the sample URL -
https://www.example.com/pricing/?_pac=7e8702f1f68004438c3354b168b747be%3A11febf23436b256dbd44ec0fd2155c2154942b358d868c1987d692e8bc7507d4ab99b4280f1c230d317cc6df45d7e7ac4186757a5ef645f9661590d616af9605c81a02bf889eb1959c4edd565c3c93dcc41d599ddda7f1ff30477cd2379f7306ab5433179c9210809e0c0031263ae1ec&_paclt=2592000
3. You can store this cookie for your webpage.
4. Now, whenever the customer purchases your product, you can use our "Create Customer With Subscription" API - https://apidocs.pabbly.com/#fa365f13-a67c-4973-8967-0e4db2c2a109 and add _pac value with key "pabbly_affiliate" so that the commission will be created automatically under your Pabbly account.
For example -
pabbly_affiliate="7e8702f1f68004438c3354b168b747be%3A11febf23436b256dbd44ec0fd2155c2154942b358d868c1987d692e8bc7507d4ab99b4280f1c230d317cc6df45d7e7ac4186757a5ef645f9661590d616af9605c81a02bf889eb1959c4edd565c3c93dcc41d599ddda7f1ff30477cd2379f7306ab5433179c9210809e0c0031263ae1e",
Now, you need to pass this "pabbly_affiliate" key value data to the header -> cookie. Refer the attached image.
Last edited by a moderator: