IBAN列表接口

说明:获取当前 API 账户下的 IBAN 列表数据

生产环境 API URL:#/api/iban/list 测试环境 API URL:https://ibantest.yabandpay.com/api/iban/list

Method:POST

Header:

Authorization: Bearer {api_account_token}
Content-Type: application/json

0. API 签名说明(HMAC-SHA256)

IBAN 相关接口的签名规则和其他接口一致,均为 HMAC-SHA256,调用端按如下步骤计算 sign:

  1. 从原始请求 Body 中移除 sign 字段(role 也不参与签名,若有的话)。
  2. 将 data 对象内的所有字段展开到顶层,与 uid / timestamp / nonce 合并成一个平铺的键值集合。
  3. 对平铺后的集合按 key 做字典序升序排序(同 ksort())。
  4. 按 k1=v1&k2=v2&k3=v3 的形式拼接成待签名字符串。
  5. 使用当前账户的 secret_key 作为密钥,用 HMAC-SHA256 计算签名,结果转小写,即为请求中的 sign。
签名公式:
sign = hash_hmac('sha256', implode('&', ksort(merge(data, {uid, timestamp, nonce})) ), secret_key)

签名示例(PHP 版本):

$secretKey = '你的账户 secret_key';
$body = [
    'uid'       => '900001',
    'timestamp' => 1750000000,
    'nonce'     => 'Qe3CkH2xP8',
    'data'      => [
        'request_id'    => 'req_202411180049',
        'page'          => 1,
        'limit'         => 20,
        'keyword'       => 'YABN',
        'customer_type' => 'legal_entity',
        'access'        => 2,
        'status'        => 1,
    ],
];
$sign = getSignByYabandPayV3($body, $secretKey);
$body['sign'] = $sign;

按上面步骤计算出的 sign 应与下方提交示例中一致:A1AC665F9B40F7C51212BCE080F5B987。

注意:

  • timestamp 建议取服务器 UTC 秒级时间戳,和 IBAN 服务端时间差距过大可能会被拒绝。
  • nonce 建议每次请求随机生成 10~32 位字符串,用于防重放。
  • Authorization Bearer Token 与 sign 为两层校验,两者都必须通过。
  • 排序、拼接大小写敏感,字段顺序或空格差异会导致 -1001 签名错误。

1. 请求参数(顶层)

字段 类型 描述 是否必填
uid string API 账户 UID(对应 iban_api_account.uid) 必填
timestamp integer 请求时间戳(秒),需在签名有效期内 必填
nonce string 随机字符串,防重放(建议 10~32 位) 必填
sign string 签名(见签名算法说明) 必填
data object 查询条件集 必填

2. data 对象(支持写在顶层或 data 内,两者都识别)

Parameter Type Description 是否必填
request_id string 请求方自定义请求号,响应中会原样回传,用于幂等/跟踪 非必填
page integer 页码,从 1 开始 必填
limit integer 每页条数(别名 page_size,任选其一传),最大 500 必填
start_time integer/string 创建开始时间,支持时间戳或日期字符串(如 1784851200 或 2026-08-01 00:00:00) 非必填
end_time integer/string 创建结束时间,支持时间戳或日期字符串 非必填
keyword string 关键字,支持模糊搜索:customer_id、iban、holder_name、alternative_name 非必填
customer_id string 精确搜索客户ID 非必填
iban string 精确搜索 IBAN 非必填
customer_type string 客户类型:legal_entity、individual 非必填
access integer 访问权限:0 none、1 full、2 inbound、3 outbound 非必填
status integer 账户状态:0 inactive、1 active 非必填

权限隔离:查询结果只会返回当前 Authorization Bearer Token 对应 API 账户绑定过的 IBAN(api_account_id = 当前账户ID),无法跨账户查询。

3. 提交示例

{
    "uid": "900001",
    "timestamp": 1750000000,
    "nonce": "Qe3CkH2xP8",
    "sign": "A1AC665F9B40F7C51212BCE080F5B987",
    "data": {
        "request_id": "req_202411180049",
        "page": 1,
        "limit": 20,
        "keyword": "YABN",
        "customer_type": "legal_entity",
        "access": 2,
        "status": 1
    }
}

4. 返回示例

成功

{
    "status": true,
    "code": 200,
    "message": "",
    "data": {
        "list": [
            {
                "id": 1,
                "customer_type": "legal_entity",
                "customer_id": "2012345678",
                "holder_name": "企业名字",
                "alternative_name": "First_name Last_name",
                "creditor_identifier": "NL00ZZZ123456780000",
                "bic": "YABNNL22",
                "iban": "NL09YABN0192150222",
                "currency": "EUR",
                "balance": "1000.00",
                "access": 2,
                "access_label": "inbound",
                "status": 1,
                "status_label": "active",
                "remark": "测试备注",
                "api_account_id": 1,
                "created_at": 1784851200,
                "updated_at": 1784851800
            }
        ],
        "total": 1,
        "page": 1,
        "limit": 20,
        "page_size": 20,
        "total_page": 1,
        "request_id": "req_202411180049"
    }
}

失败:缺少必填参数

{
    "status": false,
    "code": -3002,
    "message": "The given data was invalid.",
    "data": {}
}

失败:Authorization 无效 / 账户禁用

{
    "status": false,
    "code": -1010,
    "message": "api account error",
    "data": {}
}

results matching ""

    No results matching ""