## Handle an FPX payment `stripe.handleFpxPayment(clientSecret: string, element: Element, data?: object)` *`handleFpxPayment` has been renamed to [confirmFpxPayment](#stripe_confirm_fpx_payment). In addition to the rename, we have slightly modified the arguments. These changes do not affect the behavior of the method. While we will continue to support `handleFpxPayment` for the duration of the beta, we think the new name and arguments are easier to understand and better convey what the method is doing.* Use `stripe.handleFpxPayment` in the [FPX payment method creation](https://docs.stripe.com/stripe-js/elements/fpx-bank.md) flow when the customer selects a bank from the dropdown. It will gather the [bank code](https://docs.stripe.com/payments/fpx/accept-a-payment.md#bank-reference) from the element, along with any other `PaymentIntent` `data` you provide. It will then create an FPX payment method and confirm the `PaymentIntent`. > Note that `stripe.handleFpxPayment` 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`. - `element` An `fpxBank` [Element](https://docs.stripe.com/payments/elements.md) that will be used to create a payment method. - `data` A data object to be sent with the request. - `return_url` The url your customer will be directed to after they complete authentication. Be sure to review the [payment confirmation page requirements](https://docs.stripe.com/payments/fpx/accept-a-payment.md#payment-confirmation-page). ### Example ```title Handle a FPX payment ```