EndpointsTransactions

Submit completed money-flow transactions for a session

Submit one or more completed purchases for a k-ID session. Each event records what was bought, what it cost, and whether the charge went through. Use this endpoint after a purchase completes, including each renewal of a recurring one. Set `status` to `failed` for a charge that was attempted and did not complete, so a parent can tell the two apart. Events are processed independently. The response carries a per-event status: * `accepted` - the purchase was recorded. Resubmitting an event whose `id` was already accepted is a safe no-op: it counts as `accepted` again and is not recorded twice, so retries after a network failure won't double-count. * `rejected` - the purchase failed validation; the `reason` identifies which rule. The whole batch is rejected when the session does not exist or is revoked.

POST
/transaction/push
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/push" \  -H "Content-Type: application/json" \  -d '{    "sessionId": "b1a6482d-5242-4b4a-aa88-3fa52595a672",    "events": [      {        "id": "9d4e2f81-7a3b-4c56-8e90-1f2a3b4c5d6e",        "type": "purchase",        "title": "Starter Pack",        "description": "500 coins and a cosmetic item",        "amount": 499,        "currency": "USD",        "timestamp": "2026-06-24T09:00:00Z",        "status": "successful",        "url": "https://your-webstore.example.com/manage?ref=order-4455667"      }    ]  }'
{  "sessionId": "b1a6482d-5242-4b4a-aa88-3fa52595a672",  "accepted": 1,  "rejected": 0,  "events": [    {      "id": "9d4e2f81-7a3b-4c56-8e90-1f2a3b4c5d6e",      "status": "accepted"    }  ]}