sangtao.ai
API key

Account

Credit transactions

Every credit movement on the account, newest first: top-ups, charges, refunds.

GEThttps://api.sangtao.ai/v2/account/transactions

Authorization

  • X-Api-Keystring · headerrequired

    Your API key, from the API keys page of your account.

Query parameters

  • typestring

    Only transactions of this type. Case does not matter.

    Available options:TopupConsumeBonusRefundAdjustmentExchange

  • pageint

    Page number, from 1. Default 1.

  • pageSizeint

    Transactions per page. Default 20, at most 100. limit is accepted as the same thing.

Response

An array of transactions, newest first. The total for the filter is in the X-Total-Count header.

  • idstring

    The transaction’s id, tx_….

  • typestring

    What kind of movement it was.

    Available options:TopupConsumeBonusRefundAdjustmentExchange

  • descriptionstring

    What it was for, as a sentence (in Vietnamese).

  • descriptionKeystring | null

    The kind of sentence, to write description in your own language, e.g. "bank_topup". null when there is none.

  • descriptionParamsobject | null

    The values in that sentence (amount, package…), as strings.

  • amountnumber

    Credits added (positive) or taken (negative).

  • balanceAfternumber

    The balance right after it.

  • jobIdstring | null

    The job it was for. null when it is not about a job (a top-up, say).

  • createdAtstring

    When it happened, ISO 8601 in UTC.

GET/account/transactions
curl "https://api.sangtao.ai/v2/account/transactions?page=1&pageSize=20" \
  -H "X-Api-Key: YOUR_API_KEY"
{
  "success": true,
  "data": [
    {
      "id": "tx_8hQ2mZr4K",
      "type": "Consume",
      "description": "Motion render",
      "descriptionKey": "motion_render",
      "descriptionParams": {},
      "amount": -12,
      "balanceAfter": 142,
      "jobId": "acff47cbfacf4e27bbc08770c9ea246d",
      "createdAt": "2026-11-09T10:01:00Z"
    },
    {
      "id": "tx_3kT9qPz0B",
      "type": "Topup",
      "description": "Nạp 200.000đ — Gói Starter",
      "descriptionKey": "bank_topup",
      "descriptionParams": {
        "vnd": "200000",
        "package": "Gói Starter"
      },
      "amount": 150,
      "balanceAfter": 154,
      "jobId": null,
      "createdAt": "2026-11-08T03:20:00Z"
    }
  ]
}