#dan7778777_api
1 messages · Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- dan7778777_coupons, 14 minutes ago, 6 messages
👋 Welcome to your new thread!
⏲️ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1247626180425814171
📝 Have more to share? Add details, code, screenshots, videos, etc. below.
Hi, can you confirm you're looking offer a coupon that does not have any restrictions?
yesss thats the purpose
and you're using PaymentLinks?
now only using stripe api and frontend react
trying to add a non-restricted coupon as we sometimes won't have any product listed on web
Yeah, you can just create the coupon without passing any limitations on the products, https://docs.stripe.com/payments/checkout/discounts#limit-eligible-products. Like you can omit this, https://docs.stripe.com/api/coupons/create#create_coupon-applies_to and just create the coupon: https://docs.stripe.com/api/coupons/create.
thanks! how can we have the coupon option appeared?
is there anything to do with our frontend react? just checked the current payment page won't have a placeholder to type in coupon
You'd want to pair that with the Promotions API, https://docs.stripe.com/api/promotion_codes/create and then build your own UI to add that input for your end customers to add the promotion code.
so... will the first step be connected to Promotion API and parse the created coupon to stripe api, finaly build UI?
First, build the UI and create the coupon. Then, use that coupon ID to create the promotion ID, https://docs.stripe.com/api/promotion_codes/create#create_promotion_code-coupon.
okk, build UI within Stripe API, then create coupon, use the coupon ID to create promotion ID, and store everything into promotion API?
No, you need to build that UI on your end. There is no Stripe.js to handle this.
Can you clarity what you mean by 'store everything into promotion API'?
What are you trying to store?
got that will build UI on our end using Stripe.js
There is no Stripe.js to build this coupon UI.
You will handle this entirely on your own
not clear about the relationship between coupon and promotion API
ohhh ignored the no
Coupon is the object ID that you would reference, and offer the discount on. Promotions is the user facing piece, that is all. It is tied to the coupon.
By creating a Promotion ID, you're just creating a user facing code to share with them like 'welcome10' and then the coupon object would be G6YHY7 for instance.
I highly recommend that you try it our on your end in test mode
thank you for the help