How can I add referral metadata for a Stripe customer in Webflow when integrating with Rewardful?

TL;DR
  • Add the Rewardful script to Webflow's Custom Code to track referral data via cookies.  
  • Use a Stripe-compatible checkout (via API, Stripe Checkout, Memberstack, etc.) that preserves and passes referral metadata like rewardful_referral to Stripe, since Webflow's native checkout doesn’t support metadata.

To add referral metadata to a Stripe customer in Webflow when using Rewardful, you'll need to ensure the referral tracking data is correctly captured and passed during checkout.

​

1. Understand the Role of Rewardful

​

  • Rewardful tracks affiliate referrals by attaching metadata to a Stripe Customer at checkout.
  • It uses a JavaScript snippet to detect referral links and store relevant referral information (e.g., affiliate ID) in cookies.

​

2. Install the Rewardful Script in Webflow

​

  • Go to Webflow Project Settings > Custom Code > Head section.
  • Paste your Rewardful tracking script (provided in your Rewardful dashboard).
  • This script must be loaded on every page where visitors might land via referral URLs.

​

3. Ensure Webflow Checkout Captures Metadata

​

  • Webflow does not natively support custom fields in the Stripe Customer object during eCommerce checkout.
  • Therefore, you need to use Rewardful’s Webflow integration via Stripe Checkout OR connect Webflow forms to a custom serverless function (e.g., via Make, Zapier, or custom webhook).

​

4. Use a Third-Party Checkout Integration (If Needed)

​

  • If your Webflow site uses a custom checkout or sign-up form that links to Stripe via API, make sure to:
  • Capture Rewardful’s ?ref parameter or affiliate cookie value.
  • Include it as metadata when creating the Stripe Customer on your backend.

​

  Format:

  • Metadata key: rewardful_referral
  • Value: Affiliate ID (from cookie or URL param)

​

5. Verify Stripe Integration

​

  • After a successful checkout, go to Stripe Dashboard > Customers, and check that metadata contains:
  • rewardful_referral
  • Possibly other Rewardful values like affiliate_id, campaign, etc.

​

6. Use Rewardful’s Native Stripe Integration

​

  • If your integration isn't through Webflow’s native eCommerce, but via Stripe Checkout or a Memberstack/Outseta layer, Rewardful will automatically append the affiliate data to the Stripe Customer.
  • No manual coding required as long as:
  • The Rewardful script is present.
  • The checkout or sign-up page redirects the user correctly with the referral cookie intact.

​

Summary

​

To track referral metadata in Stripe from Webflow using Rewardful, add the Rewardful script in Webflow, ensure referral data is preserved through checkout, and use Stripe-compatible checkout flows that pass metadata. Webflow's native checkout lacks metadata support, so use an API-based checkout to attach the referral info, or leverage Rewardful’s direct integration with Stripe.

Rate this answer

Other Webflow Questions