#ulrikeskygate

1 messages ยท Page 1 of 1 (latest)

shadow yachtBOT
mental temple
#

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.

stoic crater
#

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.

mental temple
#

It looks like the API is expecting an array with items that have a property named either "coupon" or "discount"
'discounts' => [['coupon' => 'somecouponid']],

stoic crater
#

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! ๐Ÿ™‚

mental temple
#

Yep, will put in feedback about it. It is definitely confusing.