Payments and webhooks · Comparison
Apple deprecated verifyReceipt and the app receipt URL
Short answer
Apple lists the verifyReceipt endpoint as deprecated and recommends StoreKit 2 on the device with the App Store Server API on your server. Each purchase then arrives as a transaction signed by Apple, which your server verifies with Apple's server library before it grants access. Old app versions can still be bridged by extracting a transaction ID from the receipt.
Apple's legacy way to check a purchase was to send the app's base64 receipt from your server to the verifyReceipt endpoint. Apple lists that endpoint as deprecated, and points servers to the App Store Server API and apps to StoreKit 2, where each purchase arrives as a transaction signed by Apple. Existing integrations may keep running for now, but new work should not be built on receipts.
The practical change is that you stop decoding one large receipt and start verifying small signed transactions, either sent by the app or requested from Apple by transaction ID.
At a glance
| Receipt route (legacy) | Signed transaction route | |
|---|---|---|
| What the app sends | The base64 app receipt | A transaction ID, or the JWS of a StoreKit 2 transaction |
| Where it is checked | Apple's verifyReceipt endpoint | Your server, with Apple's server library and root certificates |
| Format of the result | JSON describing the whole receipt | A JWS signed by Apple for one transaction |
| Authentication | Shared secret for subscriptions | A signing key made in App Store Connect, used to create short-lived tokens |
| Status | Deprecated by Apple | Current recommendation |
What to change on the app side
StoreKit 2 gives every purchase as a verification result that carries a JWS. Instead of sending the receipt, send the signed transaction, or just its ID, to your server. Apple documents the Transaction type and its signed representation in the StoreKit reference.
Apple's pages also tell apps to stop depending on the receipt file for proof of purchase, which is why the receipt URL carries a deprecation note in newer SDKs.
What to change on the server side
Apple publishes an App Store Server Library for several languages, including Python. Its SignedDataVerifier takes the root certificates, whether to perform online checks, the environment, your bundle ID and the app's Apple ID. The README states that the app Apple ID must be provided for the Production environment, so a verifier that works in sandbox can fail in production if that value is missing.
For history and status, the library's AppStoreServerAPIClient is built from your private key, key ID, issuer ID, bundle ID and environment, and exposes calls such as get_transaction_history, which returns signed transactions and a flag telling you whether more pages exist.
Verifier setup, shape from the library README
verifier = SignedDataVerifier(
root_certificates, True, Environment.SANDBOX, "com.example.app", None
)
# production: pass your real app Apple ID as the last argumentCustomers still on old builds
Old app versions keep sending the base64 receipt. The library's ReceiptUtility can extract a transaction ID from an app receipt without calling verifyReceipt, and that ID opens the history call, so your server can handle both generations of app with one validation path.
Bridge from a receipt to a transaction ID
tx_id = ReceiptUtility().extract_transaction_id_from_app_receipt(app_receipt)
history = client.get_transaction_history(tx_id, None, request, GetTransactionHistoryVersion.V2)Page through the history until the response says there is nothing more, and verify every signed transaction before granting access.
Test before cutover
- Use the sandbox environment and a sandbox tester while building the new path.
- Run old and new validation side by side on the same purchases and compare entitlements.
- Keep the signing key private and out of the app binary.
Which to pick
- verifyReceipt is deprecated; signed transactions replace it.
- Verify Apple's signature on your server before granting anything.
- Production verification needs the app's Apple ID.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.