## Confirm an ACH Direct Debit payment

`stripe.confirmUsBankAccountPayment(clientSecret: string, data?: object)`

Use `stripe.confirmUsBankAccountPayment` in the [Accept a payment flow](https://docs.stripe.com/payments/ach-direct-debit/accept-a-payment.md) for the [ACH Direct Debit](https://docs.stripe.com/payments/ach-direct-debit.md) payment method to record the customer’s authorization for payment.

When you confirm a [PaymentIntent](https://docs.stripe.com/api/payment_intents.md), it needs to have an attached [PaymentMethod](https://docs.stripe.com/api/payment_methods.md).
We suggest using `stripe.collectBankAccountForPayment`, which automatically collects bank account details and attaches a `PaymentMethod`. You may also choose to reuse an existing `PaymentMethod` or manually collect bank account details  using the `data` parameter. These use cases are detailed in the sections that follow.

- `clientSecret`
  The [client secret](https://docs.stripe.com/api/payment_intents/object.md#payment_intent_object-client_secret) of the `PaymentIntent`.

- `data`
  Data to be sent with the request.
Refer to the [Payment Intents API](https://docs.stripe.com/api/payment_intents/confirm.md) for a full list of parameters.
    - `payment_method`
      The `id` of an existing PaymentMethod or an object of collected data.
See use cases below for details.

### with an existing PaymentMethod

### Data argument properties

- `payment_method`
  The `id` of an existing [PaymentMethod](https://docs.stripe.com/api/payment_methods.md).

### Example

```title
Confirm with an existing PaymentMethod
```

### with an attached PaymentMethod

### Example

```title
Confirm with an attached PaymentMethod
```

### with self collected bank account information

### Data argument properties

- `payment_method`
  Pass an object to confirm using data collected.
    - `billing_details`
      The customer's [billing_details](https://docs.stripe.com/api/payment_methods/create.md#create_payment_method-billing_details).
`name` is required. Providing `email` allows your customer to receive [ACH Direct Debit mandate and microdeposit emails](https://docs.stripe.com/payments/ach-direct-debit.md#mandate-and-microdeposit-emails).
      - `name`
        The customer's name. The first and last name must be at minimum 2 characters each.
      - `email`
        The customer's email.
    - `us_bank_account`
      The customer's [bank account information](https://docs.stripe.com/api/payment_methods/create.md#create_payment_method-us_bank_account).
      - `account_number`
        The customer’s bank account number.
      - `routing_number`
        The routing number of the customer’s bank.
      - `account_holder_type`
        Account holder type: individual or company.
      - `account_type`
        Account type: checkings or savings. Defaults to checking if omitted.

### Example

```title
Confirm with bank account information
```

### Example

```title
Confirm an ACH Direct Debit payment
```
