GET /api/v2/server-side-api/vc/transactions/

列出虚拟货币交易记录

返回用户画像的虚拟货币交易历史记录,按最新优先排序。结果使用游标分页:当响应包含非空的 pagination.next_cursor 时,将其作为 cursor 查询参数传回以获取下一页。

Query parameters

currency_codestring

将历史记录过滤为单个虚拟货币代码。

cursorstring

上一个响应中作为 pagination.next_cursor 返回的不透明分页游标。省略则获取第一页。

limitinteger

每页返回的最大事务数。默认为 50。

Header parameters

adapty-customer-user-idstring

您系统中客户的唯一 ID。adapty-customer-user-idadapty-profile-id 二者必填其一。

adapty-profile-idstring

您系统中用户画像的唯一 ID。如果您正在使用匿名用户画像,这是最佳选择。adapty-customer-user-idadapty-profile-id 二者必填其一。

Responses

交易历史记录返回成功

Schema

用户画像的虚拟货币交易记录分页列表。

dataarray of objectrequired
transaction_idstringrequired

交易的唯一 ID。

transaction_typestringrequired

交易的来源。可选值为 store_purchasesubscription_renewaltrial_startapi_transactiondashboard_transactionrefundexpiry

itemsarray of objectrequired

本次交易中记录的各币种余额变动。

currency_codestringrequired

虚拟货币代码。

amountintegerrequired

应用于余额的带符号变动量。正值为充值,负值为扣除。

balance_afterintegerrequired

本次交易应用后的货币余额。

metadataobject

与交易一同存储的键值对(如有)。

created_atstringrequired

交易的记录时间。

paginationobjectrequired
next_cursorstringrequired

下一页的不透明游标。将其作为 cursor 查询参数传递以获取更多结果。当没有更多页面时为 Null。

Example
{
  "data": [
    {
      "transaction_id": "0190e8a4-1c2b-7def-8abc-2c1a4b6d8e90",
      "transaction_type": "api_transaction",
      "items": [
        {
          "currency_code": "COINS",
          "amount": 500,
          "balance_after": 12950
        }
      ],
      "metadata": {
        "reason": "promo_bonus"
      },
      "created_at": "2026-05-23T10:30:00Z"
    },
    {
      "transaction_id": "0190e7b2-9a44-7c10-bb31-7d2e9f0a1c55",
      "transaction_type": "store_purchase",
      "items": [
        {
          "currency_code": "COINS",
          "amount": 1000,
          "balance_after": 12450
        }
      ],
      "created_at": "2026-05-22T18:05:12Z"
    },
    {
      "transaction_id": "0190e5c0-3f18-7b9a-9e6d-44a1c8b27e03",
      "transaction_type": "subscription_renewal",
      "items": [
        {
          "currency_code": "GEMS",
          "amount": 200,
          "balance_after": 3280
        }
      ],
      "created_at": "2026-05-20T09:00:00Z"
    }
  ],
  "pagination": {
    "next_cursor": "MjAyNi0wNS0yMFQwOTowMDowMFowMTkwZTVjMC0zZjE4LTdiOWEtOWU2ZC00NGExYzhiMjdlMDM="
  }
}

错误请求。cursor 值无效(error_codeinvalid_cursor)。

Schema
errorsarray of objectrequired
sourcestring

错误来源

errorsarray of string

错误消息数组

error_codestringrequired

简短错误名称

status_codeintegerrequired

HTTP 状态码

未授权。API 密钥缺失或无效。

Schema
errorsarray of objectrequired
sourcestring

错误来源

errorsarray of string

错误消息数组

error_codestringrequired

简短错误名称

status_codeintegerrequired

HTTP 状态码

禁止访问。此应用未启用虚拟货币的 Server API。

Schema
errorsarray of objectrequired
sourcestring

错误来源

errorsarray of string

错误消息数组

error_codestringrequired

简短错误名称

status_codeintegerrequired

HTTP 状态码

未找到用户画像。

Schema
errorsarray of objectrequired
sourcestring

错误来源

errorsarray of string

错误消息数组

error_codestringrequired

简短错误名称

status_codeintegerrequired

HTTP 状态码

内部服务器错误