#vladnis-promocode-questions

1 messages ยท Page 1 of 1 (latest)

lofty hollowBOT
lethal radish
#

Hi ๐Ÿ‘‹

Checkout Sessions create new Subscriptions. But the billing portal is used to make modifications to existing subscriptions. What is it you are trying to do here?

#
  1. What is the behavior you want to happen
#
  1. What do you see when you test this?
runic dome
#

My scenario is as follows: User A triggers a cancellation to their subscription (the subscription will effectively cancel at the end of the billing cycle). During this time (until the end of the billing cycle), my user is still on a subscription. However, I want to make sure that if they are to come back to the billing portal and decide to rejoin, they can obtain a 50% subscription.

#

(This is the Stripe-hosted billing portal)

lethal radish
#

Okay are you configuring this with the API?

runic dome
#

I can configure it with the API, but I am not sure the steps to achieve my desired behaviour.

lofty hollowBOT
lethal radish
runic dome
#

I see. Would I then be able to restrict the use of the promotion code to be 1 per customer?

lethal radish
runic dome
#

I see in the promotion code api (https://stripe.com/docs/api/promotion_codes/create) that I can create multiple promotion codes based on a single coupon. What does this actually mean? Will the promotion code created based on an unlimited redemption coupon work an unlimited amount of times or just the one time?

reef needle
#

๐Ÿ‘‹ hopping in here since snufkin has to head out soon

runic dome
#

Ah, I see that I can customise both the customer and the redemption limit on the promotion code. If I understand correctly, starting from a 50% off coupon with unlimited redemptions, I can create a promotion code for a single user that can only be redeemed once. Is that the correct way to achieve my use case?

reef needle
#

Yup!

runic dome
#

Lovely! If I want to reduce the friction such that the user does not have to enter the promotion code themselves) what are my options ? Can I boot up the billing portal with the promotion code applied from the beginning? Can I apply a promotion code to a checkout sesson when building one?

reef needle
lofty hollowBOT
#

vladnis-promocode-questions

runic dome
#

I tried this but that ends up with every subsequent checkout having the coupon applied. I suppose I could programatically remove it from the customer if I notice an event with a coupon applied. Is there an example event (checkout completed and/or subscription updated) that I can use for reference to detect coupon usage

reef needle
runic dome
#

What I mean is that if I attach it to the customer object then every time the customer checks out they will obtain a 50% off discount. If I understand correctly, that once setting means that the 50% off applies only to the first month. I want it to apply only to the first month AND I want to make sure that if they checkout again then the 50% off does not apply.

reef needle
#

once means the discount will be single-use. It'll apply to the next invoice for the customer and then by removed (which sounds like what you want?)

runic dome
#

Will it be removed from the customer object though? Let's say I attach this coupon to customer A. Sure, once they checkout, they'll have 50% the first month and then full price all the other months. However, if they cancel after their 4th month, and then decide to subscribe again, will the coupon be removed from the customer? Will they just be defaulted to the full price subscription?

reef needle
#

Yes the coupon will be removed from the customer

#

when the resubscribe they'd only get the coupon if you update the customer and added the coupon again after it was used the first time

runic dome
#

And do I need to create a coupon for every customer ?

reef needle
#

No, you should be able to use the same coupon for every customer

runic dome
#

See attached ss. Doesn't the grayed out row mean I cannot use the coupon again?