#GatheringNight
1 messages · Page 1 of 1 (latest)
Hi 👋 I'm not certain offhand, but am taking a look.
The only approach I'm finding to set up a payment method for future usage is this one, but it uses the entire Payment Sheet and isn't specific to Apple/Google Pay:
https://stripe.com/docs/payments/save-and-reuse?platform=react-native&ui=payment-sheet
well that creates an intent without an user... which is what we are trying to avoid
Gotcha, there isn't a way to do that in React Native currently.
We have web flows that allow you to defer creating an Intent, but I don't believe that has parity in our mobile integrations yet:
https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web
right, so the only option here is migrating to creating intents before getting customer info from the payment sheet?
we can accomplish the result, but in a way Im not very comfortable with - using createPlatformPaymentMethod
Yes, that is my understanding, that you will need to create the Intent first, and if you want that to be associated with a Customer then you'll need to create the Customer before the Intent.
May not be the cleanest, but it sounds like you may want to create a fairly empty Customer object, and then update it as more information becomes available to populate it with.
thanks for the info - that seems clear now. We werent expecting this change of behaviour, so we'll have to maintain API endpoints/mobile client versions with both
for clarity, what is the recommended path with createPlatformPaymentMethod ?
the docs show it as (Optional) so not sure how to complete the flow
Sorry, where are you seeing createPlatformPaymentMethod?
apologies, I meant createPlatformPayPaymentMethod
Can you point me to where you're seeing this as optional? (We have quite a few different integration paths and it's difficult to memorize the function names for each one, I'm guessing this is back in a React Native guide since I'm not readily recognizing the name?)
sure, 1sec
Thank you!
np!
Oh, that does look like it may do what you're looking for (today I learned, assuming it does 😅 )!
Comparing the code snippet there to the one in the section above, it looks like createPlatformPayPaymentMethod is used instead of confirmPlatformPayPayment and that you omit providing a client secret.
right, my doubt here is the server side component of this. I actually created a Payment intent with that data with no issue
only to realize I have no equivalent method to then confirm it on the client
Hm, I know we have methods for client-side confirmation for web flows, let me search through our RN reference and see if I can spot something.
thank you!
actually
the docs state "If you confirm your payment on your server, you can use Apple Pay to only collect a PaymentMethod instead of confirm a payment. In order to do that, call the createPlatformPayPaymentMethod method"
so if I confirm/capture that payment intent server side, that should suffice?
Good point, I think you can confirm server-side, as that is typically the flow that is followed when only creating Payment Methods from client-side code.
Ok, I just went through the logs on Stripe - this only semi-works. The resulting payment intent has not payment method attached.
That does involve client side changes, I'll see how we can work around it
thank you for your help!
Any time! I need to step away now, but I'll leave the thread open for a bit in case anything comes up, my teammates are around and keeping an eye out.
thanks again - Im also done for the day. Have a good one!
Thanks, you too! 👋