#tbc-edge

1 messages · Page 1 of 1 (latest)

sinful trenchBOT
brisk escarp
#

Hi 👋 I'm not sure I understand what you're hoping to accomplish.

Is your goal with integrating the Customer Portal to allow your customers to update their Payment Method details, update their existing Subscription, or both?

What behavior are you currently seeing? Can you share the ID of the Customer and and Subscription objects you're using for testing?

quasi pine
#

Hey Toby, thanks for your reply. Let me give a little more context.

We've got some users to fill out a web form which has created a subscription in Stripe with a trial period. We want to send them an e-mail to say "hey, your trial is coming to an end, add your payment details to get a great offer". We were thinking that sending the user to the customer portal will allow them to:

  1. see a coupon applied to the annual subscription with the price they'll be billed at the end of their trial
  2. see an option to change to the monthly subscription and the corresponding price they'll pay at the end of their trial

It seems that 1. is possible, but 2. doesn't seem to be.

I'll dig out a customer that represents this, give me a moment.

atomic sonnet
#

I think you can only change one at a time, also it seems the update endpoint is aware of plan switches on prices and will prorate the plan change automatically.

brisk escarp
#

Gotcha, I would need to see the portal configuration you're using along with the Subscription to see if it is expected for the option to modify the Subscription to be present.

sinful trenchBOT
quasi pine
#

Is that link sufficient for you @brisk escarp ?

brisk escarp
#

I think so. Looks like the portal configuration being used is allowing subscription updates, trying to stand up a test scenario to see the actual portal behavior you're referring to.

#

Hm, I don't think I'm seeing the behavior you're describing.

  • I created a Customer without a Payment Method
  • Started an annual Subscription with a 60-day trial
  • Opened the Customer Portal for this Customer
  • And saw an Update plan button that I can click on without first providing payment method details.

Is there a step that is part of the process you're following that I missed?

quasi pine
#

Thanks Toby, this wasn't what I saw. I will give this another try from my end!

signal ferry
#

👋 stepping in

#

Catching up

modern kiln
quasi pine
#

req_ZSyTIOpVzbHmqr

modern kiln
#

Thank you, testing this on my end. Your configuration does allow default_allowed_updates: [ "price",.... ... Just to confirm, this customer has a subscription with a trial correct?

quasi pine
#

Correct

modern kiln
#

Ok, I was able to reproduce this on my end. Further looking if it's expected or not.

quasi pine
#

Thanks 👍

modern kiln
#

After testing, it looks like you can update the plan without a Payment Method if you do not specify that the subscription should be paused/ cancelled when the trial ends.

#

So if the intended behavior is that you want to allow your customers to update plans while they are on a trial period, you'd need to not set pause or cancel if free trial ends without a payment method.

quasi pine
#

Understood, that's really helpful, thanks. So, in the case where the trial period ends and they haven't added payment information... what happens?

modern kiln
atomic sonnet
#

it goes into past_due or requires_payment_method state I think.

quasi pine
#

OK interesting, thanks very much. I've set my trial for 1 day and will check back tomorrow to see what happens! Have a great day folks

modern kiln
#

Happy to help!

atomic sonnet
#

test clocks require test customer and test subscription.

quasi pine
#

I have tested it and can see it is "Overdue". Do you think that not being able to change product when that pause / cancel option is checked is a bug? It seems odd to me that it isn't allowed.

#

"Overdue" wording seems a bit more aggresssive than "paused"

modern kiln
#

I do not think so since on the Subscription, you are specifying that you want to pause, cancel etc. if a Payment Method is not added. Why do you think it's odd? (I can share your feedback with the team but I'd like to fully understand your business use case)

#

The risk here is that you change the Plan but there is no Payment Method to charge this if you are not handling this on your end.

atomic sonnet
#

lets say before they add payment method to their subscription that they realize they have the wrong plan, now they want to update the plan as they are now too lazy to cancel and resubscribe with the payment information after that.

#

note by plan I assume the use of the prices api

quasi pine
#

Sure, our business use case is that we want to entice customers who have signed up to our service on a free trial basis to purchase an annual subscription at the end of the trial, or switch to a monthly subscription and purchase that instead. Having the inability to change plan while the subscription is in paused state yet able to change plan in overdue state forces us to use the "Overdue" language with customers. We would prefer to pause their subscriptions, send them a link to the portal and let them decide if the annual or monthly sub is right for them, then purchase.

#

Does that make sense?

modern kiln
#

Yeah, I'll share that with the team for future product reiterations. Thank you!

atomic sonnet
#

luckily for me I do things differently on our site where basically our trial version only applies to one “plan” and it’s issued outside of stripe. This is due to the fact that what if they cancel their subscription after they trialed it to try to dip again into said trial plan I just wanted to allow customers to only be able to trial a specific plan for the lifetime of their account.

#

And yes it is the thing I just don’t want to risk being possible lol.

quasi pine
#

Ah, I can see another problem with "Overdue" – if the customer waits a month then adds their payment details, it will charge them from the date of the invoice and not the date they added their payment details. So they are effectively paying for a period of time they didn't have access to the service.

#

So, unfortunately, "Overdue" isn't going to work for our business here.

modern kiln
#

In this case, I think you could cancel and create a subscription with the new price on that customer when they come back after a month.

quasi pine
#

That wouldn't be possible via the customer portal would it?

atomic sonnet
#

or you could just create a page on your site that handles it and embeds the payment element using paymentintent

modern kiln
#

No

atomic sonnet
#

and then on the server side before it gets rendered it will check for past due state, delete the sub and then silently recreate it before rendering the element for it.

modern kiln
#

You'd need to handle this on your end.

atomic sonnet
#

Also then you could have a link on your site where they can update their subscription that basically has js that calls said apis that first fetches their subscription, checks if past_due, and if so recreates it and then returns the client secret, otherwise return clientsecret of existing one. Just have the update button only show when they actually have a subscription though (and that it does not return null).