GET · /api/v1/wallet/callback/tasks

查询回调任务

分页查询当前应用的回调任务列表,支持按业务类型、业务 id、状态和创建时间过滤。只能查询当前 X-Api-Key 所属应用的任务。

GET/api/v1/wallet/callback/tasks HMAC

Header 参数

X-Api-Key
string required
应用 apiKey。沙箱前缀 pk_test_,正式 pk_live_
例: pk_test_4f9d8ab1c0e74...
X-Timestamp
integer (UNIX 毫秒) required
请求发起时刻的 UNIX 毫秒时间戳(13 位整数)。与服务端时差不能超过 ±300000ms(5 分钟)。
例: 1746450000000
X-Nonce
string required
本次请求的随机串,建议 UUID v4 或 16 字节 hex。同一 (apiKey, nonce) 在 10 分钟窗口内不可重复。
例: 8e3a1c2f7b6d4a90
X-Signature
string required
HMAC-SHA256 签名(小写 hex,64 字符)。算法:HMAC(secret, METHOD + "\n" + PATH + "\n" + ts + "\n" + nonce + "\n" + SHA256(body))。详见 鉴权章节
例: 6e4a8c1f...(64 字符)

Query 参数

bizType
string optional
业务类型枚举:RECHARGE / WITHDRAW / COLLECT / TRANSFER / CHAIN_EVENT。不传则返回所有类型。
例: RECHARGE
bizId
integer optional
业务记录 id,如充值记录 id 或提现记录 id。
例: 9001
status
string optional
回调任务状态:WAITING / PROCESSING / SUCCESS / FAILED。
例: FAILED
createTimeStart
string optional
创建时间起始(ISO 8601,如 2026-05-05T00:00:00)。
例: 2026-05-05T00:00:00
createTimeEnd
string optional
创建时间截止(ISO 8601)。
例: 2026-05-06T00:00:00
pageNo
integer optional
页码,从 1 开始。默认 1。
例: 1
pageSize
integer optional
每页条数,最大 200。默认 20。
例: 20

请求示例

# 签名算法(4 个 header)见 /docs/api/auth;GET body=''
API_KEY=pk_live_xxx
SECRET=sk_live_xxx
METHOD=GET
REQ_PATH=/api/v1/wallet/callback/tasks
BODY=''
TS=$(( $(date +%s) * 1000 ))
NONCE=$(uuidgen | tr -d '-' | tr '[:upper:]' '[:lower:]')
BODY_SHA=$(printf "" | openssl dgst -sha256 -hex | awk '{print $2}')
SIG=$(printf "%s\n%s\n%s\n%s\n%s" "$METHOD" "$REQ_PATH" "$TS" "$NONCE" "$BODY_SHA" \
  | openssl dgst -sha256 -hmac "$SECRET" -hex | awk '{print $2}')

curl "https://api.pqpa.com$REQ_PATH?bizType=RECHARGE&status=FAILED&pageNo=1&pageSize=20" \
  -H "X-Api-Key:   $API_KEY" \
  -H "X-Timestamp: $TS" \
  -H "X-Nonce:     $NONCE" \
  -H "X-Signature: $SIG"

响应

Response
200OK
{
  "code": 0,
  "data": {
    "list": [
      {
        "id": 5001,
        "bizType": "RECHARGE",
        "bizId": 9001,
        "url": "https://your-app.com/callback/recharge",
        "status": "FAILED",
        "retryTimes": 3,
        "maxRetryTimes": 10,
        "nextRetryTime": "2026-05-05T13:30:00",
        "lastResponseSummary": null,
        "lastError": "connect timeout",
        "createTime": "2026-05-05T12:34:56",
        "updateTime": "2026-05-05T12:50:00"
      }
    ],
    "total": 1
  },
  "msg": ""
}

data.list[] 字段说明

id
integer required
回调任务 id,可用于查询 attempt 历史或手工重发。
bizType
string required
业务类型枚举,见 Query 参数说明。
bizId
integer required
关联业务记录 id。
url
string required
本次推送的回调目标 URL。
status
string required
任务状态:WAITING / PROCESSING / SUCCESS / FAILED。
retryTimes
integer required
已重试次数(不含首次投递)。
maxRetryTimes
integer required
最大重试次数,当前为 10。
nextRetryTime
string | null required
下次重试计划时间;任务终态或暂无排队时为 null。
lastResponseSummary
string | null optional
最后一次响应 body 摘要(最多 1000 字符,超出截断)。
lastError
string | null optional
最后一次失败的错误信息(网络错误 / 超时等)。
createTime
string required
任务创建时间。
updateTime
string required
任务最后更新时间。

下一步