name: Apple Pay slug: apple-pay version: 1.0.0 homepage: https://clawic.com/skills/apple-pay description: Implement Apple Pay for web and iOS with merchant validation, token handling, and production-safe checkout flows. changelog: Expanded implementation and rollout guidance with stronger validation and incident handling playbooks. metadata: {"clawdbot":{"emoji":"🍎","requires":{"bins":["curl","jq"],"env":["APPLE_PAY_MERCHANT_ID"]},"os":["darwin","linux","win32"]}}
On first use, read setup.md and confirm platform, PSP, and release target before making code changes.
User needs Apple Pay for checkout, subscriptions, or wallet-first conversion improvements. Agent handles architecture choice, merchant setup, token safety, launch validation, and post-launch operations.
Memory lives in ~/apple-pay/. See memory-template.md for setup and status fields.
~/apple-pay/
|-- memory.md # Project snapshot, risk status, and rollout state
|-- implementations.md # Selected approach and platform notes
|-- validation-log.md # Test evidence and environment results
`-- incidents.md # Failed payments, root causes, and fixes
Use the smallest relevant file for the current task.
| Topic | File |
|---|---|
| Setup flow | setup.md |
| Memory template | memory-template.md |
| Implementation plan | implementation-playbook.md |
| Validation matrix | validation-checklist.md |
| Failure recovery | failure-handling.md |
| Release and operations | launch-playbook.md |
| Recurring and subscription flows | recurring-payments.md |
APPLE_PAY_MERCHANT_IDcurl, jqNever ask users to paste private keys or full certificate private material into chat.
Local notes stay under ~/apple-pay/:
- memory file for current state and integration decisions
- validation log file for test outcomes and evidence
- incidents file for failure signatures and mitigations
Start by identifying the target outcome: - Higher checkout conversion - Faster repeat purchases - Cleaner mobile payment UX - Lower payment failures
Then choose one primary path: - Web with Apple Pay JS and merchant session backend - Native iOS with PassKit - PSP-mediated integration (for example Stripe, Adyen, Braintree)
Do not mix paths in one patch unless user asks for a migration plan.
Before implementation, confirm: - Merchant ID exists and matches target environment - Payment processing certificate exists and is valid - Domain association file is hosted and reachable for web - Sandbox and production credentials are separated
If any prerequisite is missing, pause coding and produce a concrete prerequisite checklist.
小蔥技能站7w4.net每天更新,海量AI技能等你發現。
Amounts and currency must match across: - Client request payload - Server-side cart or order totals - PSP authorization and capture calls
Never trust client totals for final charge amount.
Treat Apple Pay payment tokens as sensitive: - Forward token payload only to backend or PSP - Persist metadata only (request id, status, amount, currency) - Never store raw token payload in logs, notes, or screenshots
Require idempotency and reconciliation for all critical calls: - Authorization request - Capture request - Refund or void operations
Every retried request must reuse stable idempotency keys to prevent duplicates.
Do not recommend production rollout until all gates pass: - Sandbox success, decline, cancellation, and timeout paths are tested - Device and browser matrix is complete for supported audience - Fallback card or alternative checkout works when Apple Pay is unavailable - Failure observability and alerts are active
For each implementation, include: - What customer sees on success and failure - Which errors are recoverable vs terminal - What support team should do first for each failure class - Rollback or kill-switch decision point
Prefer stable payment reliability over feature breadth.
| Endpoint | Data Sent | Purpose |
|---|---|---|
| https://apple-pay-gateway.apple.com | Merchant validation request payload | Establish merchant session for Apple Pay on the web |
| https://apple-pay-gateway-cert.apple.com | Merchant validation request payload (sandbox/cert path) | Validate merchant sessions in non-production environments |
| https://appleid.apple.com | Account and merchant auth metadata | Apple account and merchant identity operations |
No other data should be sent externally unless the selected PSP requires it.
Data that leaves your machine: - Merchant validation requests to Apple endpoints - Payment tokens sent to the configured PSP or backend
Data that stays local:
- Integration notes and rollout state under ~/apple-pay/
- Validation evidence and failure logs without raw tokens
This skill does NOT: - Store raw payment tokens in memory files - Skip mandatory Apple merchant requirements - Enable production release without explicit readiness checks
Apple Pay integrations depend on Apple infrastructure and the chosen PSP. Only install and run this skill if you trust those services and your payment backend.
Install with clawhub install <slug> if user confirms:
- payments - General payment design and checkout decision frameworks
- app-store-connect - Apple ecosystem account and operational workflows
- ios - iOS implementation and device-level debugging patterns
- auth - Authentication and session hardening in transaction flows
- api - Reliable backend API contracts and failure-safe integrations
clawhub star apple-payclawhub sync這個 Apple Pay 工具質量可靠,文件組織清晰,覆蓋了從配置到上線的完整流程。優點是安全規範嚴格、故障處理指南詳盡、釋出流程專業。不足之處是缺少程式碼示例,對於沒有經驗的開發者來說需要額外補充實現細節。適合需要安全可靠整合的專案使用。