September 16, 2026
In this article, we will cover:
- Why Stripe is a powerful integration for Tapfiliate
- What you need before starting the integration
- Step-by-step setup
- Advanced optional features
- Testing and verification
Stripe Integration Overview
Tapfiliate offers robust and seamless integration with Stripe payment software, enabling automated tracking of affiliate conversions and commissions. This advanced integration setup supports both one-time and recurring commission structures. Additionally, it automates the handling of refunds, disputes, and coupon code tracking, significantly streamlining your affiliate management process.Pros:
- Automatically tracks recurring & lifetime commissions
- Automatically handles refunds & disputes
- Very easy to activate once code is installed
- Requires developer’s assistance
- Does not track initial conversions via plugin (javascript needs to be implemented)
Prerequisites for integrating Stripe
To successfully integrate, ensure you have the following:- A live Tapfiliate account with access to your account ID.
- Access to your Stripe account, to approve the connection in Step 3. Tapfiliate does not ask for your Stripe API keys, and nothing needs to be switched on in Stripe beforehand. Your developer may still use your own Stripe API to look up the Customer and Charge IDs below.
- Admin/developer access to your website’s codebase.
- Ability to fetch Stripe’s Customer ID (cus_…) and Charge ID (ch_…) fields from your transactions.
- (Optional) An affiliate coupon code set up in both Stripe and Tapfiliate if you plan to use coupon conversion tracking.
Steps to complete tracking setup
Step 1: Set up clicks TrackingTo install Tapfiliate tracking for Stripe, add the following code to the
<head> section of every page on your website:Note:It’s advisable not to use “Google tag manager” since it’s an optional cookie.
<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>Remember to replace ‘YOUR_ACCOUNT_ID’ with your unique Tapfiliate account ID. This code snippet is essential for setting up Tapfiliate and preparing it for seamless integration with Stripe.
Step 2: Track the signup or the purchase. Choose the one option below that matches how your customers start with you.
Free trial first, purchase later (subscriptions that start with a free trial)
If your user flow consists of a free trial first, and then subsequent purchases, add the below code to the thank you page after user successfully starts their free trial:
<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>Replace “YOUR-ACCOUNT-ID” with your actual Tapfiliate account id and replace the ‘STRIPE CUSTOMER ID’ with the customer id from stripe.
Note: You will require a developer to correctly pull the Stripe customer id via https://docs.stripe.com/api/customers/object

If your user flow bypasses a free trial and directly involves a purchase or an upfront subscription, implement the code provided below on the thank you page after purchase:
<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', currency: 'CURRENCY CODE'});</script>Replace “YOUR-ACCOUNT-ID” with your actual Tapfiliate account id and replace the ‘STRIPE CHARGE ID’ and ‘STRIPE CUSTOMER ID’ with the actual charge id and customer id from stripe.
Note: You will require a developer to correctly pull the Stripe charge id and amount via the Stripe API from : https://docs.stripe.com/api/charges/object and the customer id via the Stripe API: https://docs.stripe.com/api/customers/object

EUR (Stripe’s currency field gives it in lower case, eur). Give ORDER AMOUNT in the main unit of that currency, for example 49.99: Stripe’s amount field is in the smallest unit (4999 cents for 49.99 EUR), so convert it first.If you leave out
currency, or send a code that isn’t in the Currency list of your program settings, Tapfiliate records the conversion and its commission in your program’s currency with the same number and without any exchange: an order of 49.99 EUR in a USD program is recorded as 49.99 USD, and a percentage commission is calculated from 49.99 USD. You can leave currency out only if every charge is in your program’s currency.If your commission type is Time-Based, the renewals Tapfiliate creates on its own schedule don’t keep the currency: each one is recorded with the amount of the first conversion in your program’s currency, whatever currency you passed for the first conversion.
How commissions and affiliate balances work when sales come in several currencies: How do I manage multiple currencies? Note: Use the free trial code or the immediate purchase code, whichever matches your user flow. The integration guide in your dashboard may number the same two choices differently, so go by what each one does rather than by its number or letter. Please ensure you follow the preceding and subsequent steps as outlined.
Step 3: Connecting Stripe with Tapfiliate (Used to track recurring conversions)
Once you have successfully placed the codes as per the above steps, you can directly connect your stripe account with your Tapfiliate account. Clicking Connect Stripe opens Stripe’s own authorisation page: log in to Stripe, choose the account and approve the connection. You don’t need to enable Stripe Connect or any other setting in your Stripe account.
Connect Stripe
Make sure that you have successfully enabled “recurring/lifetime commissions” in the commission structure section to attribute the recurring/lifetime revenue from customers to the originating affiliates. Keep Recurring commissions of your commission types on Smart connected, not Time based (see Smart Connected): Stripe reports the renewals, and with Time based, Tapfiliate also creates a renewal every Recurrence interval, so renewals would be paid twice.
Note: Stripe plugin connection is used to track recurring/lifetime commissions after the initial javascript/API connection with the website is already made. The stripe plugin does NOT track the clicks and conversions from the website.

Advanced or Optional Features
Coupon Code Tracking:
Create a coupon code in Stripe and assign it to the relevant affiliate in Tapfiliate.In your conversion event, add coupon info:
tap('conversion', 'STRIPE_CHARGE_ID', CONVERSION_AMOUNT, {"coupons": "COUPON_ID", "currency": "CURRENCY_CODE"});Give CONVERSION_AMOUNT and CURRENCY_CODE as in the immediate purchase code above: the amount in the main unit of the currency, for example
49.99, and the three-letter currency code in capital letters, for example EUR. Without currency, the amount is recorded in your program’s currency with the same number.Ensure that you pull the coupon ID from stripe via :
https://docs.stripe.com/api/coupons/object
and it matches the affiliate’s Tapfiliate profile; otherwise, the conversion won’t be tracked.
Refunds & Disputes:
Refunds and disputes are automatically handled if Stripe is properly connected and the right transaction IDs are provided.How to Test and Verify Integration
To test the integration after completing the steps above, follow the steps below:1. Create a test affiliate
2. Use the test affiliate’s referral link and follow the user journey.
3. Check if the click and conversion got successfully tracked in the system.
4. To test a coupon code, place a separate order with the test affiliate’s coupon code in a private browser window where no affiliate link was opened, with an email address that has not been used for an order, a sign-up or a trial: if the coupon never reaches Tapfiliate, an order placed through the affiliate’s link is still credited by the link, and an order from a customer who is already in Tapfiliate under the same customer ID can be credited without the coupon, or not at all. Then click the conversion on the Conversions page: the coupon credited it only if it went to the test affiliate and its Tracking source is Coupon (js) or Coupon (api).
5. After testing, disapprove the test commissions in the conversions, and cancel the test customers on the Customers page, so that in a program with lifetime or recurring commissions they don’t keep earning a commission every period.
6. Follow the troubleshooting guide if the clicks and conversions are not tracking.

If you have any questions or if something in this guide is unclear, please don’t hesitate to contact us at support@tapfiliate.com. We’re happy to assist!