What you need to get started
Embedded checkout works with pretty much any website. Here’s what you’ll need:- A whop with at least one pricing option
- The ability to add code to your website
Get your Plan ID
To add checkout to your website, you’ll need your Plan ID. This tells the checkout which product and price to show customers Here’s how to get your Plan ID:- Go to your Dashboard > Checkout links
- Find your checkout link and click the three dots (⋮)
- Hover over Details
- Copy the Plan ID (looks like:
plan_XXXXXXXXX
)
Keep that Plan ID handy. You’ll need to paste it into your website code, so save it somewhere you can find it.
Choose your setup method
Pick the one that fits your website:- React (for React websites)
- Framer (for Framer sites)
- HTML/JavaScript (for any website including ClickFunnels, GoHighLevel, WordPress, etc.)
React setup
Step 1: Install the package
Step 2: Add the checkout element
plan_XXXXXXXXX
with your real Plan ID.
This component will now mount an iframe with the Whop checkout embed. Once the checkout is complete, the user will be redirected to the redirect url you specified in the settings on Whop.
You can configure the redirect url in your whop’s settings or in your company’s settings on the dashboard. If both are specified, the redirect url specified in the whop’s settings will take precedence.
Available React properties
planId
Required - The plan id you want to checkout.
theme
Optional - The theme you want to use for the checkout.
Possible values are light
, dark
or system
.
sessionId
Optional - The session id to use for the checkout.
This can be used to attach metadata to a checkout by first creating a session through the API and then passing the session id to the checkout element.
hidePrice
Optional - Turn on to hide the price in the embedded checkout form.
Defaults to false
skipRedirect
Optional - Set to true
to skip the final redirect and keep the top frame loaded.
Defaults to false
onComplete
Optional - A callback function that will be called when the checkout is complete.
This option will set
skipRedirect
to true
utm
Optional - The UTM parameters to add to the checkout URL.
The keys must start with
utm_
fallback
Optional - The fallback content to show while the checkout is loading.
prefill
Optional - The prefill options to apply to the checkout embed.
Used to prefill the email in the embedded checkout form.
This setting can be helpful when integrating the embed into a funnel that collects the email prior to payment already.
Full React example
Framer setup
To embed Whop checkout in a Framer project, you can utilize Framer Code components with the Whop React SDK.Step 1: Create a new Framer Code component
Navigate to the Assets tab in your framer project, click the + button next to Code and select New Code File.Step 2: Add the checkout embed code component
You do not have to install the package explicitly. Framer will automatically detect and install the package for you.
HTML/JavaScript setup
This method works with any website - ClickFunnels, WordPress, GoHighLevel, or your own custom site.Step 1: Add the script tag
To embed checkout, you need to add the following script tag into the<head>
of your page:
Step 2: Add the checkout element
To create a checkout element, you need to include the following attribute on an element in your page:Available HTML attributes
data-whop-checkout-plan-id
Required - The plan id you want to checkout.
To get your plan id, you need to first create a plan in the Manage Pricing section on your whop page.
data-whop-checkout-theme
Optional - The theme you want to use for the checkout.
Possible values are light
, dark
or system
.
data-whop-checkout-theme-accent-color
Optional - The accent color to apply to the checkout embed
Possible values are
tomato
red
ruby
crimson
pink
plum
purple
violet
iris
cyan
teal
jade
green
grass
brown
blue
orange
indigo
sky
mint
yellow
amber
lime
lemon
magenta
gold
bronze
gray
data-whop-checkout-session
Optional - The session id to use for the checkout.
This can be used to attach metadata to a checkout by first creating a session through the API and then passing the session id to the checkout element.
data-whop-checkout-hide-price
Optional - Set to true
to hide the price in the embedded checkout form.
Defaults to false
data-whop-checkout-skip-redirect
Optional - Set to true
to skip the final redirect and keep the top frame loaded.
Defaults to false
data-whop-checkout-on-complete
Optional - The callback to call when the checkout succeeds
This option will set
data-whop-checkout-skip-redirect
to true
data-whop-checkout-skip-utm
By default any utm params from the main page will be forwarded to the checkout embed.
Optional - Set to true
to prevent the automatic forwarding of utm parameters
Defaults to false
data-whop-checkout-prefill-email
Used to prefill the email in the embedded checkout form. This setting can be helpful when integrating the embed into a funnel that collects the email prior to payment already.
Full HTML example
FAQs
Why is my checkout not loading?
Why is my checkout not loading?
Make sure you’ve correctly replaced
plan_XXXXXXXXX
or PLAN_ID_HERE
in the code snippets with your actual Plan ID from the Whop dashboard. Also verify that the script tag is properly loaded in the <head>
section if using HTML/JS.Where do I find my Plan ID?
Where do I find my Plan ID?
Go to your Dashboard > Checkout links > Click the three dots (⋮) on your pricing option > Hover over Details > Click the ID (starts with
plan_
) to copy it.Can I embed multiple checkouts on the same page?
Can I embed multiple checkouts on the same page?
Yes, you can add multiple checkout embeds with different Plan IDs. Each embed operates independently.
How do I change the checkout theme?
How do I change the checkout theme?
For React: add
theme="dark"
or theme="light"
as a property. For HTML: add data-whop-checkout-theme="dark"
to your div element.Can I hide the price in the embedded checkout?
Can I hide the price in the embedded checkout?
Yes, add
hidePrice={true}
in React or data-whop-checkout-hide-price="true"
in HTML to hide the price display.What happens after a customer completes checkout?
What happens after a customer completes checkout?
By default, customers are redirected to your whop. You can customize this by setting a custom redirect URL or skipping the redirect entirely.
How do I prevent the redirect after checkout?
How do I prevent the redirect after checkout?
Use
skipRedirect={true}
in React or data-whop-checkout-skip-redirect="true"
in HTML to keep users on the same page.Is the embedded checkout mobile-responsive?
Is the embedded checkout mobile-responsive?
Yes, the checkout automatically adapts to different screen sizes and devices.
Can I customize the checkout's appearance with CSS?
Can I customize the checkout's appearance with CSS?
You can style the wrapper using the
.whop-checkout-wrapper iframe
CSS class, but the checkout content itself cannot be modified for security reasons.Can I pre-fill customer information?
Can I pre-fill customer information?
Yes, use
prefill={{ email: "customer@example.com" }}
in React or data-whop-checkout-prefill-email="customer@example.com"
in HTML.