#lafafm
1 messages · Page 1 of 1 (latest)
Hi there!
By "user don't finishing his registration flow", you mean that the user doesn't have a default payment method set in Stripe?
Yea, in the prev thread (which I linked) I provided some steps
1. Create a Customer
2. Create a Subscription (and get PaymentIntent from it)
3. Send a PaymentIntent back to the front to process a card (validate 3ds if needed)
4. Send a confirmation back to the server and create local user / etc.
If on step 3 customer decline 3ds for example, or just close the page on 3ds step - we'd have an active trial subscription, which doesn't have any local user attached to it, as well as payment method
The question is how to avoid that situation for subscriptions with a trial
Got it. For step 3, if the subscription is for a free trial, I guess you are using a SetupIntent and not a PaymentIntent as mentioned in your message?
I don't think we have an automatic way to cancel these subscriptions. But that's something you can do on your end:
- listen to
customer.subscription.createdevent - after some delay (maybe 20 minutes), check if the customer or subscription have a default payment method set
- if there isn't, then cancel the subscription
Yea, got it
Can we instead of canceling it - mark it as expired manually? Or just some other status except of canceled?
No the only status you can set yourself is canceled. But another option is to add metadata to the subscription to store your own status. https://stripe.com/docs/api/subscriptions
👋 taking over for my colleague. Let me know if there's any follow-up Qs I can answer!