#nerder-payment-intent-prices
1 messages ยท Page 1 of 1 (latest)
Hey! Correct, Payment Intents only currently accept an amount parameter (no line items like Checkout)
Instead you'd pass the Price objects when creating the Subscription, which would in turn create the related Payment Intents
Ok, so what will be the actual correct scenario for subscriptions?
Have you checked out our guide? https://stripe.com/docs/billing/quickstart
We are looking for a user experience like the following:
The user check on the different types of sub we offer, as soon as they chose one they are prompted a payment sheet directly in the app from where to add their payment details (if they don't have any payment method registered just yet) and then pay
the thing with checkout is that in order to use it we need to redirect our users outside the app, and we would like to integrate that in our app experience
by doing a custom integration using the Stripe API
Yup, this is completely possible with a custom integration using Stripe.js and our APIs. Link below details a basic integration in your preferred languages
english is fine btw ๐
Payment Intent is the object that facilitates a payment and tracks the state of that payment.
Setup Intent is the object that facilitates creating and saving a payment method for future payments.
I meant programming language ๐
ahh our mobile app in in flutter therefore we are using this at the moment: https://github.com/flutter-stripe/flutter_stripe
but there are no example of creating a sub there
anyway in alternative a TS/JS integration is fine, if we understand the concept we can port it then
Sweet! Yeah that's a third-party lib so we have a little understanding of it. Although the maintainers hang out on this Discord
If you have any specific questions, I'm happy to help
Ok, so probably the best for me will be to have a chat with the maintainers directly and explain them the problem
Well I can try help with any Stripe specific stuff and even Flutter
Ow amazing
ok then the issue here is that we don't understand the actual flow, basically we were using what they called paymentSheet
but this seems to actually support only PaymentIntents which for our understanding are not supposed to be working with subscriptions
but maybe the way to go there is to actually create a setup intent first, save the payment method and then subsequentially let the user buy their chosen sub
Yeah I don't think that library has support for Subscriptions per se
So you'd likely:
- Create Subscription server-side
- Capture payment method (via the Flutter UI)
- Confirm the Payment Intent or Setup Intent from the Subscription object (also via Flutter)
Really not too different from our regular integration
Yep. What you want is this: https://stripe.com/docs/billing/subscriptions/build-subscription?ui=elements
But obviously adapt client-side components for Flutter
so in my head will be this:
The user has no payment method registered yet, as soon as they tap on the sub we are going to create the customer and subscription (server side), then we create the setup intent in order and we return the client secret, from there we prompt a UI in order to capture their payment method details and send the request back to Stripe
I think it's quite clear, i'll try to spike this one out adapting it with the flutter use-case and hopefully it works ๐ ๐ ๐
Thank you so much and sorry for rubber duck this with you, I needed it eheh