#mitt_webhooks
1 messages ยท Page 1 of 1 (latest)
๐ 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/1331723565090996309
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
perfect, thanks.
Hello, can you tell me more about what specifically you are trying to do to enable them and in what way it isn't working? And do you have the ID of a coupon or promo code that you are having trouble doing this with?
hey pompey, yep.
so i've tried to add using the dashboard.
i've also tried using the shell.
stripe checkout sessions create --allow-promotion-codes="true" --ui-mode="embedded" --mode="subscription" -d "line_items[0][price]=0"
Gotcha, so that error message is accurrate. That parameter is expecting an ID like price_1MoBy5LkdIwHu7ixZhnattbh
https://docs.stripe.com/api/prices/object#price_object-id
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Have you created any price/product objects to represent the things that you are making coupons for here?
i have not.
i'll check the link to see how i go about creating one.
okay, now how do i create this?
hold on there may already be one..
This doc is shows how to add and manage Products and Prices through the API or Dashboard
https://docs.stripe.com/products-prices/manage-prices
no, i'm all set on the pricing. i've added the price_id as a parameter.
now it's prompting another error about quantity.
Have you tried adding a quantity to your call? It doesn't look like there is one https://docs.stripe.com/api/checkout/sessions/create#create_checkout_session-line_items-quantity
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
If it helps, this page has a request builder that has a nice UI for building requests like this https://stripe.sh
That is a successfully created Checkout Session, if you visit its URL you can see if it has the prices and discounts that you were trying to set
It's the URL that is directed after a successful payment: https://docs.stripe.com/api/checkout/sessions/object#checkout_session_object-success_url
Our API will show descriptions of each field per object.
What specifically is not working here?
Taking a look