#MarkoBoras
1 messages · Page 1 of 1 (latest)
they'd still need to enter card details yes
actually sorry, I am totally wrong
I forget you can not use Checkout for a 100% discount(https://stripe.com/docs/payments/checkout/discounts)
let's start over. What are you trying to do and why? what integration/code do you currently use with Stripe?
😦
I am implementing stripe for some conference
some tickets needs to be given for free
I see. And what integration/code do you currently use with Stripe?
so as mentioned the issue is it's not possible to have a coupon/promotion code that would make a CheckoutSession 100% off
Checkout does not currently support discounting a purchase below the minimum charge amount for one-time payments.
ok
I'll implement some side logic to avoid checkout for this case
i have another question
so unfortunately the best option is probably to handle this a different way, like a direct/special page on your site that does not use Checkout at all, and just calls the backend code to generate the ticket or whatever directly
yeah as you say.
I am also using promotion codes and currently I have 20+ of them. I am retrieving them in my backend with
const promotionCodeList = await stripe.promotionCodes.list({
active: true,
});
It only retrieves 10 of them
is there some property to fetch all of them instantly
you should use auto-pagination to work through the list : https://stripe.com/docs/api/pagination/auto
so I need to create helper array and use auto paginate to set all items in that arrray if I want all of them?
yes you could push each result to a temporary array, or just process each one one-at-a-time, whatever works
it works man