Skip to main content

Integration with Stripe Payment Links

Integrate Rewardful using Stripe Payment Links on a generic website

Written by Charles Rosel
Updated yesterday

Integrating Rewardful is a quick way to set up affiliate and referral programs for your landing pages. We automatically track referred Visitors, Leads, and Conversions from your affiliates, customers, influencers, and/or partners. Commissions are automatically adjusted for any billing event changes such as downgrades, upgrades, free trials, cancellations, and refunds.

Each person that signs up for your program will receive a personalized dashboard where they can create and manage their affiliate links, stats, and track their success.

Note: This guide provides an alternative setup method for integrating Rewardful with Stripe Payment Links. For the primary in-app instructions, click here.

To set up the integration:

Then follow these steps to complete the integration:

I. Adding the Rewardful Tracking Script

Grab your Rewardful script from STEP 1 on the JavaScript integration page (Note: you don't need to add Step 2 as another code will handle the referral UUID).

Note: For users using Google Tag Manager in their WordPress site, grab this version of the STEP 1 script.

Paste the STEP 1 script in section where you're allowed to add custom head codes or if you're using a third-party plugin for handling custom head codes, paste it into that section.

II. Creating and configuring the Stripe Payment Link

To create the Payment Link in Stripe, please go to Payment Links > Create Payment Link.

For us to be able to track the Customers you need to select the option “Save Payment Details for Future Use”. This is required because Rewardful relies on Stripe Customer objects to attribute referrals correctly.

In case you already have the Payment Link created, please make sure the option “Save Payment Details for Future Use” is enabled.

For that, please go to Payment Links > Click the Payment Link > Go to the “...” button > Edit > Advanced Options.

III. Adding the custom script for Stripe Payment Links

  • Go to the page where the Stripe Payment Links are located.

  • Create a custom HTML block after the section where the Stripe Payment Links are or create a custom HTML block at the bottom of the page.

  • For non-Elementor users: copy the code below and paste it on a custom HTML block on the page where the Stripe Payment Links are located.

    • For WordPress Elementor users, paste the code below in the Elementor section where you add custom codes (not on the page where the Stripe Payment Links are). Paste the code at the end of the body tag and run it only on the page where the Stripe Payment Links are located.

 <script>
setTimeout (function() {
let paymentLink = document.querySelectorAll('a[href^="https://buy.stripe.com/"]');

// Adding the referral ID to the payment link
paymentLink.forEach(link => {
stripePaymentLink = link.getAttribute('href');
newPaymentLink = stripePaymentLink + '?client_reference_id=' + Rewardful.referral;
link.setAttribute('href', newPaymentLink);
});
}, 2000);
</script>

IV. Confirming the Rewardful dashboard initial setup

  • Go back to your Rewardful dashboard, click the Ok I've completed this button.

  • On the next set of instructions, open the link that has a ?via=install on an incognito window or private browser, let your site fully load.

  • Go back to your Rewardful dashboard and refresh the page. If the STEP 1 tracking script is correctly placed it will confirm your Rewardful initial dashboard setup.

  • If there's no confirmation, please chat with us or email us so that we'll check things for you.

V. Referrals are not tracking? Check the following (Troubleshooting)

Make sure that:

  • The Rewardful tracking script is installed as described in this article.

  • The Stripe Payment Link has “Save Payment Details for Future Use” enabled.

  • The custom script was added under Footer Tracking (not Header).

  • You tested using an incognito window.

  • If you still see the issue, reach out to our support team, and we’ll be happy to take a look.

Did this answer your question?