Purchases
POST /v1/purchases. A shortcut that writes a $purchase event.
The body is a purchase plus player_id (or device_id). It is the same as sending a $purchase event with a revenue block through Ingest batch.
keyAuthorizationBearer <uc_pub_dev_…>A development key (uc_pub_dev_…) from Settings ▸ Keys in the app. The playground only accepts development keys.
application/json- body
The revenue block of a $purchase event. POST /v1/purchases (and the SDKs' UC.Purchase / Uncorrelate.purchase) is sugar that accepts this object plus player_id and writes the $purchase event. The SDK sends what the store gave it, including the receipt. The server validates the receipt with Apple or Google asynchronously and writes the result as $purchase_validated (or $purchase_rejected); revenue charts count validated purchases by default. The client-reported price is kept for display but is never treated as truth. See docs/recipe/05-ingestion-and-sdks.md#receipts.
store*unknown"app_store""google_play""steam""web""other"sku*stringtransaction_id*stringStore transaction id. Dedup key for revenue: a transaction counts once, whatever the insert_id.
original_transaction_id?stringSubscriptions: ties renewals together.
kind?unknown"consumable""consumable""non_consumable""subscription""subscription_renewal""refund"quantity?integer1 <= value1price?numberLocal price as the store showed it, in currency. Client-reported.
currency?string^[A-Z]{3}$is_sandbox?booleanfalsereceipt?|||What the store returned. A string is accepted as-is (base64 App Store receipt, StoreKit 2 JWS, or Play purchase token; the server detects which from store and the shape). The object forms are explicit and preferred.
player_id?stringlength <= 128device_id?stringlength <= 128Accepted; validation is pending.
application/json- response
insert_id?stringvalidation?"pending""pending"curl -X POST 'https://ingest.uncorrelate.com/v1/purchases' \ -H 'Authorization: Bearer ' \ -H 'Content-Type: application/json' \ -d '{ "player_id": "p_8812", "store": "app_store", "sku": "gems_pack_500", "transaction_id": "2000000812345678", "price": 4.99, "currency": "USD", "receipt": { "jws": "eyJhbGciOiJFUzI1NiIsIng1YyI6WyJ..." }}'{ "insert_id": "string", "validation": "pending"}Validation happens in the background; the result arrives as $purchase_validated or $purchase_rejected in the player's stream.