#aki_promotioncodes
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/1230188678769414155
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
You need to be passing in an actual promotion code ID (should look something like promo_123) - "{{PROMOTION_CODE}}" is just a placeholder we use in the docs
aki_promotioncodes
oh i see . but what am i missing here? im creating a checkout session (hosted) and the user can activate a coupon code. so i do use "AllowPromotionCodes = true" in my checkout options right? so basically i dont need my "discount" attribute
Yeah, you'd only need to pass in discount if you wanted to prefill the Checkout Session with a specific discount
with this attribute set to true. my hosted checkout page allows me to put a coupon code right? i have created 2 coupon codes so far. if i try to put in the id , e.g. "FREE" it says its an invalid code
Which API version are you using? I believe no-cost orders in Checkout require an API version of 2023-08-16 or later (see https://docs.stripe.com/payments/checkout/no-cost-orders)
in my dashboard i have "2023-10-16"
Do you have a Checkout Session ID or URL I can try so I can take a closer look?
Ah the issue is that you've created a "FREE" coupon, but not the promotion code
oh i see what you mean.
ok the code is working now.. how do i understand the meaning between a Coupon object and its promotion codes... do i have to create different coupon objects for each "use-case" so to speak. and for each object i create promotion codes that can be used for this?
Can you clarify what you mean by each "use case"? You'd need to create a difference coupon for each different amount/percentage discount you want to give, but you can have multiple promo codes for each coupon.
So say you had a 100% off coupon - you could create different promo codes for different sales events
so i was thinking: i am creating a coupon object for my summer events right? name: SUMMER percentage 8% and duration permanent. and everytime when i want to give out promotion codes for my user i will create few codes of this coupon object and give them to my user? its thats how ppl use coupons in stripe?
Hi, I'm stepping in and catching up.
im just wondering what is a good practice to use coupon objects. i was confused i thought each object is actually a promotion code. but now i got the idea of it. thanks to karbi so far that its working now haha
You can learn more about the difference between coupon and promotion codes here, https://docs.stripe.com/payments/checkout/discounts#promotion-codes
The best practice here is that you create the promotion code once, like SUMMER and 8% off and share that promotion code. Once the customers have this promotion code, with allow_promotion_codes: true on the checkout, the end customers will be able to use those to get the discount.
If you want to offer SUMMER1 with 10%, you can create a new promotion code. Otherwise, if you want to keep offering SUMMER with 8% off, you would not need to create a new one.
i see thank you guys ! appreciate your help ๐