## Confirm a UPI payment

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

Use `stripe.confirmUpiPayment` when customer submits your payment form. When called, it will confirm the
[PaymentIntent](https://docs.stripe.com/api/payment_intents.md), and return a `Promise` which resolves with
the PaymentIntent having its final payment status.

Since the authentication for UPI payments happen on customer's mobile device, and the timeout for
such authentication is 5 minutes, the `Promise` returned by `stripe.confirmUpiPayment` can take upto
5 minutes to resolve. We recommend showing an appropriate message to the customer indicating their
payment is being processed.

> Note that `stripe.confirmUpiPayment` may take several minutes 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`
      Either the `id` of an existing [PaymentMethod](https://docs.stripe.com/api/payment_methods.md), or an
object containing data to create a `PaymentMethod` with. See the use case sections
below for details.

- `options`
  An options object to control the behavior of this method.
    - `handleActions`
      Set this to `false` if you want to manually poll for the [PaymentIntent status](https://docs.stripe.com/api/payment_intents/retrieve.md).
Default is `true`.

### with an existing PaymentMethod

### Example

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

### with an attached PaymentMethod

### Example

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

### Example

```title
Confirm a UPI payment
```
