TeamGames Claim API
This guide shows how your backend can call the TeamGames v4 claim endpoint to fetch undelivered purchases for a player and hand them out inside your own game or service.
1. Grab Your Credentials
Sign in to the TeamGames dashboard.
Open your game server → Integrations → Storefront API.
Copy the Server API Key. Keep this key private; do not ship it in client builds.
Official TeamGames SDKs accept the raw key and handle Base64 encoding automatically. When you call the REST endpoint yourself, Base64-encode the raw key and send it in the
Authorizationheader.
2. Make the Claim Request (v4)
POST /api/v4/store/transaction/update HTTP/1.1
Host: api.teamgames.io
Content-Type: application/json
Authorization: BASE64_ENCODED_API_KEY
{
"playerName": "Player123",
"preview": false,
"includeRawTransactions": false
}playerName
Required. The username supplied during checkout. Case matters.
preview
Optional. true runs a dry run—returns the items but does not mark them delivered.
includeRawTransactions
Optional. true adds the database rows (invoice, payment type, etc.). Leave false for normal play.
Respect rate limits – Each player can hit the claim endpoint once every ten seconds (per game server). Surface the response message verbatim so players know when to retry.
3. Interpret the Response
status/codedescribe the outcome (SUCCESS,NO_ITEMS,RATE_LIMIT,SERVER_NOT_FOUND, etc.). HTTP status is always 200.messageis a player-friendly string you can show as-is.data.claimscontains everything you need to grant the items—each entry mirrors the legacy array format.quantity_to_grantis the number of units you should deliver (it includes any bonus quantities or "give" amounts configured on the product).quantity_purchasedis the number of units the player actually paid for during checkout.Legacy keys
product_amount/amount_purchasedare still included for backwards compatibility but will be retired in a future major release.
data.rawTransactionsis populated only whenincludeRawTransactionsistrue; use it for auditing or reconciliation.
Common codes
SUCCESS
Items delivered.
Grant them and log the fulfillment.
PREVIEW
Dry run only.
Do not grant items; show the message.
NO_ITEMS
Nothing pending.
Tell the player there’s nothing to claim yet.
RATE_LIMIT
Too many requests.
Ask the player to wait ~10 seconds.
ALREADY_CLAIMED
Another node already fulfilled it.
Treat as success.
SERVER_NOT_FOUND
API key invalid or missing server.
Verify the key, rotate if needed.
PRODUCT_NOT_FOUND
Product was deleted or disabled.
Restore the product or escalate.
4. Production Checklist
5. Try It Yourself (Pick Your Stack)
The Java client accepts the raw API key (no manual Base64 step). Catch exceptions or inspect response.code to drive your fulfillment logic.
Set TEAMGAMES_API_KEY (raw value) before running the command (the printf | base64 step handles encoding).
6. Legacy Array Response (v3)
Need to keep an older integration alive? POST /api/v3/store/transaction/update still returns the historical array and expects the x-api-key header. It does not include the status envelope or preview support, so plan your migration to v4 when possible.
Last updated
Was this helpful?