Re: [w3c/payment-request] Improved error codes (Issue #1040)

stephenmcgruer left a comment (w3c/payment-request#1040)

On the Payment Handler API side, it is possible for a payment app to indicate error today by rejecting the promise passed to `respondWith`. Ultimately this just says to run https://w3c.github.io/payment-handler/#dfn-payment-app-failure-algorithm, which is:

```
If the Promise is rejected, the user agent MUST run the payment app failure algorithm. 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 payment handler or with a different one.
- Rejecting the Promise that was created by [PaymentRequest.show()](https://www.w3.org/TR/payment-request/#show-method).
```

I feel like we should be able to do better, and hook this up to more deterministic behaviour in Payment Request, even if we need a slight "implementor can choose to do A or B" as I suggested might be needed above. Not sure of the history for why its left so vague today.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/w3c/payment-request/issues/1040#issuecomment-3524560672
You are receiving this because you are subscribed to this thread.

Message ID: <w3c/payment-request/issues/1040/3524560672@github.com>

Received on Thursday, 13 November 2025 00:45:05 UTC