App Store Server Notifications logo

App Store Server Notifications

Community
khadinakbarlabs
app-store-server-notifications

Set up a signature-verified Apple App Store Server Notifications V2 webhook for subscription events. Use when the user says 'app store server notifications', 'assn', 'subscription webhook', or 'iap webhook'.

Overview

Publisherkhadinakbarlabs
Repositoryexpo-mobile-app-builder
Skill nameapp-store-server-notifications
Stars
3
Forks
0
Bundled files
1
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 1 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by khadinakbarlabs on GitHub. Read the source before you install it.

Installation

Install the App Store Server Notifications AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/khadinakbarlabs/expo-mobile-app-builder/tree/main/skills/app-store-server-notifications
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/khadinakbarlabs/expo-mobile-app-builder.git /tmp/expo-mobile-app-builder
mkdir -p .claude/skills
cp -r /tmp/expo-mobile-app-builder/skills/app-store-server-notifications .claude/skills/app-store-server-notifications
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable App Store Server Notifications in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads App Store Server Notifications on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so App Store Server Notifications is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Set Up App Store Server Notifications V2

App Store Server Notifications are signed webhook payloads. Decode-only JWT helpers are not verification. Reject any notification that fails certificate-chain, signature, environment, bundle-ID, or app-ID validation before it can update entitlement state.

Required controls

  • Use Apple's current App Store Server Library and its SignedDataVerifier rather than jsonwebtoken.decode.
  • Load Apple root certificates from a trusted, versioned server-side source.
  • Configure the expected bundle ID, production app Apple ID, and environment explicitly.
  • Verify the outer notification and every nested signed transaction or renewal record you consume.
  • Make event processing idempotent by persisting a verified event identifier before applying state changes.
  • Keep this endpoint server-side. It must never rely on an app-bundled signing key or a client-provided "verified" flag.

Verified handler pattern

ts
import { Environment, SignedDataVerifier } from '@apple/app-store-server-library';

// Explicit public identity supplied by this application's server configuration.
const { bundleId, appAppleId } = getAppStoreNotificationIdentity() ?? {};

if (typeof bundleId !== 'string' || !bundleId.trim() || bundleId !== bundleId.trim() ||
    !Number.isSafeInteger(appAppleId) || appAppleId <= 0) {
  throw new Error('Invalid App Store notification configuration');
}

const verifier = new SignedDataVerifier(
  loadTrustedAppleRootCAs(),
  true,
  Environment.PRODUCTION,
  bundleId,
  appAppleId,
);

export async function POST(req: Request) {
  const body = await req.json().catch(() => null);
  if (!body || typeof body.signedPayload !== 'string') {
    return new Response('Bad request', { status: 400 });
  }

  let notification;
  try {
    notification = await verifier.verifyAndDecodeNotification(body.signedPayload);
  } catch {
    return new Response('Invalid notification', { status: 400 });
  }

  const signedTransaction = notification.data?.signedTransactionInfo;
  if (typeof signedTransaction !== 'string') {
    return new Response('Missing transaction', { status: 400 });
  }

  let transaction;
  try {
    transaction = await verifier.verifyAndDecodeTransaction(signedTransaction);
  } catch {
    return new Response('Invalid transaction', { status: 400 });
  }

  await db.transaction(async (tx) => {
    const eventId = notification.notificationUUID;
    if (!eventId) throw new Error('Verified notification is missing an id');

    const alreadyProcessed = await tx.processedEvents.findUnique({ where: { eventId } });
    if (alreadyProcessed) return;

    await tx.processedEvents.create({ data: { eventId } });
    await applyVerifiedSubscriptionTransition(tx, {
      notificationType: notification.notificationType,
      transactionId: transaction.transactionId,
      originalTransactionId: transaction.originalTransactionId,
    });
  });

  return new Response('OK', { status: 200 });
}

getAppStoreNotificationIdentity is an application-owned server accessor returning the owner's exact App Store Connect bundle ID and positive numeric app Apple ID. These public identifiers are not signing credentials. Supply this configuration explicitly for the consuming app; do not read the plugin installer's environment or accept these values from an incoming webhook. Invalid configuration fails server initialization before any verifier is created.

loadTrustedAppleRootCAs and applyVerifiedSubscriptionTransition are application-owned server helpers. The former must load current Apple roots; the latter must allow only known event-state transitions. Do not replace either with decode-only parsing or a client-provided status.

Environment and testing

  • Use a separate verifier configuration for Sandbox and Production. Production requires the configured app Apple ID.
  • Test invalid signatures, wrong bundle IDs, duplicate events, out-of-order events, refunds, renewals, and retries before enabling customer access changes.
  • Return quickly after recording verified work; queue slow side effects such as email or analytics.

RevenueCat alternative

RevenueCat can forward normalized events, but its webhook must still be authenticated with its current documented verification control before it mutates entitlement state.

Reference

See the current Apple App Store Server Library documentation before implementation. Apple documents SignedDataVerifier.verifyAndDecodeNotification for notification verification.

Verifier configuration and production app-ID requirements checked against Apple's SignedDataVerifier reference on 2026-10-04.

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the App Store Server Notifications AI skill do?

Set up a signature-verified Apple App Store Server Notifications V2 webhook for subscription events. Use when the user says 'app store server notifications', 'assn', 'subscription webhook', or 'iap webhook'.

Why use App Store Server Notifications on TypingMind?

Because you install it once and use it with any model. App Store Server Notifications is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install App Store Server Notifications in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/khadinakbarlabs/expo-mobile-app-builder/tree/main/skills/app-store-server-notifications. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use App Store Server Notifications?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with App Store Server Notifications?

As many as you like. As long as a model supports skills, you can use App Store Server Notifications with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the App Store Server Notifications AI skill free?

Yes. It is published on GitHub by khadinakbarlabs under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇