v149 · Payment Request · real handler
Real Payment Handler Error Probe
Install a same-origin web payment handler, invoke it through
PaymentRequest.show(), and inspect the real error name returned to the merchant
when the handler rejects PaymentRequestEvent.respondWith().
Chrome 149 distinguishes payment-app internal failures from user cancellation. This page uses a
real service-worker payment handler. If the browser does not expose Payment Handler APIs, the
page reports that directly and does not invent a checkout result.
1. install the payment handler
checking support
No install attempt yet.
2. run a real PaymentRequest
Handler resolves with a normal payment response.
Handler rejects with OperationError; Chrome 149 returns an internal app error to the merchant.
Handler rejects with AbortError; merchant should stop the checkout flow.
Handler rejects with a normal Error; merchant sees the legacy abort path.
No payment attempt yet.
merchant-side code
const request = new PaymentRequest([{
supportedMethods: methodUrl,
data: { scenario: "operation_error" }
}], details);
try {
const response = await request.show();
await response.complete("success");
} catch (error) {
if (error.name === "OperationError") {
showRetryOrFallback();
} else if (error.name === "AbortError") {
stopCheckoutBecauseUserCancelled();
}
}
see also
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗