#arielapaula_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always 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/1238549969850335335
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Hi ๐
This appears to be transmitting raw details in your custom checkout form. We strongly recommend against that.
This would all be much easier if you integrated with the Stripe Payment Element.
https://docs.stripe.com/payments/accept-a-payment?platform=web&ui=elements
But is there a recommended way to use my custom inputs? I have a custom design for it
When you make the API call with await stripe.createPaymentMethod() you should get the Payment Method in the response. Can you share an ID?
sure, this is one example: pm_1PEwrsJn1cC6kOJBikpdxz0c
Thanks!
Okay so this is an unattached payment method. There ins't a place in the Stripe dashboard where you can see this but it was successfuly created
If you want to see the payment methods that you have created using this approach, you can use the List Payment Methods API: https://docs.stripe.com/api/payment_methods/list
Thank you! How can I attach the payment method to a user email?
- You would need to create a Customer record, passing the email in to help you identify them, https://docs.stripe.com/api/customers/create
- You would attach the Payment Method to the Customer record: https://docs.stripe.com/api/payment_methods/attach
But I should mention that this approach is a legacy way of doing this and we don't recommend it.
I would strongly recommend you to consider following the integration flow we show here: https://docs.stripe.com/payments/save-and-reuse
Thanks! Will consider updating this.
How can I submit the bank account payment with this legacy approach? For credit cards we are using:
const { error, paymentIntent } = await stripe.confirmCardPayment(clientSecret, {
payment_method: paymentInfoId ? paymentInfoId : (paymentInfo?.stripeId || paymentInfo?.id),
})
Is this on your client-side?
For legacy Stripe.js approaches we have separate confirm functions for each type of payment method. You can see them here: https://docs.stripe.com/js/payment_intents/payment_method
Review the navigation links in the left side nav
yes, it's on the client side.
So I should use stripe.confirmUsBankAccountPayment, right?
Correct
thank you!
Happy to help ๐