Try it (its real) 👇
React setup
Step 1: Install the package
Step 2: Add the button
returnUrl for the one click checkout button. The regular embedded checkout makes this property optional. Redirect-based payment methods may complete inside the Whop Pay dialog. The return URL closes the payment loop on your page.
When Whop sends the customer back, check the status query parameter:
- success: The payment succeeded.
- error: The payment failed, or the customer canceled it.
payment_id— the id of the payment. Use it to look up the payment on your backend or render a confirmation.setup_intent_id— set instead ofpayment_idwhen checkout didn’t charge anything (e.g. saving a card for future use).state_id— the checkout session id.
Step 3: Configure optional properties
planId
Required (or checkoutConfigurationId) - The plan id you want to checkout. Provide either this or checkoutConfigurationId, not both.
checkoutConfigurationId
Required (or planId) - An API-created checkout configuration id. Use this to mount the button with a pre-configured checkout. For example, the configuration can include metadata, a pre-applied promotion, or a multi-line cart. The button then skips creating a session at mount time. Provide either this property or planId, not both.
returnUrl
Required - The URL to return to after payment authorization flows.
methods
Optional - The methods that the button can render, in priority order. Defaults to ["apple-pay", "google-pay", "whop-pay"].
apple-pay— the native Apple Pay button (Safari and other Apple Pay-capable browsers).google-pay— the native Google Pay button (Chrome, Android, and other Google Pay-capable browsers).whop-pay— a Whop Pay button that opens checkout in a dialog.
methods={["google-pay"]} button only ever renders Google Pay — it never falls back to Apple Pay (and vice versa). If none of the allowed methods can render in the current browser, nothing renders and the onExpressMethodResolved callback fires with { rendered: "none" }.
theme
Optional - The theme for the button and the dialog. Possible values are light, dark, or system.
themeOptions
Optional - Theme tuning for the Whop Pay dialog.
prefill
Optional - Prefill the email or address inside the Whop Pay dialog. Same shape as the regular embedded checkout — see prefill options.
affiliateCode
Optional - Attribute the sale to an affiliate.
promoCode
Optional - Apply a promo code on the session.
adaptivePricing
Optional - Set to true to present prices in the buyer’s local currency where supported. Defaults to false.
skipRedirect
Optional - Set to true to skip the final redirect and keep your page loaded. Automatically true when you provide onComplete.
onComplete
Optional - Fires when the checkout completes successfully.
Setting this implies
skipRedirect = true.onPaymentError
Optional - Fires when checkout payment processing fails, with a human readable message and an optional machine readable code.
onExpressMethodResolved
Optional - Fires once the button decides which method it will render.
rendered: "none" means the button won’t show anything — typically because the only requested method is apple-pay and the browser can’t render it. Use this to hide the surrounding slot so you don’t leave an empty space on the page.
What renders
The button picks one method per browser, in this order:
If you only request
apple-pay and the browser can’t render it, the button signals back to your page (via the express-method-resolved event) so you can hide the slot.
Other websites
Step 1: Add the script tag
Step 2: Add the button
The one click checkout button is a custom element. Once loaded, the script registers<whop-express-checkout-button>:

