Skip to main content

apple-purchase-receipt-verifier

Verify Apple in-app purchases locally — no calls to Apple's servers.

Replaces the deprecated verifyReceipt endpoint by validating StoreKit 2 signed JWS transactions and legacy PKCS#7 receipts against pinned Apple root certificates.

pip install apple-purchase-receipt-verifier
from apple_purchase_receipt_verifier import ReceiptVerifier, JwsVerifier, apple_receipt_roots

# Legacy PKCS#7 app receipt
receipt = ReceiptVerifier(apple_receipt_roots(), "com.example.app").verify(receipt_b64)
print(receipt.receipt_type, len(receipt.in_app_purchases))

# StoreKit 2 signed transaction
transaction = JwsVerifier(apple_jws_roots(), "com.example.app").verify_transaction(jws)
print(transaction.product_id, transaction.expires_date)

The import package is apple_purchase_receipt_verifier; the distribution is apple-purchase-receipt-verifier. Requires Python 3.9+.

Why offline

Signature verification cannot fail because a vendor endpoint is down, so a purchase can be honoured immediately and reconciled against the App Store Server API afterwards. Refunds and revocations still need that reconciliation pass — a signature proves what Apple signed, not what happened since.

This is one of nine implementations (Java, Node, Python, Swift, Go, Ruby, Rust, PHP, .NET) that share a single fixture suite, including Apple's own official test fixtures, and are required to agree byte for byte. See the project README for the full picture and COMPARISON.md for how it differs from Apple's official libraries.

Licence

MIT — see LICENSE.

Release files for apple-purchase-receipt-verifier 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for apple-purchase-receipt-verifier 0.4.0
File Size Uploaded
apple_purchase_receipt_verifier-0.4.0.tar.gz 50.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for apple-purchase-receipt-verifier 0.4.0
File Interpreter ABI Platform
apple_purchase_receipt_verifier-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 80.1 kB

Release files / apple_purchase_receipt_verifier-0.4.0.tar.gz

Download URL apple_purchase_receipt_verifier-0.4.0.tar.gz
Size 50.8 kB
Tags Source
SHA-256 checksum
How to use checksums
bb12a42bec9902be85e6ac875d886ee44be4927e483e5b35a9248b1c8bb00423
BLAKE2b-256 checksum
How to use checksums
75c6554ea7dd68c50771585b64033008b3dec8820f0a8bb94033284d38f1cd1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Release files / apple_purchase_receipt_verifier-0.4.0-py3-none-any.whl

Download URL apple_purchase_receipt_verifier-0.4.0-py3-none-any.whl
Size 29.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dfd847b0f8a313ef8d1dfe351d28e6b6e6047c92f080186dc12f1df465b454d8
BLAKE2b-256 checksum
How to use checksums
e96539c86467a69a2074dd636b19c4c5ce9f2715ecee219ede1cba9c30f397b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 6, 2026.

Transparency log

Release history Release notifications | RSS feed

0.6.0

2 release files

0.5.1

2 release files

This release

0.4.0 This release

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page