#beinggandhi
1 messages ยท Page 1 of 1 (latest)
Good question. Let me see what you can do here
Which of our bank account payment methods is this? ACH?
yes
Do you have any request IDs (req_123) related to your account trying trying to set up a bank account this way?
Attached is the code we are using
Do you have the code for how you set up your payment intent?
I send the code above
this is the payment intent : pi_3LwuRXHaof0IjCDr1EnCuwyk
.collectBankAccountForPayment({
clientSecret: paymentInt.client_secret,
params: {
payment_method_type: 'us_bank_account',
payment_method_data: {
billing_details: {
name: 'test_email',
email: 'test_email@gmail.com',
},
},
},
expand: ['payment_method'],
})
async function confirmPayment(clientsecret) {
stripe
.confirmUsBankAccountPayment(clientsecret)
.then(async ({ paymentIntent, error }) => {
console.log('setup Intent ', paymentIntent);
console.log('error', error);
if (error) {
setLoginMessage(error.message);
setLoaded(false);
// The payment failed for some reason.
} else if (paymentIntent.status === 'requires_payment_method') {
// Confirmation failed. Attempt again with a different payment method.
} else if (paymentIntent.status === 'processing') {
// alert('processing ');
await sendStatus('ACH_SUCCESS');
setACHSuccess(true);
setLoaded(false);
// Confirmation succeeded! The account will be debited.
// Display a message to customer.
} else if (
paymentIntent.next_action?.type ===
'verify_with_microdeposits'
) {
console.log(paymentIntent);
await sendStatus('ACH_MANUAL_VERIFICATION');
// The account needs to be verified via microdeposits.
// Display a message to consumer with next steps (consumer waits for
// microdeposits, then enters a statement descriptor code on a page sent to them via email).
}
});
}
Thank you, still trying to look at that payment intent but the system is a bit slow for me at the moment.
Can you look through your server side code for when you create the payment intnet? https://stripe.com/docs/payments/ach-debit/accept-a-payment?platform=web&ui=checkout#enable-ach-direct-debit-as-a-payment-method
I think this comes down to the permissions requested when creating the intent. If you are requesting more permissions than payment_method, you can probably remove the other items in that array that you are passing in
"us_bank_account": {"financial_connections": {"permissions": ["payment_method"]}},
},```
We are not using
Sorry linked to the wrong section https://stripe.com/docs/payments/ach-debit/accept-a-payment?platform=web&ui=API#web-create-payment-intent
we are using :
stripe.collectBankAccountForPayment
and
stripe.confirmUsBankAccountPaymen
Should be something like stripe.payment_intents.create?
The use case is we want to store the bank payment method so we can decide to turn on subscription later
We do a 50 cent transaction
so we can get the bank details while onboarding
That collectBankAccountForPayment call is in your client side code, there should be server side code as well that is setting up this payment intent or subscription. I think that that code may be asking for too many permissions here
Ok this is the code on the server side
paymentIntent = stripe.PaymentIntent.create(
amount=51,
currency="usd",
setup_future_usage="off_session",
customer=stripeCustomerId,
payment_method_types=["us_bank_account"],
payment_method_options={
"us_bank_account": {
"financial_connections": {"permissions": ["payment_method"]},
},
},
)
stripeData = {}
stripeData['paymentIntent'] = paymentIntent
Hi there ๐ taking over for @stray shale
Give me a few minutes to get caught up.