Skip to content

Customer get balance

GiuFLim edited this page Dec 18, 2025 · 3 revisions

查询客户余额

通过API查询客户余额

  • URL:https://api2.nxcloud.com/api/customer/getBalance
  • Method:POST
  • Content-Type:application/json
  • 需要鉴权:

鉴权机制

鉴权规则请参考地址:API接口调用约定

请求参数

header参数:

参数名 类型 必选 示例值 说明
accessKey String fme2na3kdi3ki 用户身份标识
ts String 1655710885431 当前请求的时间戳(单位是毫秒),牛信服务端允许用户端请求最大时间误差为60秒
bizType String 3 业务类型,取固定值“3”
action String getBalance 业务操作,取固定值“getBalance”
sign String 6e9506557d1f289501d333ee2c365826 API入参参数签名,签名算法

响应参数

参数名 类型 说明
code Integer 结果编码
data Object 请求结果
message String 请求结果说明
  • data object参数:
参数名 类型 说明
currency String 客户币种
amount_cus String 客户币种余额
credit_cus String 客户币种信用额度

响应示例

成功示例

{
    "code": 0,
    "message": "Success",
    "data": {
        "currency": "CNY",
        "amount_cus": "111694.16",
        "credit_cus": "500.00"
    },
    "traceId": "ddef279c5462422ebda6047357fec249"
}

失败示例 鉴权失败

{
    "code": 1003,
    "message": "Authentication failed (invalid signature)"
}

响应码说明

code message 解决办法
0 Success
-1 Failure 请联系技术人员排除问题
1000~100X Authentication failed 详情查看API鉴权部分
1100 Customer does not exist / Status is unavailable 账号状态异常,联系业务人员处理账号问题
1102 Insufficient balance 账号余额不足,请联系业务人员充值
9000 Request parameter error 参数缺失,请检查必须的参数
9001 System business error 系统业务错误,请联系技术人员排除问题
9018 Get balance error 请联系技术人员排除问题
211 Request frequency limited to once every 3 seconds 超过频率限制1秒内最多3次请求

简介

短信

语音

云呼叫中心(NXLink)

云呼叫中心(AI自动外呼)

Flash Call

短链

邮件验证码

DID号码

通用

号码检测

WhatsApp

Viber

Zalo ZNS

Super Message API

隐私号(旧)

PNS

坐席(旧版)

AI Agent

Clone this wiki locally