Skip to Content
docs
Revenue

Purchases and receipts

Send what the store gave you. We validate the receipt so revenue is counted once and only when it is real.

Client-reported prices are easy to fake and easy to double count. So the SDK sends the purchase with its receipt, and the server checks it with Apple or Google before it counts toward revenue.

Purchase()  ──►  $purchase            (what the device said)
                     │  receipt checked with the store
                     ├─►  $purchase_validated   counts as revenue
                     └─►  $purchase_rejected    never counts
later:               ──►  $purchase_refunded    negative revenue on the refund date

Sending a purchase

The SDKs' UC.Purchase / Uncorrelate.purchase fill this for you. Over HTTP, add a revenue block to a $purchase event:

{
  "event": "$purchase",
  "insert_id": "3c1e5f0c-0d0b-4d58-9a9e-2f5b0c8a7a11",
  "time": "2026-12-05T14:02:58Z",
  "player_id": "p_8812",
  "revenue": {
    "store": "app_store",
    "sku": "gems_pack_500",
    "transaction_id": "2000000812345678",
    "kind": "consumable",
    "price": 4.99,
    "currency": "USD",
    "receipt": { "jws": "eyJhbGciOiJFUzI1NiIsIng1YyI6WyJ..." }
  }
}

Prop

Type

Receipt shapes

A string is accepted as-is and the format is detected. The explicit forms are preferred:

{ "jws": "<Transaction.jwsRepresentation>" }

Verified offline against Apple's certificate chain.

How revenue is reported

  • In USD at that day's exchange rate, with the original currency and amount kept.
  • Gross by default. Set a per-app store fee (15% or 30%) in settings to see net.
  • Refunds are negative revenue on the day they happen, not on the day of the purchase.
  • Without store credentials, purchases count as unverified and the Revenue screen says so. Add credentials next: Store credentials.

On this page