#Matt P

1 messages · Page 1 of 1 (latest)

atomic sonnetBOT
slow bison
#

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 an incomplete state 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

daring pebble
#

Ya sorry when I said manually I meant programmatically. I dont want to have to do that.

slow bison
#

Ah, okay unfortunately I don't think there's a way around that

daring pebble
#

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

slow bison
#

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

daring pebble
#

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

slow bison
#

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

daring pebble
#

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.

slow bison
#

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

daring pebble
#

Is there a doc to show this?