#Tushar321321 - confirm payment intent

1 messages · Page 1 of 1 (latest)

tame hearth
#

It can show you how to set up and charge an ACH payment method

lone lion
#

yes i read all ready this doc

#

but i can't find way for confirm payment intent.

#

what should i pass value for this api for confirming intent and it made through us_bank

serene ginkgo
#

you need confirm: true also

lone lion
#

it successfully confirm with card
but not with us_bank_account

#

waiting for help guys.

tame hearth
#

Actually, first. What are you currently passing in for the payment_method parameter?

lone lion
#

req_Q9US4DwfUWLiOj

#

i am not passing any payment_method while creating payment intent
i am just passing
const paymentIntent = await stripe.paymentIntents.create({
amount: 1099,
currency: 'usd',
setup_future_usage: 'off_session',
customer: 'cus_LkofzVpLafpCEP',
payment_method_types: ['us_bank_account'],
payment_method_options: {
us_bank_account: {
financial_connections: {permissions: ['payment_method', 'balances']},
},
},
});

tame hearth
#

So in that call you are trying to charge a card payment method but you set up the payment intent to only accept bank account payments

lone lion
#

yes

tame hearth
#

In the guide that I linked to, it shows how to create a payment method for a US bank account. Are you running in to trouble with the steps to do that?

lone lion
#

yes

#

i already set bank account at customer side and create payment intent with us bank account
but i unable to confirm it.

#

waiting for help

solemn fable
#

@lone lion the server is a little busy. please give us a moment to catch up, thanks!

lone lion
#

sure waiting for you great response.

tame hearth
#

Can you show us what you did when you set the bank account on the customer side? What call did you make for that?

lone lion
#

sure give a moment

#

i created account through api

#

also add bank account through api

tame hearth
lone lion
#

this are the my two payment method 1 is card and other one is us_bank_account.

tame hearth
#

Awesome! So that bank account should also have an ID assosciated with it that starts with pm_

#

You can see it in your browser by clicking on it in your dashboard and then it will be in the URL of the page you are taken to

#

If you pass that in instead of pm_card_visa, you should be able to confirm that payment intent

#

You can get that ID via the API call that you used to create it as well

lone lion
#

i think id start with ba_.

tame hearth
#

Right, I forgot about that. I think you may be able to pass that in even though it doesn't start with pm_

#

Can you send me that ID quickly as well

lone lion
#

ba_1L3b2yJCzrRD2oBAsa7Jo8Id

tame hearth
#

Can you try passing in the ba_ ID?

lone lion
#

are you saying like that??

tame hearth
#

Yes, just to test it here

lone lion
#

that id not working at all

tame hearth
#

Can you send me the request ID for that?

lone lion
#

req_JcfkYlfUkk7nCu

tame hearth
#

Thank you, checking in to this error

lone lion
#

Waiting for your response

tame hearth
#

Still, looking in to this. I see you created the bank account server-side. Is that just for this testing or are you expecting to pass the raw bank account numbers back to your server when this flow goes live?

lone lion
#

Yes for the confirming payment intent created through us bank account.

tame hearth
#

Yes, this is what you are expecting to do or yes this is just for testing?

lone lion
#

Whenever testing is done I will push code with live parameters.

tame hearth
#

That will allow you to successfully confirm these payments without setting up a bank account from client side info

lone lion
#

Ok what if I used this flow in live mode it will work or not ?

#

And what I should pass payment method using bank account.

#

In live mode

tame hearth
#

In live mode we highly recommend collecting the bank account details via Stripe Elements as we do in the doc I linked you to. The regulatory requirements are easier to meet than if you are passing raw bank account details to your backend.

#

We can look at how to do this entirely server-side if you want but this is the typical flow for setting up a bank account for payment.

lone lion
#

But bank account don't have a payment id

tame hearth
#

I was a bit confused there on the differences between your process and what I am used to. The process that I linked to will create a Payment Method with a pm_ ID for you.

I think you can also use the ba_ ID that you got from the process that you have been doing, but like the error message said, you need to pass in the setup_future_usage and mandate_data parameters when confirming the payment intent. I will get the docs on those if you want to test with that

lone lion
#

Ok thank you