#hume-jacob_incomplete-subscriptions-handling
1 messages · Page 1 of 1 (latest)
👋 Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1345073700789162045
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi, what have you tried so far?
At a high level, yes, you could use the Customer Portal, https://docs.stripe.com/customer-management/configure-portal to only collect payment methods sure.
Sorry missed the ping
The system we've been using has worked well
But we had an issue because we were assuming that if you get a subscription it will start as active, or not be created
So we weren't handling the inactive state
Hi! I'm jumping in here; gimme a sec to absorb this (and all the other conversations I'm now working on 🙂 )
I was thinking that if a user is inactive, it would be incorrect to start a new checkout for them, because they might be able to go to the portal and then have two subscriptions of the same thing, and get doublecharged
So I think what's recommended here, I imagine, is to funnel users to the user portal to fix their subscription that landed inactive, is that correct? (and that it is not correct to have them start a new Checkout Session)
Yes, that's correct.
Can you share an ID from your Dashboard related to this so I can peek at the specifics and hopefully give you more than a three word answer? :chortle:
Hmm, you mean an ID of a subscription?
Yes, please.
Well, so the tricky thing we have is that we have one set of subscriptions for a set of prices related to a product (say we've got a service A that we're trying to offer subscriptions to, and it has a set of prices) and another set of prices related to another product (service B). We find that when a user has only an inactive subscription, it shows up on the portal, but if the user has one inactive for service B and one active for service A, the user can only manage the active service A subscription and cannot remediate the service B subscription.
One example of this in production is customer cus_NaOPe89V6s5nGB with valid subscription for "service A" sub_1PXpWSHu5QhcXEGNeY7NidLA and an incomplete one for "service B" called sub_1PXpWSHu5QhcXEGNeY7NidLA
So I guess the heart of the question is that it doesn't seem like there's anything for a user to do in this case where they have an active subscription and an incomplete one... I think it works fine if all they have is an incomplete one.
This is what the user saw (this is an account of an employee who was testing)
I also have a screenshot of a different user in test mode who just has the incomplete subscription that I can show you if you think it's helpful, but I think that case mainly works correctly
Looking...
Thanks, I know you must be fielding a lot of questions simultaneously
Nonzero number. 🙂
You're gonna slap me if I request that you "timebox" the other peoples' requests 😂
ಠ_ಠ
but also 10/10 no notes except "ಠ_ಠ"
Unfortunately (apparently) the Customer Portal can't be used for incomplete Subscriptions, so you'll need to handle those in a different way.
Huh, so maybe we can then just use another checkout
I think I'd have to block users from using the portal when they have an inactive subscription then, right? Because maybe they could have multiple incompletes
That's a great question.
Because it seems like it sort of works but sort of doesn't, so I should be hiding it
It might be that you instead want to do some kind of union/fallthrough, where you look at all their (active) subscriptions and give them the highest whatevers that they've paid for.
but in the case of those Apple Pay incompletes, you would look for the Payment Intent's status to see if it's requires_payment_method. There are also events to indicate this. Then bring them back to add a payment method that works.
https://docs.stripe.com/billing/subscriptions/overview#requires-payment-method
Then bring them back to add a payment method that works.
To reiterate, perhaps, though, the thing I would have to bring them back to is some UI I create that ultimately recollects payment methods and retries payment methods
We have such a thing - lemme find it.
hume-jacob_incomplete-subscriptions-handling
Oh I love things
https://docs.stripe.com/billing/subscriptions/webhooks#payment-failures says what to do, and I'm pretty sure you can use Checkout or Payment Elements to do it.
If you’re using PaymentIntents, collect new payment information and confirm the PaymentIntent.
Or send them a link to the Hosted Invoice Page for the unpaid invoice: https://docs.stripe.com/invoicing/hosted-invoice-page#payment-method-persistence
The Hosted Invoice Page kind of sounds like the exact thing we want here
You don't happen to have more docs handy on that topic, do you? Just seems like a paragraph there
Oh wait I'm scrolling up lol
Looks like I should just be able to send the user to the link contained here: https://docs.stripe.com/api/invoices/object#invoice_object-hosted_invoice_url
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yuppers - but that'd be specific to the case where it was payment_method_required.
I also have to fly, but my colleague can help with anything further you've got. 🙂
I guess my remaining question then is what cases there are that are not payment_method_required
You can refer to how PaymentIntents work here: https://docs.stripe.com/payments/paymentintents/lifecycle?intent=payment
Let me know what specific questions you have there