Promo demo pass$40.00
Working with
save25sandboxPick a discount
$40.00 list
Show the call that made save25Hide the call
await whop.promoCodes.create({
"account_id": "biz_...",
"code": "SAVE25",
"promo_type": "percentage",
"amount_off": 25,
"base_currency": "usd",
"new_users_only": false,
"promo_duration_months": 1,
"unlimited_stock": true,
"one_per_customer": false,
"product_id": "prod_..."
})What Whop hands back
percentage
You send25whole percent
Whop returns0.25decimal fraction
Print 0.25 straight from a list call and your page offers 0.25% off where you meant 25%. Send it back unchanged and the create is refused, because the write side floors at 1.
- Duration
- once
- Uses left
- unlimited
- Per customer
- no limit
- Audience
- everyone
Let someone use it
Open the checkout and type save25 into the promo row. Pay with 4242 4242 4242 4242.
What the checkout told us
Apply a code inside the checkout and onPromoCodeChanged fires. Whatever it hands over lands here, unedited.
Put it in a link
https://nextjs-whop-promo-codes-demo.vercel.app/?promo=save25
$40.00$30.00
what they see first// the whole feature
<WhopCheckoutEmbed
planId={planId}
promoCode="save25"
/>
<WhopCheckoutEmbed
planId={planId}
promoCode="save25"
/>
What the receipt says
Buy something to prove it
Until the server reads the payment back, a discount is only a number on a screen.
Your codes
3 on Whop
- active0 used
- active0 used
- active0 used
Activity loglive
Everything the page does behind the scenes shows up here.