- From: Stephen McGruer <notifications@github.com>
- Date: Tue, 03 Mar 2026 12:45:48 -0800
- To: w3c/web-based-payment-handler <web-based-payment-handler@noreply.github.com>
- Cc: Subscribed <subscribed@noreply.github.com>
- Message-ID: <w3c/web-based-payment-handler/issues/428/3993439656@github.com>
stephenmcgruer left a comment (w3c/web-based-payment-handler#428)
Currently the flow defined in the spec is:
1. User selects a web-based payment handler, triggering the steps to [Handle a PaymentRequestEvent](https://w3c.github.io/web-based-payment-handler/#dfn-handling-a-paymentrequestevent)
2. This fires a "paymentrequest" [PaymentRequestEvent](https://w3c.github.io/web-based-payment-handler/#dom-paymentrequestevent) to a service worker for the payment app
3. That event has a [`respondWith` method](https://w3c.github.io/web-based-payment-handler/#ref-for-dfn-respond-to-paymentrequest-algorithm-1), which the service worker must call with a `promise<PaymentHandlerResponse>`
4. This runs the [Respond to PaymentRequest algorithm](https://w3c.github.io/web-based-payment-handler/#dfn-respond-to-paymentrequest-algorithm)
5. Currently that algorithm says:
```
8. Upon rejection of handlerResponsePromise:
1. Run the payment app failure algorithm and terminate these steps.
```
6. The [payment app failure algorithm](https://w3c.github.io/web-based-payment-handler/#dfn-payment-app-failure-algorithm) says:
```
The exact details of this algorithm are left to implementers. Acceptable behaviors include, but are not limited to:
- Letting the user try again, with the same web-based payment handler or with a different one.
- Rejecting the Promise that was created by PaymentRequest.show().
```
--
Reply to this email directly or view it on GitHub:
https://github.com/w3c/web-based-payment-handler/issues/428#issuecomment-3993439656
You are receiving this because you are subscribed to this thread.
Message ID: <w3c/web-based-payment-handler/issues/428/3993439656@github.com>
Received on Tuesday, 3 March 2026 20:45:52 UTC