#snackdex
1 messages ยท Page 1 of 1 (latest)
๐ happy to help
yes you can create as many payment intents as you want per customer
although you can use the same one you created on the web to validate on the mobile app if the PaymentIntent isn't in a terminal state
such as successfully paid
say that it is a different one. does that mean that i have to "lock" credits on my end so that they don't get applied to both payment intents?
it's really up to you to decide how to handle that business logic
you can also benefit from the deferred integration flow so you don't have to create the PaymentIntent before the customer validates the payment info
ah ok. if i'm reading this right then that means:
- user creates a deferred payment that gets sent to the customer (but doesn't pay yet)
- when that same user creates another deferred payment then i would already have deducted the credits from the first one so this one would not incorporate those credits
i would just have to give them back those credits if the deferred payment was never "paid"?
no
that's not what I'm saying
1- customer visits your website/mobile app
2- customer enters their payment details and validates
3- only at this point you create the PaymentIntent (you can calculate the right amount here)
4- Validate the payment on the frontend
5- once the payment succeeds (you can listen to the payment_intent.succeeded event through a webhook endpoint) then you can deduct the credits from your own db
ah ok. if i were to use stripe credits instead, does that show up in the payment intent sheet?
Customer Balance can be used automatically for paying invoices
but for PaymentIntent what you can do is calculate the right amount minus the credit balance in (3) and then in (5) you can modify the credit balance https://stripe.com/docs/billing/customer/balance#modifying
ok. this solves my problem. thank you
i do have another question, should i open another message or can i ask it here ๐
no no, please do ask it here
so i used: https://www.youtube.com/watch?v=O6TWFuZw2uk&list=PLy1nL-pvL2M6AMi4m_vqIz5SrTTz9L3co
to get payment sheet working and everything. do you guys have a video for doing the same thing but for subscriptions in react native? (i haven't been able to find a guide)
Stripe's React Native SDK provides a convenient API for allow developers to accept payments natively in their applications in a performant way.
In this video, Charles Cruzan and Cecil Phillip discuss some of the capabilities of the SDK and show us how to get started. They go over topics such as getting setup, invoking the paymentsheet, adding d...
you can follow this guide https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements
the only difference would be in this step https://stripe.com/docs/billing/subscriptions/build-subscriptions?ui=elements#collect-payment
where you replace the Stripe Elements with Payment Sheets
ah ok! so i can continue using the payment sheet?
yes exactly
you will use the Subscription's latest_invoice.payment_intent to get the client_secret and send it to your mobile code
awesome that was my concern! thanks again!