#wullig

1 messages · Page 1 of 1 (latest)

glad jewelBOT
tawny meadow
#

Hi there!

#

You would listen to webhook events to know when the SetupIntent is successfull. And when it is, you create the Subscripiton from your backend server.

#

However note it's simpler to first create the Subscription, which will automatically create the SetupIntent for you.

tulip fox
#

Thanks. The "issue" with creating the subscription first is that I wouldnt be able to give a trail collecting the paymento info first, right?

tawny meadow
tulip fox
#

Ok, so which approach you suggest then? If I want to start the trail ONLY with payment info?

tawny meadow
#

If you create a subscription with a trial, it will start immediately whether you have payment info or not.
So you have two options:

  • First create the subscription, but then cancel it if you don't get the payment details within X minutes
  • Or first create the SetupIntent and then start the Subscriptions
tulip fox
#

I think creating the intent first and then start the subscription makes more sense. Thanks.

As a side not, I find it very strange that's not an option! Would be nice to have a flag to indicate to start the trail only after we have the payment info, since almost the norm any subscrition service

tawny meadow
#

If you use Checkout Session to create the Subscription, then that's how it works.

tulip fox
#

ah

#

There are so many ways of doing things 😅
So how would that work?
Create a checkout session with the subscrition as item, and then use the returned payment_intent ?

tawny meadow
#

No, it's much simpler

#

Create a Checkout Session in subscripiton mode, redirect users to the Checkout Session url and... that's it.

tulip fox
#

mmh I think App store wasn't happy about that

tawny meadow
#

This has nothing to do with using Checkout Session or not.

#

But yes, if you are making a native application, you need to follow Apple guidelines.

tulip fox
#

I'm so confused my everything, sorry, first time trying to implement payments.

I have a website (and soon app) in which you can buy a premium subscription to unlock extra functionality.
In the website I'm using stripe, and it's all good.

In the app I should avoid stripe and use Apple's payment system then?

glad jewelBOT