#siddarth_api
1 messages · Page 1 of 1 (latest)
👋 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/1311626682553077791
📝 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.
- siddarth_api, 22 minutes ago, 27 messages
- siddarth_api, 16 hours ago, 35 messages
- siddarth_api, 20 hours ago, 30 messages
Hi, let me help you with this.
Microdeposit flow should start after the setup is confirmed. The customer will get an email with a link where they will be able to provide the microdeposit amounts to verify their bank account.
then how do i make setup is confirmed before making a payment for us_bank_account type
below are my steps. Step1 - creating a setup intent and step2: using confirmBankSetup(), trying to complete the setup intent complete. but in this step2- the result is requires_action_ verify microdeposit
i am stuck here, how to create a setup intent for us_bank_account and make payment later in future
Are you working in Test mode right now?
yes
how do I know the micordeposit amount? the set up is not complete right?
They should be visible in somewhere in Test mode, depending on your integration.
Could you please share the SetupIntent ID? seti_xxx
give me few mins, will share it
In Test mode you have to use "magic" values to get a desired result: https://docs.stripe.com/payments/ach-direct-debit/accept-a-payment?web-or-mobile=web&payments-ui-type=stripe-hosted#test-microdeposit-amounts-and-descriptor-codes
confirmUsBankAccountSetup - you must obtain authorization from your customer before you can initiate payment by displaying mandate terms for them to accept. How do I obtain this mandate?
When the customer accepts the mandate terms, you must confirm the SetupIntent. Use stripe.confirmUsBankAccountSetup to complete the payment when the customer submits the form. at this stage - the status is setupIntent.next_action?.type === "verify_with_microdeposits" in this state
and the payment is not done yet correct?
👋 taking over for my colleague. Let me catch up.
The easiest way to do what you want is just to use the PaymentElement
my main question is, I am not using instant verification (since it goes through login to bank and other tings) . Can't I do setup intent and verify microdeposit in the same flow? if not when to do verify microdeposit?
you can
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(),
},
},
}
);
if (result.error) {
throw result.error;
} else if (result.setupIntent.next_action?.type === "verify_with_microdeposits") {
let microDepositResult = await stripe.verifyMicrodepositsForSetup(setupIntent.client_secret, {
// Provide either a descriptor_code OR amounts, not both
//descriptor_code: `SM11A`,
//amounts: [32, 45],
});
if (microDepositResult.setupIntent.status === 'succeeded') {
tokenizerResponse = result;
tokenizerResponse.customer = setupIntent.customer;
}
} this is my code, how can i do verifymicrodeposit immediately after the setup intent is created. provide any code samples
In these cases, Stripe sends a descriptor_code microdeposit and might fall back to an amount microdeposit if any further issues arise with verifying the bank account. These deposits take 1-2 business days to appear on the customer’s online statement. When will the stripe sends the code/amount? which steps strip will send ? at the time of setupintent create ? and if it takes 1-2 business days then how will I verify this code?
the 1-2 business days is for the customer to see that microdeposit on their bank account
If you supplied a billing email, Stripe notifies your customer via this email when the deposits are expected to arrive. The email includes a link to a Stripe-hosted verification page where they can confirm the amounts of the deposits and complete verification.
I am really sorry for the confusion. going crazy here. In my above code I need to do verify microdeposit, how will I do,
When the bank account is successfully verified, Stripe returns the SetupIntent object with a status of succeeded, and sends a setup_intent.succeeded webhook event.
Verification can fail for several reasons. The failure may happen synchronously as a direct error response, or asynchronously through a setup_intent.setup_failed webhook event (shown in the following examples).
If you prefer not to use the Stripe-hosted verification page, create a form on your site. Your customers then use this form to relay microdeposit amounts to you and verify the bank account using Stripe.js.
When the bank account is successfully verified? in which steps?
I think the confusion is around the fact that ACH DD is not a synchronous payment method and you want to treat it as such
even if it is not syncronous, I want the setup intent to be completed atleast before making actual payment
forget about everything. I will say what I am looking for and what are my steps
Below are my code and steps, correct me if I am missing somethig here.
Step1: created customer and attached customer to setup intent. saving the customer and payment methods for later use in payment intent.
var options = new CustomerCreateOptions();
var service = new CustomerService();
var customer = await service.CreateAsync(options);
var setupIntentOptions = new SetupIntentCreateOptions
{
Customer = customer.Id,
PaymentMethodTypes = new List<string> { "us_bank_account" },
PaymentMethodOptions = new SetupIntentPaymentMethodOptionsOptions
{
UsBankAccount = new SetupIntentPaymentMethodOptionsUsBankAccountOptions
{
VerificationMethod = "microdeposits",//"instant", //"microdeposits"
FinancialConnections = new SetupIntentPaymentMethodOptionsUsBankAccountFinancialConnectionsOptions
{
Permissions = new List<string> { "payment_method", "balances" },
},
},
},
};
var setupIntentService = new SetupIntentService();
var setupIntentResult = await setupIntentService.CreateAsync(setupIntentOptions);
step2: Making call to confirmUsBankAccountSetup by collecting the routing and account number.
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: 'test',
email: $('#tbEmail').val(),
},
},
}
);
at this stage the setup intent is in setupIntent.next_action?.type === "verify_with_microdeposits"
your code just sets up the Payment Method and attach it to the customer
I want to complete the setup intent at this stage
once the verification is finalized you will receive the setup_intent.succeeded event and then you would be able to use that payment to pay
Yes, now how do I verify the setup intent is my question.
if you supply the billing email, then we will contact the customer on your behalf to ask them to verify the microdeposit
but if you prefer to do it yourself then you can do that by following these steps https://docs.stripe.com/payments/ach-direct-debit/set-up-payment?platform=web&payment-ui=direct-api#optional:-send-custom-email-notifications
where you can build your own page to make them verify the microdeposit
that means, it will not be immediately correct? I want this to happen instantly
but as you said since this might take 1 to 2 business days this can't be immediately completed
if you want instant verifications you can't use the microdeposit approach
that's what I was trying to tell you since yesterday
but it seems we're going round and round
hmm now I understood, In that case we can not use microdeposit while setting up intent right?
how can we do it this step?
and once the customer goes through the verification then you will receive the event
this step is confusing, you are saying, we can use microdeposit while creating set up intent.
please re-read all of this section https://docs.stripe.com/payments/ach-direct-debit/set-up-payment?platform=web&payment-ui=direct-api#web-verify-with-microdeposits
word by word, not just skim the content
any samples for this?
code samples to complete the setupintent with microdeposit
you don't need to do anything
it's the customer that needs to do this
we (Stripe) will send them an email (if you pass their billing email) and once they see the microdeposit in their bank statement they would visit a Stripe hosted page and complete the microdeposit verification
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(),
},
},
}
);
if (result.error) {
throw result.error;
} else if (result.setupIntent.next_action?.type === "verify_with_microdeposits") {
let microDepositResult = await stripe.verifyMicrodepositsForSetup(setupIntent.client_secret, {
// Provide either a descriptor_code OR amounts, not both
//descriptor_code: `SM11A`,
//amounts: [32, 45],
});
if (microDepositResult.setupIntent.status === 'succeeded') {
tokenizerResponse = result;
tokenizerResponse.customer = setupIntent.customer;
}
} then I do not need to write this line of code is it else if (result.setupIntent.next_action?.type === "verify_with_microdeposits") {
let microDepositResult = await stripe.verifyMicrodepositsForSetup(setupIntent.client_secret, {
// Provide either a descriptor_code OR amounts, not both
//descriptor_code: `SM11A`,
//amounts: [32, 45],
});
you don't need this, unless you're creating a page for your customer to verify that they received the microdeposit to replace the Stripe hosted page that we normally send them
if (result.error) {
throw result.error;
} else if (result.setupIntent.next_action?.type === "verify_with_microdeposits") {
let microDepositResult = await stripe.verifyMicrodepositsForSetup(setupIntent.client_secret, {
// Provide either a descriptor_code OR amounts, not both
//descriptor_code: SM11A,
//amounts: [32, 45],
});
if (microDepositResult.setupIntent.status === 'succeeded') {
tokenizerResponse = result;
tokenizerResponse.customer = setupIntent.customer;
}
} then I do not need to write this line of code is it else if (result.setupIntent.next_action?.type === "verify_with_microdeposits") {
let microDepositResult = await stripe.verifyMicrodepositsForSetup(setupIntent.client_secret, {
// Provide either a descriptor_code OR amounts, not both
//descriptor_code: SM11A,
//amounts: [32, 45],
});
that sending an email to cutomer is offline process not from our application correct? and when the customer verifies it opening the link then only the status will be updated in your server as Succedded or completed. until then I will not be able to make payment with that stored payment method?