How to implement and apply Stripe coupons and promo codes in your Embeddable
A1b2C3d4
or an ID chosen by you.promo_1A2B3C4D5E6F7G8H9I0J
.Add Input and Button Components
new_promo_code
.{{promo_code_success_message}}
and {{promo_code_error_message}}
respectively.Style the components
Create an Action
Register User Data Keys
promo_code_success_message
promo_code_error_message
Add a Trigger to the Action
Recommended: Reset Messages on Page Load
YOUR_PROMO_CODE_ID
or YOUR_COUPON_ID
with your actual promo code ID from Stripe.{{promo_code_id}}
or {{coupon_id}}
to use an ID calculated from a Computed Field or Action.promotion_code
or coupon
key, not both.// ...
) since JSON doesn’t support comments.// ... other checkout session configuration ...
line, since you’re only adding the discounts section.Error: Invalid promo code
Error: Promo code already applied
Error: Coupon ID instead of Promo Code
applyPromotionCode
function expects a promo code, not a coupon ID.