## Confirm a Customer Balance payment `stripe.confirmCustomerBalancePayment(clientSecret: string, data?: object, options?: object)` Use `stripe.confirmCustomerBalancePayment` in the [Customer Balance](https://docs.stripe.com/payments/customer-balance.md) payment flow when the customer submits your payment form. When called, it will confirm the [PaymentIntent](https://docs.stripe.com/api/payment_intents.md) with `data` you provide. Refer to our [integration guide](https://docs.stripe.com/payments/bank-transfers/accept-a-payment.md) for more details. Since the [Customer Balance](https://docs.stripe.com/payments/customer-balance.md) payment method draws from a balance, the attempt will succeed or fail depending on the current balance amount. To collect more funds from the customer when the cash balance is insufficient, use the customer balance with [bank transfer funding](https://docs.stripe.com/payments/bank-transfers/accept-a-payment.md) parameters. The confirmation attempt will finish in one of the following result states: 1. If the customer balance is greater than or equal to the amount, the PaymentIntent response will have a `status` of `succeeded`. The `funding_type` will be ignored. 2. If the customer balance is less than the amount, and you do not set the `funding_type`, the PaymentIntent response will have a `status` of `requires_payment_method`. 3. If the customer balance is less than the amount, and you set the `funding_type`, the PaymentIntent response will have a `status` of `requires_action`. The `paymentIntent.next_action.display_bank_transfer_instructions` hash will contain bank transfer details for funding the [Customer Balance](https://docs.stripe.com/payments/customer-balance.md). > Note that `stripe.confirmCustomerBalancePayment` may take several seconds to complete. > During that time, you should disable your form from being resubmitted and show a waiting indicator like a spinner. > If you receive an error result, you should be sure to show that error to the customer, re-enable the form, and hide the waiting indicator. - `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` An object specifying the `customer_balance` type. - `customer_balance` Set to `{}`. - `payment_method_options` Additional payment specific configuration options. See the [with `payment_method_options`](https://docs.stripe.com/api/payment_intents/confirm.md#confirm_payment_intent-payment_method_options) section of the Payment Intents API reference for more details. - `bank_transfer` Configuration for this bank transfer payment method. - `type` Required. Must be `bank_transfer`. - `eu_bank_transfer` Configuration for EU bank transfers. - `country` Required. Two-letter country code. Must be a [supported country](https://docs.stripe.com/payments/bank-transfers#supported-countries). - `requested_amount` The amount to be collected, in the smallest currency unit. - `requested_currency` Three-letter ISO currency code. Must be a [supported currency](https://docs.stripe.com/currencies.md). - `iban` Configuration for IBAN bank transfers. - `account_number` Required. The IBAN account number. - `iban[account_number]` Required. The IBAN account number. - `iban[country]` Required. Two-letter country code. Must be a [supported country](https://docs.stripe.com/payments/sepa-debit.md#supported-countries). - `iban[iban]` Required. The IBAN account number. - `iban[bic]` Required. The BIC/SWIFT code of the bank. - `iban[supported_countries]` Required. Must be `['SEPA']`. - `iban[iban_country]` Required. Two-letter country code. Must be a [supported country](https://docs.stripe.com/payments/sepa-debit.md#supported-countries). - `iban[bic_country]` Required. Two-letter country code. Must be a [supported country](https://docs.stripe.com/payments/sepa-debit.md#supported-countries). - `iban[iban]` Required. The IBAN account number. - `iban[bic]` Required. The BIC/SWIFT code of the bank. - `iban[iban_country]` Required. Two-letter country code. Must be a [supported country](https://docs.stripe.com/payments/sepa-debit.md#supported-countries). - `iban[bic_country]` Required. Two-letter country code. Must be a [supported country](https://docs.stripe.com/payments/sepa-debit.md#supported-countries). - `funding_type` The type of funding to use when the customer balance is insufficient. Can be `bank_transfer`. - `options` An options object to control the behavior of this method. - `handleActions` Set this to `false` if you want to manually handle the bank transfer instructions. Default is `true`. ### Example ```title Confirm a Customer Balance payment ```