#snackdex

1 messages ยท Page 1 of 1 (latest)

urban roverBOT
small hare
#

๐Ÿ‘‹ 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

inland vale
#

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?

small hare
#

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

inland vale
#

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"?

small hare
#

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

inland vale
#

ah ok. if i were to use stripe credits instead, does that show up in the payment intent sheet?

small hare
#

Customer Balance can be used automatically for paying invoices

inland vale
#

ok. this solves my problem. thank you

#

i do have another question, should i open another message or can i ask it here ๐Ÿ‘€

small hare
#

no no, please do ask it here

inland vale
#

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...

โ–ถ Play video
small hare
inland vale
#

ah ok! so i can continue using the payment sheet?

small hare
#

yes exactly

#

you will use the Subscription's latest_invoice.payment_intent to get the client_secret and send it to your mobile code

inland vale
#

awesome that was my concern! thanks again!