额度卡接口


CreditCard 对象

字段 类型 说明
id string 卡id
cardholder_id string 持卡人ID
segment_id string 卡段ID
card_number string 卡号
name_on_card string 卡名
brand string 品牌,如VISA
expiry_year string 过期年份
expiry_month string 过期月份
cvv string cvv
balance number 余额, 单位元
total_consume number 累计消费, 单位元
total_recharge number 累计充值, 单位元
total_transfer_out number 累计转出, 单位元
actual_recharge number 实际充值, 单位元
total_refund number 累计退款, 单位元
currency string 币种, 如USD
tag string 标签
purpose list<string> 使用场景, TIKTOK, FACEBOOK, GOOGLE
status string 状态, NOPENDING未处理, PENDING待处理, ACTIVE已激活,
INACTIVE已失效, BLOCKED已锁定, LOST已丢失, STOLEN已被盗,
CLOSED已关闭, FAILED创建失败, EXPIRED已过期
budget_id string 预算ID
limit_type string 额度类型, UNLIMITED无限制, CYCLE循环额度, ACCUMULATE累计额度
cycle_limit_type string 循环额度类型, DAILY每日, WEEKLY每周, MONTHLY每月
limit_amount string 额度金额, 单位元
subuser_id string 子帐号id, 当查询子帐号额度卡列表时,此值存在
subuser_name string 子帐号名称, 当查询子帐号额度卡列表时,此值存在

获取额度卡公共信息

URL: GET /credit/info

Query:

输出:

字段 类型 说明
max_card_count number 最大开卡数
remaining_card_count number 剩余可开卡数
total_amount number 预算内总金额, 单位元
budget_count number 总预算数

申请总开卡数

URL: POST /credit/apply_max_count

输入:

字段 类型 必填 说明
apply_count number 申请数量
purpose list<string> 使用场景, TIKTOK, FACEBOOK, GOOGLE
reason string 申请原因

输出:


获取预算列表

URL: GET /credit/budget/list?page=1

Query:

字段 必填 说明
page 页码,从1开始
size 每页大小
search 搜索关键词
status 状态

输出: list<CreditBudget>

CreditBudget

字段 类型 说明
id string id
title string 名称
amount number 预算金额, 单位元
status string 状态, NORMAL正常, SUSPENDED已停用
total_consume number 累计消费, 单位元
total_consume_count number 累计消费笔数
card_count number 关联卡数量
created_at string 创建时间
updated_at string 更新时间
subuser_id string 子帐号id, 当查询子帐号额度卡预算列表时,此值存在
subuser_name string 子帐号名称, 当查询子帐号额度卡预算列表时,此值存在

获取预算详情

URL: GET /credit/budget/{budget_id}/detail

Query:

输出: CreditBudget

CreditBudget

字段 类型 说明
id string id
title string 名称
amount number 预算金额, 单位元
status string 状态, NORMAL正常, SUSPENDED已停用
created_at string 创建时间
updated_at string 更新时间
subuser_id string 子帐号id, 当查询子帐号额度卡预算列表时,此值存在
subuser_name string 子帐号名称, 当查询子帐号额度卡预算列表时,此值存在
total_consume number 累计消费, 单位元
total_consume_count number 累计消费笔数
card_count number 关联卡数量

新增预算

URL: POST /credit/budget/create

输入:

字段 类型 必填 说明
title string 名称
amount number 预算金额
所有金额都是整数且精确到分,如1850,表示18.5元

输出:

字段 类型 说明
id string 预算id

更新预算

URL: POST /credit/budget/{budget_id}/update

输入:

字段 类型 必填 说明
title string 名称

输出:


预算充值

注意: 当前仅支持从钱包充值

URL: POST /credit/budget/{budget_id}/recharge

输入:

字段 类型 必填 说明
amount number 充值金额
所有金额都是整数且精确到分,如1850,表示18.5元

输出:

字段 类型 说明
budget_amount number 预算新金额, 单位元
wallet_balance number 钱包新余额, 单位元

预算转出

注意: 当前仅支持转出到钱包

URL: POST /credit/budget/{budget_id}/transfer_out

输入:

字段 类型 必填 说明
amount number 转出金额
所有金额都是整数且精确到分,如1850,表示18.5元

输出:

字段 类型 说明
budget_amount number 预算新金额, 单位元
wallet_balance number 钱包新余额, 单位元

修改预算状态

URL: POST /credit/budget/{budget_id}/change_status

输入:

字段 类型 必填 说明
status string 状态, NORMAL正常, SUSPENDED已停用

输出:


删除预算

URL: POST /credit/budget/{budget_id}/delete

输入:

输出:


获取额度卡列表

URL: GET /credit/card/list?page=1

Query:

字段 必填 说明
page 页码,从1开始
size 每页大小
search 搜索关键词
status 状态
budget_id 额度预算ID

输出: list<CreditCard>


新增额度卡

URL: POST /credit/card/create

输入:

字段 类型 必填 说明
segment_id string 卡段ID
cardholder_id string 持卡人ID
currency string 币种
tag string 标签
purpose list<string> 使用场景, TIKTOK, FACEBOOK, GOOGLE
budget_id string 预算ID

输出:

字段 类型 说明
id string 卡id

修改额度

URL: POST /credit/card/{card_id}/change_limit

输入:

字段 类型 必填 说明
limit_type string 额度类型, UNLIMITED无限制, CYCLE循环额度, ACCUMULATE累计额度
cycle_limit_type string 循环额度类型, DAILY每日, WEEKLY每周, MONTHLY每月
类型是CYCLE时必填
limit_amount string 额度金额
所有金额都是整数且精确到分,如1850,表示18.5元
类型不是UNLIMITED时必填

输出:


批量修改额度卡标签

URL: POST /credit/card/update_tag

输入:

字段 类型 必填 说明
ids string 卡ID列表

输出:


冻结卡片

URL: POST /credit/card/{card_id}/freeze

输入:

输出:


解冻卡片

URL: POST /credit/card/{card_id}/unfreeze

输入:

输出:


删除卡片

URL: POST /credit/card/{card_id}/delete

输入:

输出: