#Matt P
1 messages · Page 1 of 1 (latest)
There seems to be 2 questions here, so let's work on one at a time:
Problem is, I have to manually cancel those subs if the user doesn't complete it. Is this just how its supposed to work?
You can programmatically cancel the subs rather than manually cancel them, but yes: once a subscription is created and left in anincompletestate you have to do something with it to get it to go into a cancelled status
You can also adjust what happens after failed payments for the subscription here: https://dashboard.stripe.com/settings/billing/automatic
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Ya sorry when I said manually I meant programmatically. I dont want to have to do that.
Ah, okay unfortunately I don't think there's a way around that
it also feels wrong to have to create an incomplete sub just to get the client secret that is needed to render the payment element
I can get one with payment intent but that doesn't create a sub for the user when they complete the payment
You could alternatively use Setup Intents to set up a Customer object with a valid Payment Method before ever getting to the subscription step. The Setup Intent has a client secret that you pass to the Payment Element instead and the result (on success) is a new Customer with a valid Payment Method that can be used with a new Subscription
I dont think that would work for my case. We already have the user as a free customer and their stripe customer id is used in another system of ours
I want the users subscription to be create and set to active when they submit payment info and payment succeeds
I want the users subscription to be create and set to active when they submit payment info and payment succeeds
Is this not already happening right now? Your original question what completely different and didn't seem to indicate there was something wrong with the successful payments flow
No I have to create an incomplete sub in order to get the secret. But if the user leaves and comes back another sub will be create leaving the old one incomplete.
I think you may be misunderstanding. You can handle the collection of Payment Method details as a separate step and then use those payment details to charge for a new subscription instead of passing in the client secret from the Subscription's payment intent. That would set up the Payment Method for future usage, so then if the customer comes back at that point you wouldn't have a Subscription already
Is there a doc to show this?