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)
---
name: apple-pay-knowledge-patch
description: Apple Pay
version: null
license: MIT
metadata:
author: Nevaberry
---
# Apple Pay
Use this skill when working on Apple Pay web checkout,
SDK loading, payment UI behavior, merchandising messaging,
or order tracking with Apple Wallet.
## Reference index
| Reference | Topics |
| --- | --- |
| [Web Platform and SDK](references/web-platform-and-sdk.md) | Pinned SDK script, button styling under strict CSP, Safari requirements, Safari View Controller |
| [Payment Requests](references/payment-requests.md) | Sandbox capability checks, sandbox indicators, payment window domain, cancellation before scanning |
| [Merchandising and Order Tracking](references/merchandising-and-order-tracking.md) | Merchandising web component, Track with Apple Wallet button |
## Pin the SDK 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 snippet pairs the versioned SDK URL with its
matching integrity value.
See [Web Platform and SDK](references/web-platform-and-sdk.md#pinned-sdk-script-138).
## Display payment messaging
Use the Apple Pay Merchandising web component
to display messaging on your site.
The component supports messaging for:
- Apple Pay.
- Installment payment providers.
See [Merchandising and Order Tracking](references/merchandising-and-order-tracking.md#merchandising-web-component-138).
## Render buttons under strict CSP
Apple Pay buttons render correctly under a
Content Security Policy that blocks inline styles.
This guidance concerns Apple Pay button rendering
when inline styles are blocked by the policy.
See [Web Platform and SDK](references/web-platform-and-sdk.md#button-styling-under-strict-csp-137).
## Read sandbox capability checks
### Capability result
In sandbox mode, `applePayCapabilities` returns
`paymentCredentialStatusUnknown` for supported browsers.
The result described here applies to supported browsers
in sandbox mode.
### Payment UI indicator
The payment UI shows a “Sandbox Mode” banner.
### Console indicator
The console reports the sandbox state.
See [Payment Requests](references/payment-requests.md#sandbox-capability-checks-135).
## Identify the payment window domain
When Apple Pay launches in a separate window,
the visible URL uses `pay.apple.com`.
The domain guidance applies to the visible URL
of that separate payment window.
See [Payment Requests](references/payment-requests.md#payment-window-domain-134).
## Handle cancellation before scanning
`ApplePaySession.oncancel` fires when a customer closes
the payment modal before scanning.
The cancellation behavior includes closing the modal
before the customer has scanned.
See [Payment Requests](references/payment-requests.md#cancellation-before-a-scan-131).
## Apply Safari requirements by region
### China
In China, Apple Pay JS and the Payment Request API
are both limited to iOS.
| 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 of these platform combinations:
- iOS 11.3 or later.
- macOS 10.12.6 or later with Safari 11.1 or later.
See [Web Platform and SDK](references/web-platform-and-sdk.md#safari-requirements-by-region).
## Offer Apple Pay in Safari View Controller
On iOS, a checkout page can offer Apple Pay
inside `SFSafariViewController`.
This availability applies to a checkout page
inside Safari View Controller on iOS.
See [Web Platform and SDK](references/web-platform-and-sdk.md#apple-pay-in-safari-view-controller).
## Add order tracking with Apple Wallet
A website can add a Track with Apple Wallet button
for order tracking.
The website can style the button to fit the site.
### Button configuration
Use the linked [button configuration guide](https://developer.apple.com/documentation/applepayontheweb/adding-a-track-with-apple-wallet-button)
for the Track with Apple Wallet button.
See [Merchandising and Order Tracking](references/merchandising-and-order-tracking.md#track-with-apple-wallet-for-web-orders).
Files in this skill
SKILL.md6.7 KB
coverage.json462 B
references/merchandising-and-order-tracking.md333 B