## Verify with micro-deposits for payment Use `stripe.verifyMicrodepositsForPayment` in the [Accept a Canadian pre-authorized debit payment](/payments/acss-debit/accept-a-payment.md) or [Accept an ACH Direct Debit payment](/payments/ach-direct-debit/accept-a-payment.md) flow to verify a customer's bank account with micro-deposits. It should be only called when [PaymentIntent](/api/payment_intents.md) is in the `requires_action` state, and contains a `next_action` field that has a `type` equal to `verify_with_microdeposits`. Refer to our [integration guide](/payments/acss-debit/accept-a-payment.md) for more details. > Verification can fail for several reasons. The failure may happen synchronously as a direct error response, or asynchronously through a `payment_intent.payment_failed` webhook event. > Refer to our [integration guide](/payments/acss-debit/accept-a-payment.md) for more details. `stripe.verifyMicrodepositsForPayment` will return a `Promise` which resolves with a result object. This object has either: * `result.paymentIntent`: the [PaymentIntent](/api/payment_intents) with a `status` of `processing`. * `result.error`: an error. Refer to the [API reference](/api#errors) and our [integration guide](/payments/acss-debit/accept-a-payment) for all possible errors. **Syntax:** `stripe.verifyMicrodepositsForPayment(...)` - `clientSecret` (string) **required** The [client secret](/api/payment_intents/object.md#payment_intent_object-client_secret) of the `PaymentIntent`. - `data` (object) Data to be sent with the request. - `amounts` (array) An array of two positive integers, in *cents*, equal to the values of the micro-deposits sent to the bank account. - `descriptor_code` (string) A six-character code starting with SM present in the microdeposit sent to the bank account. ### Verify with micro-deposits for payment ```js stripe.verifyMicrodepositsForPayment( '{PAYMENT_INTENT_CLIENT_SECRET}', { amounts: [32, 45], } ).then(function(result) { // Handle result.error or result.paymentIntent }); ``` ```es_next const {paymentIntent, error} = await stripe.verifyMicrodepositsForPayment( '{PAYMENT_INTENT_CLIENT_SECRET}', { amounts: [32, 45], } ); // Handle the paymentIntent or error ```