<!--
{
  "documentType" : "article",
  "framework" : "ApplePayontheWeb",
  "identifier" : "/documentation/ApplePayontheWeb/apple-pay-js-api",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Apple Pay JS API"
}
-->

# Apple Pay JS API

Implement Apple Pay on the web using Apple’s JavaScript API.

## Topics

### Apple Pay availability

[Checking for Apple Pay availability](/documentation/ApplePayontheWeb/checking-for-apple-pay-availability)

Use the Apple Pay JS API to check whether Apple Pay is available, to check whether a device has a payment credential provisioned in Wallet, and to determine when to display an Apple Pay button.

[`canMakePayments`](/documentation/ApplePayontheWeb/ApplePaySession/canMakePayments)

Indicates whether the device supports Apple Pay.

[`applePayCapabilities`](/documentation/ApplePayontheWeb/ApplePaySession/applePayCapabilities)

Indicates whether the device supports Apple Pay and whether the person has an active card in Wallet that qualifies for web payments.

[`canMakePaymentsWithActiveCard`](/documentation/ApplePayontheWeb/ApplePaySession/canMakePaymentsWithActiveCard)

Indicates whether the device supports Apple Pay and whether the user has an active card in Wallet.

[`PaymentCredentialStatus`](/documentation/ApplePayontheWeb/PaymentCredentialStatus)

Information about whether the device supports Apple Pay and the possible payment credentials the person has provisioned in Wallet.

[`PaymentCredentialStatusResponse`](/documentation/ApplePayontheWeb/PaymentCredentialStatusResponse)

The response for information about the device’s support for Apple Pay and the payment credential status.

### Apple Pay payment request

[`ApplePayPaymentRequest`](/documentation/ApplePayontheWeb/ApplePayPaymentRequest)

A request for payment, which includes information about payment-processing capabilities, the payment amount, and shipping information.

[`ApplePayDeferredPaymentRequest`](/documentation/ApplePayontheWeb/ApplePayDeferredPaymentRequest)

A dictionary that represents a request to set up a deferred payment, such as a hotel booking or a pre-order.

### Apple Pay session

[Creating an Apple Pay Session](/documentation/ApplePayontheWeb/creating-an-apple-pay-session)

Provide a payment request and create the session.

[Providing Merchant Validation](/documentation/ApplePayontheWeb/providing-merchant-validation)

Validate your merchant identity and receive a session object for each payment request.

[Requesting an Apple Pay payment session](/documentation/ApplePayontheWeb/requesting-an-apple-pay-payment-session)

Request a valid session from the Apple Pay server.

[`ApplePaySession`](/documentation/ApplePayontheWeb/ApplePaySession)

A session object for managing the payment process on the web.

### Status and errors

[`ApplePayError`](/documentation/ApplePayontheWeb/ApplePayError)

A customizable error type that you create to indicate problems with the address or contact information on an Apple Pay sheet.

[`ApplePayErrorCode`](/documentation/ApplePayontheWeb/ApplePayErrorCode)

The error code that indicates whether an error on the payment sheet is for shipping or billing information, or for another kind of error.

[`ApplePayErrorContactField`](/documentation/ApplePayontheWeb/ApplePayErrorContactField)

Names of the fields in the shipping or billing contact information, used to locate errors in the payment sheet.

[Apple Pay Status Codes](/documentation/ApplePayontheWeb/apple-pay-status-codes)

Codes used to report the status of an Apple Pay session after a callback.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)