#Shahzaib

1 messages · Page 1 of 1 (latest)

broken auroraBOT
strong vortex
urban vortex
#

Can you guide me a little more,
I am using react for frontend and nodejs for backend
I have already implement credit card logic and it's working fine.
So, Now can I use bank account number and routing number to create payment method code: const { error, paymentMethod } = await stripe.createPaymentMethod({
type: 'us_bank_account',
billing_details: {
name: 'John Doe', // Replace with the actual name of the customer
},
us_bank_account: {
account_holder_type: 'individual',
account_number: '000123456789',
routing_number: '110000000',
},
}) and then pass paymentMethod.id as card token and process the payment as I am doing in credit card flow?

strong vortex
#

Is there a guide you're following for this?

urban vortex
#

No, just trying to use given methods from stripe docs to rework already written code for credit card.
That's why asking you for guidance

strong vortex
#

Are you trying to save a payment method before charging? OR just straight up charge the payment method?

urban vortex
#

just straight up charge the payment method

strong vortex
#

For credit card payments, are you using PaymentElement?

urban vortex
#

I was using PaymentElement for credit card // const { error, paymentMethod } = await stripe.createPaymentMethod({
// type: 'card',
// card: elements.getElement(CardElement),
// })
But for now i am using hardcoded account number and routing number for testing stripe.createPaymentMethod({
type: 'us_bank_account',
billing_details: {
name: 'John Doe', // Replace with the actual name of the customer
},
us_bank_account: {
account_holder_type: 'individual',
account_number: '000123456789',
routing_number: '110000000',
},
})

strong vortex
#

also you seem to be using CardElement for the credit card payments (NOT payment element)

CardElement doesn't support ACH direct debit.