Create subscriptions with a payment intent id

157 views Asked by At

I have a scenario where people pay on my website through a checkout link and I can retrieve the payment intent.

I was wondering if there is a way to create a subscription and attach that payment intent to it so it won't take the payment for the current month and set the subscription active.

Currently, if I create a subscription it charges the client again.

1

There are 1 answers

0
Lucky2501 On

This is how Stripe Subscriptions work fundamentally:

Subscription > Invoice > Payment Intent

You create the Subscription, which generates Invoices, which generate Payment Intents.

It doesn't go the other way, meaning you can't create a Subscription for a Payment Intent.

Officially, you would have:
-One-time Checkout links, which result in a Payment Intent
-Recurring Checkout links, which result in a Subscription

Of course, you could create a Subscription after the one time payment, and skip it's first billing.
Before you do that, make sure your link is set to save the payment method for future use, as it doesn't do that by default.

You can then create the Subscription with the saved payment method, and give it a trial period or a future start_date with Subscription Schedules to skip the first billing period.