What Is Receipt Validation?

Receipt validation checks an App Store or Google Play purchase on a server before counting revenue. Apple signs a JWS. Google checks a purchase token.

Receipt validation checks a mobile store purchase on a server before you count it as revenue. The App Store and Google Play are the source of truth for whether a charge happened. The device tells you a purchase occurred. Your server asks the store to confirm the signed transaction or the purchase token, and only then records an event such as purchase.

Skipping that step means a tampered client can send a product ID you never sold.

How does it work on each store?

Apple, StoreKit 2. A successful purchase yields a Transaction. Transaction.jwsRepresentation is a JSON Web Signature (JWS) signed by Apple. VerificationResult tells the app whether StoreKit already verified that signature on device. For revenue, the server verifies again. The App Store Server API method Get Transaction Info (GET /inApps/v1/transactions/{transactionId}) returns signedTransactionInfo, another Apple-signed JWS. Decoded claims include transactionId, productId, price, currency, and purchaseDate. Subscription flows also use signedRenewalInfo.

Google Play. The Play Billing Library purchase includes Purchase.getPurchaseToken(). The server calls the Google Play Developer API. purchases.products.get reads a one-time product by package name, product ID, and token. purchases.subscriptionsv2.get reads a subscription. The response includes the purchase state. A pending or canceled purchase is not the same event as a charged one. Consume or acknowledge the purchase the way the product type requires, or the store can refund it automatically.

Store the store's transaction ID as your order ID. Retries of the same notification must not create a second purchase. See event deduplication.

A concrete example

A player buys a coin pack.

On iOS the server receives signedTransactionInfo. After signature checks, the payload contains productId coins_small, transactionId 1000000123456789, currency USD, and a price in milliunits as Apple defines that field. The server writes one purchase event with transaction_id set to that transactionId, product_id coins_small, currency USD, and store app_store. It does not write a second event when the same notification is delivered again.

On Android the client sends the purchase token to your server, not to the ad network. The server calls purchases.products.get. When the purchase state is purchased, it writes purchase with transaction_id set to the order ID from the Play response, product_id coins_small, and store play. A refund later is a refund event with the same transaction_id, not a deleted row and not a negative purchase that still counts as a new customer.

The milliunit price and the purchase token are fields to verify. They are not a recommended price.

What are the limits?

Device receipts and tokens can be replayed. Verification has to be idempotent on transactionId or the Play order ID.

Apple's price claim and Google's price are what the store charged in that currency. They are not net proceeds after tax and store commission unless you apply that adjustment yourself and label it.

Subscription renewals are new transactions with their own IDs. A validation pipeline that only accepts the original purchase will miss renewal revenue. A pipeline that treats every renewal notification as a new user will inflate customer counts.

Pending purchases, family sharing, and promotional grants can look like a charge. Read the store's status fields before you send the event to an ad platform as value.

Server-side validation does not bypass App Tracking Transparency. Confirming a purchase with Apple or Google is a transaction with the store. It does not authorize tracking the buyer across other companies' apps.

How Hardal handles it

Hardal does not replace the App Store Server API or the Play Developer API. Your server validates the JWS or the purchase token, then sends Hardal the confirmed purchase (and later refund) with transaction_id, value, currency, and product_id. Hardal can route that event to the destinations you allow and keep it beside ad revenue events. See impression-level ad revenue.

Send refunds. A purchase value that never reverses will train bidding on revenue you gave back. The mobile game revenue signals note covers why store revenue has to reach the networks you optimize for, and Hardal for Gaming is the product context.

Related terms: Events, Event deduplication, Impression-level ad revenue

Frequently asked questions

What is a StoreKit 2 JWS transaction?

StoreKit 2 represents a transaction as a signed JSON Web Signature. The JWS is on Transaction.jwsRepresentation. Your server verifies Apple's signature before it trusts the product ID, price, or transaction ID inside the payload.

What does the App Store Server API return?

Get Transaction Info returns signedTransactionInfo, a JWS signed by Apple. Subscription status calls can also return signedRenewalInfo. The signed payload is the record to verify, not a plain JSON body from the device.

How does Google Play confirm a purchase?

The Play Billing Library gives the app a purchase token. Your server sends that token to the Google Play Developer API. purchases.products.get covers a one-time product. purchases.subscriptionsv2.get covers a subscription.

Can the app decide that a purchase is valid?

The app can show the store's result, but a client-side check is not enough for revenue. Validate on a server you control, then record the purchase. A modified client can otherwise report a transaction the store never charged.

Hardal is the first-party data and agentic analytics platform.

We help enterprises send accurate signals to their ad platforms and grow revenue, using server-side data from their websites, mobile apps and AI agents.