#wullig
1 messages · Page 1 of 1 (latest)
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.
Thanks. The "issue" with creating the subscription first is that I wouldnt be able to give a trail collecting the paymento info first, right?
Yes. When you create a Subscription with a trial, it contains a pending_setup_intent that you can use to collect payme upfront: https://stripe.com/docs/api/subscriptions/object?lang=dotnet#subscription_object-pending_setup_intent
Ok, so which approach you suggest then? If I want to start the trail ONLY with payment info?
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
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
If you use Checkout Session to create the Subscription, then that's how it works.
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 ?
No, it's much simpler
Create a Checkout Session in subscripiton mode, redirect users to the Checkout Session url and... that's it.
You can learn more about this here: https://stripe.com/docs/billing/subscriptions/build-subscriptions
mmh I think App store wasn't happy about that
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.
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?
That depends on what exactly the product you offer is. "extra functionality" sounds like something that Apple/Google will require you to use their own In-App-Purchase APIs for yes, and not payment processors like Stripe.
https://stripe.com/docs/apple-pay?platform=ios#using-stripe-and-apple-pay-versus-in-app-purchases:~:text=Apple’s developer terms require their In-App Purchase API be used for digital “content%2C functionality%2C or services%2C” such as premium content for your app or subscriptions for digital content. Payments made using the In-App Purchase API are processed by Apple and subject to their transaction fees.