#rafal-subscriptions

1 messages · Page 1 of 1 (latest)

idle ferry
#

@opal garden hi! If it's for a trial, you would create a Subscription, it doesn't need a payment method. As you mention, there is a pending_setup_intent returned on that object that you can use in a payment form to then add a payment method to the customer for the subscription.

It can be a bit weird yes since you create the Subscription upfront and then ask for the payment details but that's how it's designed. You don't have to do it that way though, you could manually create a SetupIntent and have the customer enter their info, and then after that completes, create the subscription on the backend, that's totally an option as well.

Overall my answer would be quite simply : just use Checkout, it sets everything up properly for you and it supports trials. https://stripe.com/docs/billing/subscriptions/checkout

opal garden
#

And what about "pending_setup_intent" on the subscription, if I create SetupIntent manually, there will be no duplicates of the object?

idle ferry
#

it won't create a pending_setup_intent if there's already an attached payment method that was set up

idle ferry
#

can I ask why you don't use Checkout?

idle ferry
# idle ferry there isn't a full document for the exact flow no

but basically :

opal garden
#

sure, we don't use the Checkout form because checkout is redirected to an external stripe URL and we are not able to put it on the iframe.

#

We would like to keep our web URL

idle ferry
#

fair enough! it does add a lot of development work and maintenance to build this yourself, but is it possible! hopefully the above helps