App Store setup
In-App Purchase key
Appwind Pay checks every App Store purchase with Apple's App Store Server API, so it needs an In-App Purchase key.
- App Store Connect → Users and Access → Integrations → In-App Purchase → Generate In-App Purchase Key.
- Copy the Issuer ID (top of the page) and the Key ID; download the .p8 (Apple lets you download it once).
- Add it when you add the app (or later in Store accounts). Appwind Pay stores it encrypted (AES-GCM) and never shows it again. Press Test credentials to check it.
Your Admin role in App Store Connect is enough; you don't need the Account Holder.
Server notifications (Version 2)
App Store Connect → your app → App Information → App Store Server Notifications:
- Production Server URL: your app's notification URL from Appwind Pay
- Sandbox Server URL: the same URL
- Version: Version 2
Apple allows one URL per environment. If you still need RevenueCat while you move, put Appwind Pay's URL in App Store Connect and RevenueCat's URL in Project settings → Moving from RevenueCat: Appwind Pay forwards every notification unchanged.
Appwind Pay checks Apple's signature on every notification (certificate chain to Apple Root CA G3) and refuses unsigned ones.
What Appwind Pay handles
| Apple notification | What happens |
|---|---|
| SUBSCRIBED, DID_RENEW | Access on/extended; INITIAL_PURCHASE / RENEWAL (trial conversion flagged) |
| DID_CHANGE_RENEWAL_STATUS | CANCELLATION (still active until expiry) / UNCANCELLATION |
| DID_CHANGE_RENEWAL_PREF | Pending plan change shown on the subscription (auto_renew_product_id); PRODUCT_CHANGE |
| DID_FAIL_TO_RENEW | Billing issue; grace period keeps access; BILLING_ISSUE |
| GRACE_PERIOD_EXPIRED, EXPIRED | Access ends; EXPIRATION with reason |
| REFUND, REVOKE | Access removed, refund recorded in revenue with Apple's reason; CANCELLATION / EXPIRATION |
| REFUND_DECLINED, REFUND_REVERSED | Kept in customer history / access restored |
| CONSUMPTION_REQUEST | Appwind Pay answers Apple with usage data (if you turn it on) |
| OFFER_REDEEMED, PRICE_INCREASE, RENEWAL_EXTENDED | Offer code on events, consent recorded, new expiry |
| Family Sharing | Shared purchases unlock for family members (is_family_share) |
The app account token
The SDK puts an appAccountToken (a UUID made from the app user ID) on every purchase, so a notification that arrives before the app reports the purchase still reaches the right user.
StoreKit testing
Sandbox purchases are marked sandbox everywhere and kept out of revenue. Sandbox subscriptions renew fast (a month in 5 minutes), which is a good way to see renewals and expirations arrive.