#dante0-subscriptions
1 messages · Page 1 of 1 (latest)
hi! there's not a really a great solution here since it's pretty inherent to how our APIs work.
The main thing I can think of and our actual product answer here is to use Checkout instead, since then there's no Customer object created until after they pay in the hosted page so you only have to handle successful payments/customers after that point (https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-customer_creation)
Thanks for the reply - unfortunately not able to use checkout as client doesn't want a redirect. Is there a way to create a payment intent then create a subscription with that payment intent as the first payment?
Not really. A sort of hack there is you create the PaymentIntent for the amount of the first billing period and then after it succeeds you create a Subscription with a trial period(to skip the first payment) . But you still need a Customer object upfront since the PaymentIntent has to attach the PaymentMethod to something or the subscription will have nothing to charge next month, so it doesn't really help I think.
I thought of this but I thought this could create some confusion with the first invoice being for 0.00
I'm not a Stripe employee, but if the problem is lots of empty customers for users who didn't complete the flow, you could add a scheduled/cron job to delete them from your database once they're 30 days old or something.
That's my current solution but it's hacky
yeah that's an option too. It'd definitely a known pain point that you can end up with a lot of unwanted data in an account. We have some ongoing initiatives like Guest Customers to try to alleviate that and the change in the recent API version to change the default value of customer_creation for Checkout is part of it, but we're not there yet and it's not ideal.
yep it's not ideal for that reason indeed
I've been trying to find the docs for guest customers is this a flag I can specify when creating a customer. Or is this only supported internally for now?
the latter, you can't explicitly create a guest customer right now in a direct API integration (I see how it would help in this use case and I think that's what the team wants to do support eventually)
Thanks for the help. Is there at least a way to bulk delete customers or do I have to make the API requests one-by-one.