Skip to main content
App Store integration lets PNLight validate iOS purchases and process App Store Server Notifications. Configure it for every PNLight project that receives production or sandbox iOS purchases.

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.
Apple lets you download the .p8 key only once. Store it securely and do not rename the file before uploading it to PNLight.

Save credentials in PNLight

In Integration → AppStore, fill in:
FieldWhat to enter
Issuer IDThe issuer ID from Users and Access → Integrations → In-App Purchase in App Store Connect.
App Store shared secretThe app-specific or primary shared secret used for legacy receipt validation.
In-App Purchase KeyThe downloaded .p8 in-app purchase key. Keep the original file name.
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 .p8 file 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.