#alexzada-react-native
1 messages ยท Page 1 of 1 (latest)
I would like to know how I can make a purchase in installments on the card
I'm not sure if this can be done in React Native, but have you looked into this as a solution yet: https://stripe.com/docs/payments/installments
yes, but this is only available for users from Mexico, I'm in Brazil
the actual backend of the application is in Python, I'm testing it on node only for now
Ah, so you'd have to do a lot of custom coding on your end to simulate installments then. I don't think we have another product that allows for installmenst "out of the box" (so to speak). Are your clients end-customers (e.g. consumers)? Or businesses?
my end-customer is consumers, who use the app to transport their products
I think the custom code I would need to do will be just a select with the number of installments based on the value of the product, but I don't know how to pass this in the request, within which object, and how to make Stripe cover this monthly value
sorry for my bad english, i using the translate
๐
Let me check if there's a goo place I can point you
ok, did I manage to make my problem understandable?
Yeah, that makes perfect sense. This would not be doable via React Native alone. I would look here to start: https://stripe.com/docs/billing/subscriptions/subscription-schedules/use-cases#installment-plans
I confess that I still don't understand what React Native's role is in this part, wouldn't it just be a parameter passed to the request that creates the PaymentIntent, or something similar?
๐ stepping in here.
hello bismarck ๐
You would handle creating the Subscription Schedule for installments on your server.
The React Native part would just be to collect card details using the CardField or PaymentSheet Component
Ah yes, that I think I get it, but how would I handle the parcels in the backend? For example, how do I know how many installments the customer has chosen, what their value is. Also, I was looking at the link that @odd eagle sent me, and I saw that the request has the product, but in my case, I don't have a specific product, it's simply a race that will be paid, but maybe I may be misunderstanding
Yeah you would track this in your Database. And you would need to create a "Product" within Stripe to represent your race. You will want to read about how Subscriptions and Subscription Schedules work in general within Stripe to understand the different objects you will need to create. I'd start with reading through https://stripe.com/docs/billing/subscriptions/overview and https://stripe.com/docs/billing/subscriptions/subscription-schedules
Will I need to create a product to then handle this type of payment?
Yes you would need a Product and Price as that is required for a Subscription within Stripe
ok, thanks a lot for the help, you guys are amazing!
Sure thing!
@vagrant salmon @odd eagle how could I pass iterations as a parameter in the request, being the value of the client's choice in the front end?
it's not an error, it's that the value of iterations is fixed in the code, I need it to be a value that the customer chooses, for example: the value is 900, the customer can pay in two times of 450, or in 3 times of 300, he would choose the best for him, understand?
Gotcha. You need to create these scenarios yourself and pass them to the backend based on what the client chooses. Then you would use a variable on your backend based on what you passed from your client to create the Sub Schedule with the correct amount of iterations and the correct Price
So i can create a variable called subscription_schedules_iterations in my front end, which will be a selected that the client will select, then pass it as a parameter to my route that handles the payment and put the value of iterations: request.body.subscription_schedules_iterations?
Yep