EndpointsTransactions

Request parental approval for a purchase

Ask the player's trusted adult to approve one purchase. Use this endpoint before charging, and complete the purchase only once the approval arrives. The request is held until `expiresAt`, after which it can no longer be approved or denied. The outcome is delivered as a `Transaction.PurchaseApprovalResult` webhook carrying `approved`, `denied` or `expired`. Treat `expiresAt` as the deadline rather than waiting on the webhook indefinitely. Resubmitting an `id` that is already awaiting a decision is a safe no-op: the pending request is returned unchanged and no second request is created, so retries after a network failure won't prompt twice. A player may hold at most 20 purchases awaiting a decision; beyond that the call is rejected with `INVALID_INPUT` until one resolves.

POST
/transaction/request-purchase
AuthorizationBearer <token>

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

curl -X POST "https://example.com/transaction/request-purchase" \  -H "Content-Type: application/json" \  -d '{    "sessionId": "b1a6482d-5242-4b4a-aa88-3fa52595a672",    "id": "9d4e2f81-7a3b-4c56-8e90-1f2a3b4c5d6e",    "title": "Starter Pack",    "description": "500 coins and a cosmetic item",    "amount": 499,    "currency": "USD"  }'
{  "id": "2e9b7c41-8d6a-4f23-bc15-3a8e9d0f1b62",  "expiresAt": "2026-06-25T16:00:00Z"}