#RaulPrior
1 messages · Page 1 of 1 (latest)
Are you developing a native ios app, android app, or using a framework like React Native?
I use native kotlin code for android
Gotcha
I recommend starting here: https://stripe.com/docs/payments/accept-a-payment?platform=android
That guide is for a one-time payment
But, to convert it into a subscription payment, you would create a subscription instead of a payment intent (following this step essentially: https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements#create-subscription)
you'd pass the subscription's payment intent client secret to the payment sheet
yes I already read that and I'm able to show a payment launch in my app but I dont fully undestood how to link the subscription in my payment launch
so I have to build a subscription and then is there a way to vinculate the susbcription with my payment launch to show it in my app?
This is a stripe payment launcher building in my app
I want to use somethis like this to pay subscription, is that possible?
For this purcharse I use a clientSecret
Subscriptions have something like clientSecret to link the purcharse ?
Yup. That's just a standard payment form using the Payment Sheet and React Native: https://stripe.com/docs/payments/accept-a-payment?platform=react-native&ui=payment-sheet
Once you accept the payment method details (PAN, CVC, etc.) you can set it up for future usage and attach it to a Subscription
Okay so, if I understood correctly the flow is
- create my payment intent server side
- get payment data from my user in mi android app
- create a subscription (server side) and include payment data recovered from my android app
is that correctly ?
You would tokenize the payment method data on the Stripe side first, then use the token to create a Subscription, but yes
Tokenize like this https://stripe.com/docs/api/tokens
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Tokenization happends right after I get users card information in mi app right?
No, sorry. I was using "tokenize" as a general term. If you follow the guide I sent you to accept payment details, you will create a Payment Method object on your Stripe account that you can then use to create payments instead of handling raw card details
Ahhh okay okay I get it, well I will re read the guide to fully understand payment method object