#eda_code

1 messages ¡ Page 1 of 1 (latest)

wheat hollyBOT
#

👋 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/1282806032963207168

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

pallid rivet
#

Hi there

#

No, it's not currently possible to allow promotion codes if the customer is also setting a custom amount

#

I think in this case, what you likely want to do is handle promo codes outside of Stripe/before the Checkout Session is created, and then create a Checkout Session with price_data instead of a specific Price

#

Additionally, can I create a checkout session using a product ID instead of price ID so I can easily change the product default in the UI?
What do you mean exactly by "product default in the UI"?

smoky shoal
#

Hi, thank you for your prompt response!

#

Is there a way to make a checkout session using the product ID where it will use the price id of the default price of the product in the UI?

#

Like I can use product id for the checkout and it will use the default price here?

pallid rivet
#

Sorry for the delay!

smoky shoal
#

All good! Let me know if I can provide any more details

pallid rivet
#

Ah, I see what you mean. You always have to pass a specific Price ID (or use price_data) when creating the Session

smoky shoal
#

Ah I see.... alright. What is the default pricing for a product used for then?

pallid rivet
#

Primarily for your own categorization of Prices if you happen to have multiple Prices for a given Product