Embed checkout (coming soon)
Learn how to embed Whop’s checkout flow on your website
Embedded checkout allows you to embed Whop’s checkout flow on your own website in two easy steps. This allows you to offer your users a seamless checkout experience without leaving your website.
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:
This will now mount an iframe inside of the element with the plan id you provided. 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 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-session-id
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.