大网数据广告活动
Web 标准与前端开发

PaymentRequest: getSecurePaymentConfirmationCapabilities() static method

· 52CE 我爱测

The **`getSecurePaymentConfirmationCapabilities()`** static method of the PaymentRequest interface returns an object indicating which capabilities of the Secure payment confirmation feature are supported by the current browser.

Payment Request API

The getSecurePaymentConfirmationCapabilities() static method of the PaymentRequest interface returns an object indicating which capabilities of the Secure payment confirmation feature are supported by the current browser.

Syntax

PaymentRequest.getSecurePaymentConfirmationCapabilities()

Parameters

None.

Return value

A Promise that resolves with an object where the property names are strings representing secure payment confirmation feature names, and the values are booleans representing whether the feature is available (true) or not (false).

Known features are as follows:

  • browserBoundKeyHardware
    • : The Secure Payment Confirmation API is capable of using browser bound keys that are stored in hardware secure elements on the device. A browser-bound key is a public-private key pair that signs over the transaction details in addition to the WebAuthn credential and is tied to a single device by the user agent.

[!NOTE] The browser may choose to omit some or all capabilities from the object regardless if it is supported or not, for example to protect user privacy if abuse of the API is suspected.

Examples

Basic usage

async function spcFeatures() {
  const features =
    await PaymentRequest.getSecurePaymentConfirmationCapabilities();
  for (const [key, value] of Object.entries(features)) {
    console.log(`${key}: ${value}`);
  }
}

Specifications

Browser compatibility

See also

来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。

资料来源与适用范围

资料来源
MDN Web Docs / Mozilla 贡献者
适用范围
请按文中版本与环境说明核对
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 2.5

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。