#yuichi-hamamoto_api

1 messages ¡ Page 1 of 1 (latest)

hollow locustBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1382985338686799933

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

graceful current
#

hello! gimme a while to take a look

#

hmmm, unfortunately no, there's no way to pass in the promo code, you need to pass in the ID. What you will want to do instead, is to save the promo code and it's corresponding ID to your own database so that you can retrieve / apply it as required.

cedar shadow
#

Wait sorry I think I found something

#

I think I can technically seach by code with list

graceful current
#

ah yeah! good find! sorry for missing out on that

cedar shadow
#

yea

#

I tried and worked

graceful current
#

I'd still suggest considering mapping it in your own database though cause making these requests do contribute to your rate limits, and it's not really sustainable in the long run if you get more customers

hollow locustBOT
cedar shadow
#

But then if I want to use console to create promo code, I need to manually map each time?

vague spade
#

What do you mean by console? Do you mean the Stripe CLI?

cedar shadow
#

Dashboard?

#

Wait I can set webhook on promotion_code.created

vague spade
#

yup!

cedar shadow
#

ok ok seems ok but bit pain

#

thank you

hollow locustBOT