CleanShot 2023-07-19 at 10.26.01@2x.png

  1. the sheet is summoned when the webapp sends the app postmessage with { name: 'upgradeUser', value: userId, appleSubscriptionId }
  2. when the sheet closes , the app can send the webview a postmessage with {name: 'upgradedUser', isSuccess: bool, userId}
  3. webapp receives postmessage and upgrades the user for the session
  4. on payment success storekit can send a webhook with the userid to the kinopio-server. kinopio-server, verifies the webhook and updates the user db so the user is upgraded for all sessions

POST SERVER_URL/billing/webhooks-apple

[`https://api.kinopio.club](<http://api.kinopio.club/>)/billing/webhooks-apple`

[<https://650a-35-128-25-127.ngrok-free.app>](<https://650a-35-128-25-127.ngrok-free.app/>)/billing/webhooks-apple
  1. when payment is cancelled later on, storekit can send a webhook with the userid to the kinopio-server. kinopio-server verifies the webhook and updates the user db and they'll be un-upgraded from their next session

App Store Connect tasks

Other stuff

Polar Sight TEMP – Kinopio