← 返回 Skills 市场
ivangdavila

Apple Pay

作者 Iván · GitHub ↗ · v1.0.0
darwinlinuxwin32 ✓ 安全检测通过
292
总下载
1
收藏
0
当前安装
1
版本数
在 OpenClaw 中安装
/install apple-pay
功能描述
Implement Apple Pay for web and iOS with merchant validation, token handling, and production-safe checkout flows.
使用说明 (SKILL.md)

Setup

On first use, read setup.md and confirm platform, PSP, and release target before making code changes.

When to Use

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.

Architecture

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

Quick Reference

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

Requirements

  • Environment variable: APPLE_PAY_MERCHANT_ID
  • CLI tools for diagnostics: curl, jq
  • Access to Apple merchant account assets for the target environment

Never ask users to paste private keys or full certificate private material into chat.

Data Storage

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

Core Rules

1. Confirm Business Goal Before Choosing Integration Path

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.

2. Require Merchant and Domain Prerequisites

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.

3. Enforce Server Truth for Amounts and Currency

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.

4. Keep Token Handling Minimal and Auditable

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

5. Build Idempotent and Recoverable Payment Steps

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.

6. Separate Sandbox and Production Release Gates

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

7. Include Support and Incident Paths in Every Delivery

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.

Common Traps

  • Running merchant validation from the client -> exposes sensitive flow and fails reviews
  • Trusting client-side totals -> mismatch between authorized and captured amounts
  • Reusing sandbox credentials in production -> live checkout failures at launch
  • Treating simulator-only tests as release evidence -> real devices still fail
  • Missing idempotency on retries -> duplicate charges and refund overhead
  • Launching without fallback checkout -> conversion loss when wallet is unavailable

External Endpoints

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.

Security & Privacy

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

Trust

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.

Related Skills

Install with clawhub install \x3Cslug> 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

Feedback

  • If useful: clawhub star apple-pay
  • Stay updated: clawhub sync
安全使用建议
This skill is an instruction-only Apple Pay playbook and appears coherent and low-risk. Before using it: (1) do not paste private keys or certificates into chat — follow the guide to keep those in your secure systems; (2) verify any APPLE_PAY_MERCHANT_ID value you provide is appropriate for the environment (sandbox vs production) and that you don't hand over production credentials to the agent; (3) review the files the skill will create under ~/apple-pay and the permissions it suggests; (4) run changes first in sandbox and verify backend handling of tokens/PSP calls — the skill itself will not install code or reach out to unknown endpoints beyond Apple/selected PSPs.
功能分析
Type: OpenClaw Skill Name: apple-pay Version: 1.0.0 The skill bundle is designed to guide an AI agent in securely implementing Apple Pay. All files, including markdown instructions and shell commands in `setup.md`, focus on security best practices such as server-side validation, proper token handling, separation of sandbox/production environments, and restrictive file permissions for local data. The external endpoints are legitimate Apple domains, and there is no evidence of data exfiltration, malicious execution, persistence mechanisms, or prompt injection attempts to subvert the agent's purpose. The use of `curl` and `jq` is for standard diagnostic and API interaction tasks.
能力评估
Purpose & Capability
Name and description match the content: the files and SKILL.md focus on implementing Apple Pay for web/iOS, merchant validation, token handling, rollout and incident playbooks. Required items (APPLE_PAY_MERCHANT_ID, curl, jq, access to Apple merchant account assets) are appropriate for this purpose.
Instruction Scope
Runtime instructions are limited to guidance, local workspace creation under ~/apple-pay, validation steps, and safe handling rules (never paste private keys, do not store raw tokens). External endpoints are Apple merchant endpoints and PSPs as expected. No instructions urge reading unrelated system files or exfiltrating secrets.
Install Mechanism
No install spec and no code files — this is instruction-only, so nothing will be downloaded or written beyond the documented local workspace the guide asks to create.
Credentials
Only APPLE_PAY_MERCHANT_ID is required; the skill explicitly avoids requesting private keys or certificate material in chat. The requested CLI tools (curl, jq) are reasonable for diagnostics. No unrelated credentials or config paths are requested.
Persistence & Privilege
Skill is not always-enabled and does not request elevated platform privileges. It suggests creating a confined local directory (~/apple-pay) with restrictive permissions and does not modify other skills or system-wide settings.
如何使用
  1. 确保已安装 OpenClaw(本地或 Docker 部署)
  2. 在对话框中输入安装命令:/install apple-pay
  3. 安装完成后,直接呼叫该 Skill 的名称或使用 /apple-pay 触发
  4. 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
版本历史
v1.0.0
Expanded implementation and rollout guidance with stronger validation and incident handling playbooks.
元数据
Slug apple-pay
版本 1.0.0
许可证
累计安装 0
当前安装数 0
历史版本数 1
常见问题

Apple Pay 是什么?

Implement Apple Pay for web and iOS with merchant validation, token handling, and production-safe checkout flows. 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 292 次。

如何安装 Apple Pay?

在 OpenClaw 或 Claude Code 对话框中运行命令「/install apple-pay」即可一键安装,无需额外配置。

Apple Pay 是免费的吗?

是的,Apple Pay 完全免费(开源免费),可自由下载、安装和使用。

Apple Pay 支持哪些平台?

Apple Pay 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(darwin, linux, win32)。

谁开发了 Apple Pay?

由 Iván(@ivangdavila)开发并维护,当前版本 v1.0.0。

💬 留言讨论