#maxime1992

1 messages ยท Page 1 of 1 (latest)

eternal kayakBOT
inland bone
#

hi there!

#

so you have an existing subscription witha. free trial, and you want to upgrade that subscription to paid?

#

do you have a payment method saved for the customer or not?

hoary wind
hoary wind
# inland bone do you have a payment method saved for the customer or not?

Could be, but most users won't at this point. So I was hoping to have a UI similar to the customer portal where one can add a payment method and pay.

Except that it'd have a product/price pre-selected and you wouldn't be able to see others AND that it'd update a subscription, not create a new one

inland bone
#

you have mumltiple options for this. the simplest one is probably the customer portal.
otherwise you can use a Checkout Session in setup mode to collect a new payment method. then upgrade the Subscription, and update the payment_methood property with the new PaymentMethod you just colelcted.

hoary wind
#

the simplest one is probably the customer portal
Customer portal shows too many information for all the subscriptions. And because the user will already have selected what he wants on the web app, it wouldn't make sense to see all the subscriptions. So I'll pass on that option

you can use a Checkout Session in setup mode to collect a new payment method. then upgrade the Subscription, and update the payment_methood property with the new PaymentMethod you just colelcted
Yeah that was the last option I had in mind, because it'll have to be "multi stage". We'll ask the user to add a payment ourselves and then select what the customer wants. I was hoping there would be a page to pay for a specific subscription which would update it but I think it doesn't exist (does it)?

#

Ideally it'd be a checkout session where I can specify an existing subscription. That'd be perfect

inland bone
#

I was hoping there would be a page to pay for a specific subscription which would update it but I think it doesn't exist (does it)?
actually there is! if you update the Subscription and it requires payment, then a new Invoice for that Subscription will be created. And the invoice contains a hosted_invoice_url (https://stripe.com/docs/api/invoices/object#invoice_object-hosted_invoice_url) you can send to the customer to pay for that Invoice

#

Ideally it'd be a checkout session where I can specify an existing subscription. That'd be perfect
no that's not possible.

hoary wind
inland bone
#

got it. then the Checkout Session in setup mode is probabbly the best option for you.

hoary wind
#

When doing that, what is the behavior going to be?

    1. customer has an ongoing trial: Will it wait for the end of the trial and automatically take the money from the customer when the trial ends?
    1. customer has a trial that expired and we do this setup mode AFTER the trial was already expired: Will it just add the payment method and we'll need to make an extra call somewhere to start the subscription or is there a way to automatically make the customer pay for the subscription? I think I tried that yesterday and that it was only adding the payment method without making the customer pay but I could be wrong
inland bone
#
  1. yes, customer will be only charged once a non-zero Invoice is created, which should happen when the free trial ends
#
  1. I'm guessing there's an unpaid invoice in this case?
hoary wind
#
  1. I'll run the test again to find out
inland bone
hoary wind
#
  1. I just verified and it only adds the payment so yeah looks like I'll need an extra api call
#

Although, I haven't used line_items but I guess I cannot use it in setup mode

inland bone
#

correct, setup mode is just for collecting a PaymentMethod, nothing else

hoary wind
#

Gotcha. Well I think I've got all the options I can go with now. Thanks for the help

inland bone
#

happy to help ๐Ÿ™‚

hoary wind
#

May I ask out of curiosity: Are you a developer on rota to answer on discord according to some schedule or do you only answer to discord?

inland bone
#

we are developers working for Stripe.

hoary wind
#

That's pretty cool.
Can you tell me what's the ratio of you answering on discord VS working your day to day job to code?

#

If not it's ok but I'm kind of amazed that a company decided to have rota with their devs to answer community questions faster. It's one of the main reason I'd personally chose stripe over other solutions because it's so helpful.

So I really wonder what's the ratio like between answering on discord vs working on your projects ๐Ÿ”

inland bone
#

to be more precise: we are developers specialized in answering developers question. however this is not a technical question, so I can't really discuss this on Discord.

hoary wind
#

Fair enough ๐Ÿ™‚ Thanks!