Prerequisites
- App Store Connect access with the Admin or Account Holder role.
- A PNLight project with the correct iOS bundle ID and App Store ID.
- At least one in-app purchase or subscription created in App Store Connect.
Open AppStore settings in PNLight
1
Open Integration
In the project dashboard, open Integration.
2
Find AppStore
Scroll to the AppStore section.
3
Copy the notification URL
Copy the AppStore Connect notification URL. You will add it in App Store Connect after saving the credentials.
Create an in-app purchase key
The in-app purchase key is a.p8 private key from App Store Connect. PNLight uses it to verify StoreKit 2 purchases, decode App Store Server Notifications, and recover subscription history.
1
Open App Store Connect
Sign in to App Store Connect and open Users and Access.
2
Open integrations
Open Integrations and then In-App Purchase.
3
Generate the key
Generate an in-app purchase key and download the
.p8 file.4
Copy the issuer ID
Copy the issuer ID from the same App Store Connect page.
Save credentials in PNLight
In Integration → AppStore, fill in:
Click Save AppStore settings after entering the issuer ID and shared secret. Upload the
.p8 file with the Upload *.p8 button.
Configure server notifications
App Store Server Notifications let PNLight receive subscription renewals, cancellations, refunds, billing retry events, and other subscription lifecycle changes without waiting for the app to open.1
Copy the PNLight notification URL
In Integration → AppStore, copy the AppStore Connect notification URL.
2
Open the app in App Store Connect
In App Store Connect, open My Apps and select the iOS app that matches this PNLight project.
3
Open App Information
Open App Information and find App Store Server Notifications.
4
Paste the URL
Paste the PNLight URL into both Production Server URL and Sandbox Server URL.
5
Use version 2
If App Store Connect asks for a notification version, select Version 2.
6
Save changes
Save the App Store Connect settings.
If the App Store Server Notifications section is missing in App Store Connect, create at least one in-app purchase or subscription for the app and check again.
What to verify before testing
- The
.p8file belongs to the same App Store Connect account. - The bundle ID matches the app that includes the SDK.
- The App Store ID matches the app listing.
- The notification URL is copied from the same PNLight project.
- The notification URL is saved for both production and sandbox.
- App Store Server Notifications use version 2.
App Store changes can take time to affect sandbox and production events. Test with a fresh sandbox purchase after saving the integration settings.