#yogeshwari

1 messages · Page 1 of 1 (latest)

brave glenBOT
cedar dome
#

hello! what promo code validation are you referring to? can you give me an example of how you're expecting it to behave?

hollow lantern
#

I have apply promo code when user is updating subscription

#

Ex: users update 99 plan to 199 plan then I want to add promo code on update subscription api call

cedar dome
#

okay, what's the issue when you add a promo code?

hollow lantern
#
  • I have 4 stripe products 1)PREMIUM_MONTH, 2)PREMIUM, 3)PRO_MONTH, 4)PRO
  • I create two coupons
  1. "TESTCOUPON" for PRO & PREMIUM plans - Created Promocode "ABC"
  2. "WRONG" for PRO_MONTH & PREMIUM_MONTH plans - Created Promocode "XYZ"
  • User have PRO_MONTH plan and he want to upgrade to 'PRO' plan
  • Then user apply "XYZ" promocode for PRO plan, So ideally its Invalid promocode for this PRO plan but not giving any error while i call stripe->subscriptions->update() api and I pass "XYZ" promocode 'ID(Stripe promo code id)'.
cedar dome
#

can you provide the rquest id where you provided the promo code and expected it to error?

hollow lantern
#

ok

cedar dome
#

please paste the request id here

brave glenBOT
hollow lantern
#

req_4P3ZIKn8PylGzG

inland gust
#

Indeed, the API request won't error. We just won't apply any discount

#

You can see in the response there is no discount applied as the promo_xxx supplied does not match any of the items

hollow lantern
#

ok

#

how we can sho that erro to user