#yogeshwari

1 messages · Page 1 of 1 (latest)

honest shaleBOT
supple abyss
cloud sun
#

That's the Coupon Id. Promotion Code is a different thing

#

Promotion Code is that you generate them and give to your customer. Your customer input it into a Stripe surface

supple abyss
#

Yes, I know but is it possible to give discount based on promotion code directly via subscription update API?

#

In our case while we upgrade the plan then stripe checkout screen is not coming , Because we call subscription update API and inside this API passing 'promotion_code' => 'Promotion code object ID'.

cloud sun
#

Yeah Update Subscription API does accept a Promotion Code Id AFAICS. You can try it out in Test mode tho

supple abyss
#

Currently I pass this value in 'promotion_code' key but while we check on stripe it automatically converted into COUPON

#

?

cloud sun
#

what do you mean by automatically converted?

supple abyss
#

Like I create ABC coupon and under this coupon create "TESTPROMOCODE" this promotion code

I apply TESTPROMOCODE this promotion code then stripe Invoice showing me that i apply "ABC" coupon.

cloud sun
#

That's expected since a Promotion Code belongs to a Coupon

supple abyss
#

Ok, Thanks

I have a one concern about Promotion code validation

I create coupon with promotion code for PRO product but I will buy PREMIUM product with PRO product promotion code then not giving error. I want to get error because promotion code created for PRO product and i am applying on PREMIUM product.

cloud sun
supple abyss
#

That already done while creating coupon but stripe not check while upgrade subscription using PHP API.

cloud sun
#

Sorry could you outline what you observe? Like which Coupon Id you set to which Product Id, and then what diffrent Product ID it applied to in which request?

supple abyss
#

Coupon ID: l89jpWmf
Product ID: prod_O5NLEyrfPRDvRY
Different Product Id: prod_O5NPSU68V3N2by

  • subscription update API
#

Currently we can’t create a promotion code which can be used once per user only for specific product.