#beinggandhi

1 messages ยท Page 1 of 1 (latest)

thin vineBOT
sinful aspen
#

this is the image from the customer

stray shale
#

Good question. Let me see what you can do here

#

Which of our bank account payment methods is this? ACH?

sinful aspen
#

yes

stray shale
#

Do you have any request IDs (req_123) related to your account trying trying to set up a bank account this way?

sinful aspen
stray shale
#

Do you have the code for how you set up your payment intent?

sinful aspen
#

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).
            }
        });
}
stray shale
#

Thank you, still trying to look at that payment intent but the system is a bit slow for me at the moment.

#

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"]}},
  },```
sinful aspen
#

We are not using

stray shale
sinful aspen
#

we are using :

stripe.collectBankAccountForPayment
and 
stripe.confirmUsBankAccountPaymen
stray shale
#

Should be something like stripe.payment_intents.create?

sinful aspen
#

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

stray shale
#

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

sinful aspen
#

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
spring gate
#

Hi there ๐Ÿ‘‹ taking over for @stray shale

Give me a few minutes to get caught up.