Handle server-to-server purchase verification for in-game items across Apple, Google, and Steam from a unified backend

domain: iap-verification · 5 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. Define a unified receipt payload your game client sends to your backend: platform identifier (apple/google/steam), purchaseToken or transactionId, productId, and player ID
  2. Route to the platform-specific validation logic: for Apple call the App Store Server API GET /inApps/v1/transactions/{transactionId}; for Google call androidpublisher purchases.products.get; for Steam call ISteamMicroTxn/QueryTxn after FinalizeTxn
  3. On validation success, write an idempotent grant record keyed by (platform, transactionId/token) before granting the item — check for duplicates first to prevent replay attacks
  4. Grant the item via your server-side inventory service (e.g. PlayFab AddInventoryItems or your own database) only after the duplicate check passes
  5. Return a structured response to the client indicating success, already-claimed, or validation-failure; never reveal raw platform error messages to the client

Known gotchas

Related routes

Validate an Apple App Store in-app purchase receipt server-side using the App Store Server API
app-store-server-api · 5 steps · unrated
Validate Apple App Store in-app purchase receipts and handle server-to-server notifications (App Store Server Notifications V2)
developer.apple.com · 6 steps · unrated
Handle in-game purchase refund requests using the Apple App Store Server API CONSUMPTION_REQUEST flow
app-store-server-api · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans