#AllsatckDev-promo-codes
1 messages ยท Page 1 of 1 (latest)
Hi! Let me help you with this.
Are you using Stripe Checkout or the Payment Element?
Payment Element
You will have to build a separate field for discounts and then apply them to the Subscription with Update: https://stripe.com/docs/api/subscriptions/update
So I will have to create the input field separately for the promo code.
Yes
AllsatckDev-promo-codes
OK, one more question, how can I make the promo only apply to the current/initial subscription invoice
Hi ๐ jumping in as my teammate needed to step away. You'll need to include the Coupon in the request to create the Subscription, because when you create a Subscription the first Invoice that is generated is immediately finalized and you are not able to edit it. A Coupon with a duration of once will only apply to one Invoice.
https://stripe.com/docs/api/coupons/create#create_coupon-duration
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Ok. So the promo code is a user-facing side of the coupon, i will have to validate the promo code, get the the coupon and then send it alone to create a subscription, which will return a payment intent, is this right?
Correct