--- id: app-store-server-library version: "3.1.2" license: MIT license_treatment: permissive maintenance: active --- # app-store-server-library — The App Store Server Library License: permissive · Maintenance: active · Downloads: 985.9K/mo ## 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 above — 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 pip install app-store-server-library uv add app-store-server-library 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_current - Install friction: low - Maintenance: active - Downloads: 985.9K/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags app store server api python, in-app purchase verification, apple subscription management, app store notifications, ios receipt validation, promotional offer signatures, app store connect integration, app-store-integration, cryptographic-verification, subscription-management [View on SkillFed](https://skillfed.io/packages/app-store-server-library) · [View on PyPI](https://pypi.org/project/app-store-server-library/)