Skip to content

Commencement-Technology/ServerForAppStoreServerNotification

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Server for handling App Store Server Notifications

A server (endpoint) that handles App Store Server Notifications for Monitoring In-App Purchase events in real time and learn of unreported external purchase tokens.

For more details, please refer to my blog A Server Endpoint For App Store Server Notifications

Set up Env

  • PRIVATE_KEY, KEY_ID, and ISSUER_ID is only used for sending test notifications. If that is not needed, those don't have to be included.
# P8 private key (subscription key) obtained from App Store Connect > Users and Access > Key > In App Purchase
PRIVATE_KEY="-----BEGIN PRIVATE KEY-----\...\n...\n...\n-----END PRIVATE KEY-----"
# key id for the private key
KEY_ID="..."
# issued obtained from the same place as private key
ISSUER_ID="...-...-...."
# app bundle Id that the in app purchase is set up for (ie: app store server notification is sent for)
APP_BUNDLE_ID="com.example.myApp"
# Apple Id obtained from App store connect > app general information for the app above
# Required for production environment
APP_APPLE_ID="..."
# Sandbox or Production: https://developer.apple.com/documentation/appstoreserverapi/environment
APN_ENVIRONMENT="Sandbox"

Deployment

  • Vercel/Lambda/Edge function will work.
    • Remember to Remove builtin authentication
  • CloudFlare workers will NOT work because it is basically run as a client environment where Apple's App Store Server SDK (@apple/app-store-server-library) requires server environment

About

A server (endpoint) for handling App Store Server Notification to, for example, Monitor In-App Purchase events.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • TypeScript 100.0%