#pleasant
1 messages · Page 1 of 1 (latest)
hi there, can you share the request id [0] for that request? it'd look like req_xxx
req_ZBzLDCa24IEA5r
gimme a second to take a look and get back to you
you can't retrieve the promo code using DRIP20, the promo code id you should retrieve with is promo_xxx
promo_1N830wETQHZRJaJQrWaPJtY3 like this?
if you want to retrieve it using DRIP20, try https://stripe.com/docs/api/coupons/retrieve
promo_1N830wETQHZRJaJQrWaPJtY3 like this?
yep
let me try it and get back
promoCode = promoCodes.data.find(code => code.code === promotionCode); promtional code is DRIP20 and promocode.id is promo_1N830wETQHZRJaJQrWaPJtY3 , this still fails await stripe.subscriptions.update(user.stripeSubscriptionId, { coupon: promoCode.id, }), it says StripeInvalidRequestError: No such coupon: 'promo_1N830wETQHZRJaJQrWaPJtY3`
if you're passing in promo_xxx, pass it in here : https://stripe.com/docs/api/subscriptions/update#update_subscription-promotion_code
if you're passing in coupon, pass it in here : https://stripe.com/docs/api/subscriptions/update#update_subscription-coupon