#siddarth_api

1 messages ¡ Page 1 of 1 (latest)

abstract dawnBOT
#

👋 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/1311578273444134933

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

scarlet bane
#

hello! You need to be able to take in an input from your Customer for either the descriptor_code or the amounts

austere oriole
#

oh ok.

#

in the initial setup intent the payment method will be in requires action state. and i can verify it later while making a payment intent?

#

or how to take descriptor_code or the amount? any samples for it

scarlet bane
#

in the initial setup intent the payment method will be in requires action state. and i can verify it later while making a payment intent?

#

you need to verify the bank account first before you create a payment. i.e. no, you cannot verify it at the same time you create a PaymentIntent

austere oriole
#

so I have like this, I am creating a setup intent and after that I am calling confirmUsBankAccountSetup as below let result = await stripe.confirmUsBankAccountSetup(
setupIntent.client_secret,
{
payment_method: {
us_bank_account: {
routing_number: routingNumber,
account_number: accountNumber,
account_holder_type: 'individual', // 'individual' or 'company'
},
billing_details: {
name: $('#tbFullName').val() || "",
email: $('#tbEmail').val(),
},
},
}
); then what I need to do next

abstract dawnBOT
scarlet bane
#

so I have like this, I am creating a setup intent and after that I am calling confirmUsBankAccountSetup as below let result = await stripe.confirmUsBankAccountSetup
...
then what I need to do next

After you call confirmUsBankAccountSetup, if microdeposit verification is required, there will be a next_action.verify_with_microdeposits

It's up to you to build the UI for your customer to select whether to input a descriptor code, or amount. Then subsequently, pass in the data in the appropriate parameter

This guide covers the steps in slightly more detail here : https://docs.stripe.com/payments/ach-direct-debit/set-up-payment?platform=web&payment-ui=direct-api

Learn how to save payment method details for future ACH Direct Debit payments.

austere oriole
#

I am consfused on the step 4 in this document, for microdeposit verification, else if (setupIntent.next_action?.type === "verify_with_microdeposits") {
// 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).
}

#

what I need to display here and how the customer will get a code or amount, since we did not initiate any deposit untill now

scarlet bane
austere oriole
#

that means, user has to provide the email address while creating a setup intent right? email address is mandatory

gusty bobcat
#

Yes, email address is mandatory for microdeposits verification

austere oriole
#

let microDepositResult = await stripe.verifyMicrodepositsForSetup(setupIntent.client_secret, {
amounts: [32, 45],
}); will this code work in production ?

gusty bobcat
#

After your system collects the amounts from the customer, then this function should be called to verify the microdeposits. This should work in production

austere oriole
#

no, I am just hard coding these 2 amount as is in the above code.

#

I am not collecting the amount, because it is still in setup intent verification step only. How can I confirm the amount

gusty bobcat
#

For instant verification, you shouldn't need to use stripe.verifyMicrodepositsForSetup.

stripe.verifyMicrodepositsForSetup is only for microdeposit verification. This means that if the customer chooses microdeposit as the verification method, you will then need to use this function.

#

Only when setupIntent.next_action?.type === "verify_with_microdeposits", then stripe.verifyMicrodepositsForSetup() should be called

#

For instant verification, next_action.type won't be verify_with_microdeposits

austere oriole
#

got it. let microDepositResult = await stripe.verifyMicrodepositsForSetup(setupIntent.client_secret, {
amounts: [32, 45],
}); will this code work in production ? if i hard code this amounts

gusty bobcat
#

No, it won't work in production. The amounts should be collected from the customer