Installs into .claude/skills of the current project.
Sponsors
SSkills DirectorySkills Directory
Know which skills are safe — weekly.
SSkills DirectorySkills Directory
Is that skill safe to install?
Are you the author of Apple Pay Knowledge Patch?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/nevaberry-apple-pay-knowledge-patch-nevaberry-plugins)
---
name: apple-pay-knowledge-patch
description: Apple Pay
version: null
license: MIT
metadata:
author: Nevaberry
---
# Apple Pay
Use this skill for Apple Pay JS SDK behavior and web merchant integration.
It covers the merchandising component, SDK pinning, payment UI behavior,
regional Safari requirements, and web order tracking with Apple Wallet.
## When to load
Load the relevant reference when working on:
- Apple Pay buttons under a Content Security Policy that blocks inline styles.
- Sandbox capability checks and sandbox UI indicators.
- Payment cancellation before scanning or a separate payment window.
- A pinned Apple Pay SDK script with Subresource Integrity.
- Messaging for Apple Pay and installment payment providers.
- Regional requirements for Apple Pay JS or the Payment Request API.
- Apple Pay checkout inside `SFSafariViewController` on iOS.
- A Track with Apple Wallet button for web orders.
## Reference index
| Reference | Topics |
| --- | --- |
| [Apple Pay JS SDK](references/apple-pay-js-sdk.md) | Merchandising, pinned SDK script and integrity hash, strict CSP, sandbox checks, payment windows, and cancellation. |
| [PassKit payment requests](references/passkit-payment-requests.md) | Scope note; no PassKit payment-request guidance is supplied. |
| [Web integration](references/web-integration.md) | Regional Safari requirements, Safari View Controller checkout, and Track with Apple Wallet. |
## Quick reference: payment behavior
### Buttons under strict Content Security Policy
Apple Pay buttons render correctly under a Content Security Policy
that blocks inline styles.
For the SDK attribution, see
[button styling](references/apple-pay-js-sdk.md#button-styling-under-strict-csp).
### Sandbox capability checks
In sandbox mode, `applePayCapabilities` returns
`paymentCredentialStatusUnknown` for supported browsers.
The sandbox state is also visible in the payment UI and console:
- The payment UI shows a “Sandbox Mode” banner.
- The console reports the sandbox state.
For the SDK attribution, see
[sandbox capability checks](references/apple-pay-js-sdk.md#sandbox-capability-checks).
### Cancellation before a scan
`ApplePaySession.oncancel` fires when a customer closes the payment modal
before scanning.
Use the [cancellation reference](references/apple-pay-js-sdk.md#cancellation-before-a-scan)
for the SDK attribution of this behavior.
### Separate payment windows
When Apple Pay launches in a separate window,
the visible URL uses `pay.apple.com`.
For the SDK attribution, see
[payment window domain](references/apple-pay-js-sdk.md#payment-window-domain).
## Quick reference: SDK script
### Pin the script with Subresource Integrity
To pin the SDK to 1.3.8 with Subresource Integrity,
use the matching versioned URL and SHA-384 hash.
```html
<script src="https://applepay.cdn-apple.com/jsapi/v1.3.8/apple-pay-sdk.js" integrity="sha384-u/9mOkmShCO0v+dqCAZFhiutJuORfzvuyM5i+676iy7mLSWS6rlllHrIt15f/mqH" crossorigin="anonymous"></script>
```
The [pinned SDK script reference](references/apple-pay-js-sdk.md#pinned-sdk-script)
contains the same URL and integrity value.
## Quick reference: merchandising
### Display Apple Pay and installment messaging
Use the Apple Pay Merchandising web component to display messaging
for Apple Pay and installment payment providers on your site.
For the SDK attribution, see
[merchandising web component](references/apple-pay-js-sdk.md#merchandising-web-component).
## Quick reference: Safari requirements by region
### China
In China, Apple Pay JS and the Payment Request API are both limited to iOS.
Their minimum iOS requirements differ:
| API | Requirement in China |
| --- | --- |
| Apple Pay JS | iOS 11.2 or later. |
| Payment Request API | iOS 11.3 or later. |
### Outside China
Outside China, the Payment Request API requires either:
- iOS 11.3 or later; or
- macOS 10.12.6 or later with Safari 11.1 or later.
See [regional Safari requirements](references/web-integration.md#safari-requirements-by-region)
for these requirements together.
## Quick reference: checkout in Safari View Controller
### Offer Apple Pay on iOS
On iOS, a checkout page can offer Apple Pay inside
`SFSafariViewController`.
See [Safari View Controller checkout](references/web-integration.md#apple-pay-in-safari-view-controller)
for this integration guidance.
## Quick reference: web order tracking
### Add Track with Apple Wallet
A website can add a Track with Apple Wallet button for order tracking
and style it to fit the site.
Use the supplied
[button configuration guide](https://developer.apple.com/documentation/applepayontheweb/adding-a-track-with-apple-wallet-button).
The [web order tracking reference](references/web-integration.md#track-with-apple-wallet-for-web-orders)
also links to that guide.
## PassKit reference scope
The [PassKit payment requests reference](references/passkit-payment-requests.md)
is retained in the reference layout.
This patch contains no PassKit payment-request guidance.