Integrating with Stripe

Out-of-the-box features:
  • Conversion tracking
  • Commission based on order amount
  • Supports lifetime commissions
  • Auto-handle recurring commissions
  • Auto-handle refunds and disputes
  • Track order currency
  • Automatically add new customers as affiliate prospects
  • Track affiliate coupon code conversions

This guide describes how to install Tapfiliate in custom-made websites that have a direct integration with Stripe. You may require a developer to help you integrate.

If you use Stripe through a shopping cart like Shopify, or in a different platform, please follow the guide for the appropriate platform instead.

This guide includes instructions for two kinds of setups:

  • Immediate purchase: Useful for e-commerce, subscription boxes and other subsciption services without a free trial.
  • Sign up first, purchase later: Useful for e.g. SaaS and lead-generation businesses.

Both setups can be configured to automatically support recurring/lifetime commissions, by connecting your Stripe account. Automatic handling of refunds and disputes is also supported.

For both setups, please first add the following code in the <head> of every page of your website:

  <script src="https://script.tapfiliate.com/tapfiliate.js" type="text/javascript" async></script>
  <script type="text/javascript">
      (function(t,a,p){t.TapfiliateObject=a;t[a]=t[a]||function(){
      (t[a].q=t[a].q||[]).push(arguments)}})(window,'tap');

      tap('create', '((((YOUR ACCOUNT ID))))', { integration: "stripe" });
      tap('detect');
  </script>

{{{{NO_ACCOUNT_ID_SET_MESSAGE}}}}

Option 1: Immediate purchases

On your thank you page, add the following code:

  <script src="https://script.tapfiliate.com/tapfiliate.js" type="text/javascript" async></script>
  <script type="text/javascript">
      (function(t,a,p){t.TapfiliateObject=a;t[a]=t[a]||function(){
      (t[a].q=t[a].q||[]).push(arguments)}})(window,'tap');

      tap('create', '((((YOUR ACCOUNT ID))))', { integration: "stripe" });
      tap('conversion', '((((STRIPE CHARGE ID))))', ((((ORDER AMOUNT)))), {customer_id: '((((STRIPE CUSTOMER ID))))'});
  </script>

Have your developer replace [[[[STRIPE CUSTOMER ID]]]] and [[[[STRIPE CHARGE ID]]]] placeholders with the respective Stripe values for current customer and charge. {{{{NO_ACCOUNT_ID_SET_MESSAGE}}}}

Option 2: Sign up first, purchase later

On your thank you page, add the following code:

  <script src="https://script.tapfiliate.com/tapfiliate.js" type="text/javascript" async></script>
  <script type="text/javascript">
      (function(t,a,p){t.TapfiliateObject=a;t[a]=t[a]||function(){
      (t[a].q=t[a].q||[]).push(arguments)}})(window,'tap');

      tap('create', '((((YOUR ACCOUNT ID))))', { integration: "stripe" });
      tap('trial', '((((STRIPE CUSTOMER ID))))');
  </script>

Have your developer replace the [[[[STRIPE CUSTOMER ID]]]] placeholder with the Stripe customer id of the current customer. {{{{NO_ACCOUNT_ID_SET_MESSAGE}}}}

Note: To track future recurring/lifetime payments, enable Lifetime/recurring commissions in your commission structure page.

Last step: Connect with Stripe

Tapfiliate has a direct integration with Stripe that adds out-of-the-box automation features. After following the guide above you can connect your Stripe account by clicking the button, logging in and pressing the "+Connect" button:

Connect account now

Important

Please remember to test a conversion before starting your program. This way you can verify that tracking has been set up correctly. You can create a test conversion by following the steps described here.

Start a 14-day free trial with all our features enabled

Start now