Reputation: 5977
We are currently using Stripe to offer a subscription service with 30 days free trial. Since we don't want the customer to be able to start the free trial without authorizing one payment method we use the SetupIntent
of the created Subscription to present a card input to our client. Now the issue is that even before the customer is shown the card input the subscription is already created and "paid" for because it is a free trial.
This means that we cannot listen to the initial invoice.paid
Webhook to activate the account, but instead need to listen to setup_intent.succeeded
. This seems a bit odd and requires us to link the SetupIntent
to a Subscription
. It also means that when a customer cancels the subscription process before entering their card details, that Stripe still has created an active Subscription in trial.
Is there something we can do differently, or should we just accept that the subscriptions where the SetupIntent
was aborted will be inactive on the Stripe side once it tries to pay for the next (non-trial) invoices?
Upvotes: 0
Views: 1700
Reputation: 2163
Stripe's docs use the Setup Intent that's created with a trialing Subscription to collect a customer's Payment Method, but for your use case it may make more sense to create your own Setup Intent up front and not create the Subscription unless the Setup Intent it successful. It'd go something like this:
Alternatively, you could try using Checkout which does require users to submit a Payment Method even from trialing Subscriptions
Upvotes: 1