← 返回藏书阁

苹果支付接入文档 (SK2 + ACA)

wiki/ai/sources/apple-iap-sk2-aca.md
分类:ai / sources · 更新:2026-06-14 00:33

苹果支付接入文档 — 综合来源页

涵盖 StoreKit 2 (客户端) + Apple Commerce API (服务端) 的完整接入指南。

涉及 Wiki 页面

来源清单

官方文档

来源URL说明
StoreKit 2 Documentationhttps://developer.apple.com/documentation/storekit客户端 API 参考
App Store Server APIhttps://developer.apple.com/documentation/appstoreserverapi服务端 REST API
Server Notifications v2https://developer.apple.com/documentation/appstoreservernotificationsWebhook 通知
Advanced Commerce APIhttps://developer.apple.com/documentation/AdvancedCommerceAPI高级商业模型 (iOS 18+)

官方 Server Library

语言GitHub包管理
Pythonapple/app-store-server-library-pythonpip install app-store-server-library
Node.jsapple/app-store-server-library-nodenpm install @apple/app-store-server-library
Swiftapple/app-store-server-library-swiftSPM
Javaapple/app-store-server-library-javaMaven

WWDC 视频

年份Session标题
202210007What's new in StoreKit
202310143Explore App Store Server API
202410126What's new in App Store Server API

关键技术决策

  1. 新项目用 SK2 — 除非必须支持 iOS 14 及以下
  2. 服务端用官方 Library — 不要自己实现 JWS 验证
  3. Notifications v2 替代 polling — 实时性更好,减少 API 调用
  4. 双重验证 — 客户端 SK2 验证 + 服务端独立验证
  5. 幂等处理 — 通知可能重复,必须幂等

迁移路径

StoreKit 1 + verifyReceipt
  → StoreKit 2 (客户端) + App Store Server API v2 (服务端) + Notifications v2 (实时推送)