#aleem - discounts
1 messages ยท Page 1 of 1 (latest)
๐
You could create the subscription with a free trial of three months, and apply a coupon code for 25%: https://stripe.com/docs/api/coupons/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
we're using checkout/portal - how can the user use the coupon?
(to get both the trial and the free months)
You'd specify the trial here: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-subscription_data-trial_end
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
For the discount, you can either apply it before you create the session or have the user enter the code on the page
To apply it before, you can put it here: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-discounts
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
You set this to true to let the customer enter a promo code: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-allow_promotion_codes
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Would have to create a user facing promo code for that though: https://stripe.com/docs/billing/subscriptions/coupons/codes
yeah but we dont know to create the checkout session with these attributes because we dont know the customer has the promo code till they enter it on the checkout page
Gotcha. So there's a couple options then. 1 is to have the coupon code input on your site (prior to creating the session)
The other one is to have the promo code give the user 3 months free
Then once the 3 months end, you can update the subscription and apply a new coupon to give 25% off forever
so no way to apply 2 coupons to a subscription?
Unfortunately not at the moment. Only 1 can be specified currently. See: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-discounts
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
and no way for a coupon to offer free months AND discount?
Unfortunately not