files/en-us/web/api/paymentrequest/securepaymentconfirmationavailability_static/index.md
{{securecontext_header}}{{APIRef("Payment Request API")}}{{SeeCompatTable}}
The securePaymentConfirmationAvailability() static method of the {{domxref("PaymentRequest")}} interface indicates whether the Secure payment confirmation (SPC) feature is available.
securePaymentConfirmationAvailability()
None.
A {{jsxref("Promise")}} that resolves with an enumerated value indicating whether SPC is available, and if not, a reason for non-availability.
Possible values are:
available
unavailable-unknown-reason
unavailable-feature-not-enabled
unavailable-no-permission-policy
payment Permissions Policy.unavailable-no-user-verifying-platform-authenticator
async function spcSupport() {
const support = await PaymentRequest.securePaymentConfirmationAvailability();
if (support === "available") {
// Commence SPC payment flow
} else {
// Fallback to traditional flows
}
}
{{Specifications}}
{{Compat}}