Setup Stripe Pricing Table
Last updated
Last updated
Stripe offers a customizable Pricing Table component, which serves as an embeddable interface for displaying various subscription pricing options. It integrates seamlessly with Stripe Checkout, enabling users to easily embed pricing information on their websites.
The basic implementation of the Pricing Table component is as follows:
To send the referral code to Stripe using the Pricing Table, you need to include it as an attribute within the component. For example:
Stripe automatically retrieves the client_reference_id from the component and includes it in the Checkout Session object.
To add the referral code to the Pricing Table, users can insert the following script on the page where the Pricing Table is located. This script updates the client_reference_id and referral code as key-value pairs in the Pricing Table component. Unlike Payment Links or Buy Buttons, the referral code is not visible in the URL when customers click on the Pricing Table. However, Stripe internally tracks the referral data to ensure proper affiliate tracking.
Step 1
Add the universal script on the page
Step 2
Here’s the script for dynamically updating the Pricing Table component:
This script ensures that the client_reference_id is updated dynamically for accurate affiliate tracking, even though the referral code will not be visible in the URL.