# passkit

A PassKit skill that walks through Apple Pay buttons, payment requests and Wallet passes, and keeps the merchant setup in order.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 3000 installs · ★ 1237
- Author: dpearson2699
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/passkit/SKILL.md
- Updated: 2026-07-31
- HTML: https://affpapa.org/en/nevibecode/skills/passkit

## What it does

The skill covers an Apple Pay checkout on Swift from the first line to the token: the button, a `PKPaymentRequest` carrying the cart lines, presenting the sheet with `PKPaymentAuthorizationController`, then handing the result to your server. It is written against Swift 6.3 and iOS 26+. SwiftUI gets `PayWithApplePayButton`; UIKit gets `PKPaymentButton`. A custom control dressed up with the Apple Pay mark is out.

Setup comes before any code. Turn on the Apple Pay capability in Xcode, register a Merchant ID such as `merchant.com.example.app` in the Apple Developer portal, issue a Payment Processing Certificate, add the ID to entitlements. Skip the certificate and authorization fails.

One limit worth knowing up front: a single request holds one advanced mode only, be it recurring billing, automatic reload, deferred payment, Apple Pay Later eligibility or multi-token contexts. Two modes in one checkout means two requests. Amounts go in as `NSDecimalNumber`, never `Double`, and the last entry of `paymentSummaryItems` is what the sheet reads as the total.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill passkit -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/passkit/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/passkit/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill passkit -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/passkit/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill passkit -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/passkit/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install dpearson2699/swift-ios-skills passkit
```

2. **Manually: put the files in place**
- File: `.github/skills/passkit/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill passkit -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/dpearson2699/swift-ios-skills --path skills/passkit
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/passkit/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add dpearson2699/swift-ios-skills --skill passkit -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/dpearson2699/swift-ios-skills/tree/HEAD/skills/passkit/SKILL.md

## When to use it
- add an Apple Pay button to a SwiftUI checkout screen
- build a `PKPaymentRequest` with line items and a final total
- collect a shipping address and email inside the payment sheet
- register a merchant ID and payment processing certificate
- surface a Wallet pass with `PKAddPassesViewController`

## Example prompts
- Add an Apple Pay buy button to the checkout view with `PayWithApplePayButton`.
- Build a `PKPaymentRequest` with standard and express shipping methods.
- Keep a strong reference to the `PKPaymentAuthorizationController` so the sheet stays up.

## Similar
- [vercel-react-native-skills](https://affpapa.org/en/nevibecode/skills/vercel-react-native-skills.md) — skill · 255200 installs
- [animate-expo](https://affpapa.org/en/nevibecode/skills/animate-expo.md) — skill · 137900 installs
- [mobile-native](https://affpapa.org/en/nevibecode/skills/mobile-native.md) — skill · 86600 installs
- [aso](https://affpapa.org/en/nevibecode/skills/aso.md) — skill · 75400 installs
- [swiftui-pro](https://affpapa.org/en/nevibecode/skills/swiftui-pro.md) — skill · 35200 installs
- [orca-emulator](https://affpapa.org/en/nevibecode/skills/orca-emulator.md) — skill · 5800 installs

From the same set: [dpearson2699/swift-ios-skills](https://affpapa.org/en/nevibecode/by/dpearson2699/swift-ios-skills.md) — 86 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
