#Sam77
1 messages · Page 1 of 1 (latest)
Hi there
Hi. Using PHP BTW
Don't believe we support negative line items for Checkout
Double checking but pretty sure that is the case
You would need to use a coupon
Yeah, I've already tried that, and it didn't like the negative.
Can I create a coupon or "promotion" on the fly? Because as I said, every amount will be different. Unless I can mass create 15,000 promotions in increments of a penny. Think of airline frequent flier mileage being credited
There are no limits to the amount of promo codes/coupons so yeah you can create as many as needed as long as you don't hit rate limits.
Sounds like you want to just create one right before redirecting to Checkout
That would be ideal. I can do that programmically? Obviously going onto the Stripe site to create one wouldn't work.
Yep you can do it via the API. You create a Coupon like is shown here: https://stripe.com/docs/api/coupons/create. Then pass it to discounts when creating your Checkout Session: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-discounts-coupon
Great. Not sure how I missed that. All I saw was that you needed to create it on the dashboard. But yeah, this looks simple. I wonder though if I ttr to set a coupon for say $12.25, and then I try and set another one for the same amount a month later if I'll have issues. But I'll check it out. Thanks again.
Are you using Subscriptions?
No just simple checkouts. Online store.
But you charge that saved card later on then it sounds like?
Or are you just talking about re-using coupons
Wasn't exactly clear what you meant above, but mostly just let me know if I can help any further 🙂
No, one time charge upon entry and done. I don't think I'll ever re-use a coupon. Will just create an "amount_off" based on the customer's credit amount and do that every time someone orders something. It will always be a different amount. If that makes sense. Trying it out now.
Yep that makes sense and should work fine
Thank you again