跳转至

代理商充值

代理商为子管理充值接口。

权限说明

使用代理商充值功能,应用必须选择agent权限

image-ec0fdea9-0923-4fb3-81b1-6ccdbe085bb5

请求地址

https://openapi.aiclk.com/openapi/v1/charge/agent

所属权限

agent

请求方式

POST

请求参数

字段名 类型 是否必须 描述
account_id int 代理商ID

Post body(json)

json体是一个列表结构,列表中的每一个元素结构如下:

字段名 类型 是否必须 描述
target_user uint64 子管理账号ID或广告主账号ID
money int32 充值金额,单位分,为负时业务逻辑为扣款
comment string 备注

Body 示例

{"target_user":1000004,"money":10000,"comment":""}

请求示例

curl --location 'https://openapi.aiclk.com/openapi/v1/charge/agent?account_id=1000003' \
--header 'Content-Type: application/json' \
--header 'OGW_ACCESS_TOKEN: your_access_token' \
--data '{"target_user":1507987,"money":10000,"comment":""}'

成功返回示例

{
  "code": 200,
  "data": null,
  "message": "success",
  "trace_id": "5ea90f84c5ec8c7f"
}

失败返回示例

{
  "code": 400,
  "data": null,
  "message": "账户余额不足",
  "trace_id": "51e3db63b922cc8d"
}