#ulrikeskygate
1 messages ยท Page 1 of 1 (latest)
Unfortunately not as far as I know. I will double check to see if anything has changed since the last time I looked in to this but discounts were definitely the only way to reduce the price like that before, unfortunately.
I was afraid of that... ๐
I created a Test coupon in the Stripe backend, but can't get it to work when calling the api. I get an "Invalid array" error. Neither
$sessionPayload['discounts']['coupon'] = 'pxtoDfJT';
nor
$sessionPayload['discounts']['coupon'] = ['pxtoDfJT'];
works for me.
It looks like the API is expecting an array with items that have a property named either "coupon" or "discount"
'discounts' => [['coupon' => 'somecouponid']],
Yup, that works. Thanks!
May I suggest updating the API docs for that part? It's a bit confusing:
I'll figure something out concerning on-the-fly coupons. Thanks Pompey! ๐
Yep, will put in feedback about it. It is definitely confusing.