skillfed

app-store-server-library

The App Store Server Library

app-store-server-library v3.1.2 985.9K downloads/30d#4,573 on PyPI
Permissive license MIT Active released

What it is and what it does

This is Apple's official Python library for integrating server-side App Store operations into Python applications. It wraps the App Store Server API, App Store Server Notifications, Retention Messaging API, and Advanced Commerce API, handling the cryptographic details of JWT signing, signed data verification, and receipt parsing so developers don't have to implement these protocols manually.

The library manages authentication to Apple's servers using private keys, verifies cryptographically signed notifications and receipts from Apple, extracts transaction history, and generates promotional offer signatures. It depends on cryptography, PyJWT, requests, and related libraries to handle the underlying security operations. Developers use it to validate purchases, manage subscriptions, respond to subscription events, and create time-limited promotional pricing—all the server-side tasks needed to monetize iOS apps.

Use it for:

  • Validate in-app purchase receipts and transaction history from iOS apps in your backend.
  • Listen to and verify signed App Store Server Notifications (subscription events, refunds, etc.) via webhooks.
  • Generate cryptographically signed promotional offer codes for time-limited subscription discounts.
  • Query transaction history for a user to reconcile subscriptions and detect refunds or cancellations.
  • Implement retention messaging campaigns by integrating with Apple's Retention Messaging API.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides Python bindings to Apple's App Store Server API, handling in-app purchases, subscriptions, notifications, and promotional offers with cryptographic verification of signed data from Apple.

Yes. This is Apple's official library, actively maintained, with no known vulnerabilities, low install friction, and a permissive MIT license. Install it if you are building a Python backend for an iOS app that uses in-app purchases or subscriptions and need to validate receipts and handle App Store notifications server-side.

Install

app-store-server-library on PyPI

pip

pip install app-store-server-library

uv

uv add app-store-server-library

poetry

poetry add app-store-server-library

Installing app-store-server-library

Before you install

Low install friction with a pure-Python wheel and well-maintained dependencies. The package is actively maintained and requires Python 3.7 or later, with no compiled extensions to build.

License in practice

MIT license permits free use, modification, and distribution with minimal restrictions—suitable for both commercial and open-source projects.

Quickstart

pip install app-store-server-library

from app-store-server-library import AppStoreServerAPIClient
from app-store-server-library import Environment

private_key = read_private_key("/path/to/SubscriptionKey_ABCDEFGHIJ.p8")
client = AppStoreServerAPIClient(private_key, key_id, issuer_id, bundle_id, Environment.SANDBOX)
response = client.request_test_notification()

Requires an In-App Purchase key (p8 file) and issuer ID obtained from App Store Connect with Admin role; Python 3.7 or later.

Verify before relying

  • Whether the async HTTPX support (optional dependency) is production-ready and what versions of httpx it requires.
  • Performance characteristics when handling high-volume transaction history queries or concurrent API calls.
  • Exact scope of the Advanced Commerce API support mentioned in the description.

Package facts

License MIT (permissive)
Python support supports the current Python release (<4,>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies 7 — attrs, PyJWT, requests, cryptography, pyOpenSSL, asn1, cattrs
Maintenance actively maintained — 74 days since the last release
First released
Downloads 985,937/month — #4,573 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: app_store_server_library-3.1.2-py3-none-any.whl

License :: OSI Approved :: MIT License

Tags

app store server api pythonin-app purchase verificationapple subscription managementapp store notificationsios receipt validationpromotional offer signaturesapp store connect integration
app-store-integrationcryptographic-verificationsubscription-management

More WWW/HTTP packages