#facu_docs
1 messages ยท Page 1 of 1 (latest)
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- facu_reactnative-ach, 2 hours ago, 15 messages
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1250893727220629606
๐ Have more to share? Add details, code, screenshots, videos, etc. below.
But I need to have automatic validation of the ACH
Can you say more? What are you expecting to happen?
I need to be able to get the setupIntent.paymentMethod?.id
from a PaymentSheet, is this possible?
To clarify, you're finding confirmSetupIntent succeeds, and you get the setupIntent result you expect?
By default that will include the payment method ID on that attribute I expect
what is the shape of the data you get back?
No, sorry, I'll explain again.
This is my current code
const {error, setupIntent} = await confirmSetupIntent(createIntent.stripeClientSecret, {
paymentMethodType: 'USBankAccount',
paymentMethodData: {
accountNumber: data.accountNumber,
billingDetails: {
name: data.fullName,
},
routingNumber: data.routingNumber,
},
});
But I need to change it to PaymentSheet, do I have a way to obtain the same setupIntent that the confirmSetupIntent returns through a PaymentSheet?
Or in another way to be able to obtain the paymentMethod.id of the payment method created through the PaymentSheet?
Still using a setup intent, though?
Yes, my new code with the initPaymentSheet is
const {paymentOption} = await initPaymentSheet({
merchantDisplayName: "Example, Inc.",
customerId: profile.stripeCustomerId,
setupIntentClientSecret: createIntent.stripeClientSecret,
});
But I can't get the paymentMethod.id
Are you calling presentPaymentSheet too the way you're using this?
Yes, I call it from a button to open the payment sheet
Hi there ๐ jumping in as my teammate needs to step away soon.
Taking a look at the code that you shared here, it looks like you've already created a Setup Intent to use as part of this flow. Once the setup flow completes, are you able to retrieve that Setup Intent and find the ID of the Payment Method it created that should be stored in its payment_method field?
That is the problem, how do I recover the payment method to obtain its ID?
You have the ID of the Setup Intent you created, so you can retrieve the intent and find the ID of the Payment Method it created in the payment_method field on the Setup Intent object you retrieved:
https://docs.stripe.com/api/setup_intents/object#setup_intent_object-payment_method
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Ok great, is there a way to obtain it directly when creating the payment method from the payment sheet?
like when using confirmSetupIntent
Not that I'm readily spotting. Calling presentPaymentSheet results in a PresentPaymentSheetResult being returned, and looking in the structure of that I'm not spotting anything that contains the Payment Method ID:
https://stripe.dev/stripe-react-native/api-reference/index.html#PresentPaymentSheetResult
Documentation for @stripe/stripe-react-native