inquiryBeneficiaryList

POST: /amsin/api/v1/business/account/inquiryBeneficiaryList

需要签名验签

创建收款人并绑定收款人账号后,集成商可调用此接口查询某万里汇账号绑定的所有收款人。

报文结构

万里汇接口报文结构包括:请求头、请求体。关于头信息,详见:

请求参数

字段名

数据类型

是否必填

描述

customerId

字符串

是(有条件必填)

由万里汇定义、用于唯一标识某万里汇账户。

更多信息:

  • customerIdaccessToken 不能同时为空
  • 字段最大长度:64

accessToken

字符串

是(有条件必填)

用于OAuth校验的访问令牌

更多信息:

  • customerIdaccessToken 不能同时为空
  • 字段最大长度:64

beneficiaryToken

字符串

为加密字符串,包含收款人银行账户相关信息。

更多信息:

  • 加密内容使用 Base64 进行编码,具体详见编码标准部分

beneficiaryNick

字符串

由用户定义的收款人昵称,可以帮助用户更方便地识别该收款人。

更多信息:

  • 字段最大长度:70

referenceBeneficiaryId

字符串

由集成商定义的收款人唯一标识ID

更多信息:

  • 字段最大长度:64

bankAccountNo

字符串

收款人当地银行账号

规则:

  • {"checkRules": "^[A-Z0-9]{0,34}$"}.

更多信息:

  • 字段最大长度:64

bankAccountIBAN

字符串

收款人账户的国际银行账户号码(IBAN码)

规则:

  • {"checkRules": "^[A-Z]{2,2}[0-9]{2,2}[a-zA-Z0-9]{1,30}$"}.

更多信息:

  • 字段最大长度:34

pageSize

整数

每页包含的条目数

更多信息:

  • 最大值:50

pageNumber

整数

页码

格式:1、2、3……

响应参数

字段名

数据类型

是否必填

描述

result

Result 对象

代表接口调用结果

responseId

字符串

由万里汇定义,用于唯一标识某次响应的ID。

更多信息:

  • 字段最大长度:32

beneficiaries

Beneficiary 对象

收款人相关信息

totalCount

整数

查询结果的总条目数

更多信息:

  • 最大长度:8

totalPageNumber

整数

查询结果的总页数

更多信息:

  • 最大长度:8

currentPageNumber

整数

当前页码

更多信息:

  • 最大长度:8

响应处理

集成商调用接口后,万里汇返回集成商API调用结果。result.resultStatus取值范围为:

Result status

描述

S

接口调用成功

F

接口调用失败,具体原因参见result.resultCode

U

调用结果未知,需重试API请求。

重试策略:

  • 重试次数上限:7次
  • 重试时间间隔:5分钟、10分钟、20分钟、40分钟、80分钟、160分钟、320分钟

若上述重试均未成功,联系万里汇技术支持。

结果码

result.resultCode

系统结果码

resultCode

resultStatus

resultMessage

处理建议

SUCCESS

S

Success

PROCESS_FAIL

F

A general business failure occurred. Do not retry.

需要人工介入,联系万里汇技术支持以解决此问题

PARAM_ILLEGAL

F

Illegal parameters exist. For example, a non-numeric input, or an invalid date.

参考API文档页面,确认请求头和传参是否正确

UNKNOWN_EXCEPTION

U

The API call is failed, which is caused by unknown reasons.

服务器错误,若稍后重试问题依旧,联系万里汇技术支持以解决问题

REQUEST_TRAFFIC_EXCEED_LIMIT

U

The request traffic exceeds the limit.

重试,若问题依旧,联系万里汇技术支持

OAUTH_FAIL

F

OAuth process failed.

联系万里汇技术支持了解详情

INVALID_API

F

The called API is invalid or not active.

确认是否调用正确的API

INVALID_CLIENT

F

The client is invalid.

Client ID不存在或无效

INVALID_SIGNATURE

F

The signature is invalid.

确认请求正确加签,具体参见:

METHOD_NOT_SUPPORTED

F

The server does not implement the requested HTTP method.

确认HTTP请求方法为POST

业务结果码

resultCode

resultStatus

resultMessage

处理建议

UN_SUPPORT_BUSINESS

F

Unsupported business.

包含无效参数(如货币代码错误),使用正确的参数重试

SYSTEM_ERROR

F

System error.

请勿重试,联系万里汇技术支持了解详情

USER_NOT_EXIST 

F

The user does not exist.

使用正确的用户信息重试

示例代码

使用 beneficiaryNick 查询范例

请求体范例

copy
{
    "beneficiaryNick": "ABC_Nickname",
    "beneficiaryToken":"*****",
    "customerId":"*****",
    "bankAccountIBAN":"",
    "bankAccountNo":"*****",
    "pageNumber":"1",
    "pageSize":"10"
}

请求代码范例

copy
var jsonStr="{\"beneficiaryNick\":\"ABC_Nickname\",\"beneficiaryToken\":\"*****",\"customerId\":\"*****\"}";
var client = new RestClient("http://{domain_name}.com/amsin/api/v1/business/account/inquiryBeneficiary");
var request = new RestRequest(Method.POST);
request.AddHeader("client-id","*****");
request.AddHeader("request-time","2022-05-17T11:19:20+08:00");
request.AddHeader("Content-Type","application/json");
request.AddHeader("signature","algorithm=RSA256,keyVersion=1,signature=RckSOIrxy%2FKqC%2FZQOO0t74U9U4TFVYKmW%2FZflFRut7W1hipos3NLBGdpzbulcc5Q7XwZP1t3qgTZMFrC%2FlzOQCOsBhUgelvEAuACu49PEGiAus8sU%2FFJa1HOIUmst3oWjLT%2BDqY083mR7jVwc5O2JYP08wNCLu55PFZtXHBUfwEAYoZInhgRoLtQTr%2F7Bphd7L9cS3xD3tluxbgkcaFr7NQVrfWJuQKp%2BFrabo6xZr%2FRHZRd%2FijALuUYYjXH92n4VFwSXSO%2B%2BUBVPoGyWWz1q3QJ2tHNVU7wpc3wtCwwB76pNfGTbJit%2BdylGU8O5UkW3TwSkNnpzepRABM8bBQpgQ%*****");
request.AddParameter("application/json; charset=utf-8", jsonStr, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
copy
url = "http://{domain_name}.com/amsin/api/v1/business/account/inquiryBeneficiary"
headers = {
    "client-id": "*****",
    "request-time": "2022-05-17T11:19:20+08:00",
    "Content-Type": "application/json",
    "signature": "algorithm=RSA256,keyVersion=1,signature=RckSOIrxy%2FKqC%2FZQOO0t74U9U4TFVYKmW%2FZflFRut7W1hipos3NLBGdpzbulcc5Q7XwZP1t3qgTZMFrC%2FlzOQCOsBhUgelvEAuACu49PEGiAus8sU%2FFJa1HOIUmst3oWjLT%2BDqY083mR7jVwc5O2JYP08wNCLu55PFZtXHBUfwEAYoZInhgRoLtQTr%2F7Bphd7L9cS3xD3tluxbgkcaFr7NQVrfWJuQKp%2BFrabo6xZr%2FRHZRd%2FijALuUYYjXH92n4VFwSXSO%2B%2BUBVPoGyWWz1q3QJ2tHNVU7wpc3wtCwwB76pNfGTbJit%2BdylGU8O5UkW3TwSkNnpzepRABM8bBQpgQ%*****"
}
datas ={"beneficiaryNick":"ABC_Nickname","beneficiaryToken":"*****","customerId":"*****"}

res = requests.post(url=url, data=json.dumps(datas), headers=headers)
copy
CloseableHttpClient client = HttpClientBuilder.create().build();
HttpPost httpPost = new HttpPost("http://{domain_name}.com/amsin/api/v1/business/account/inquiryBeneficiary");
httpPost.addHeader("client-id", "*****");
httpPost.addHeader("request-time", "2022-05-17T11:19:20+08:00");
httpPost.addHeader("signature","algorithm=RSA256,keyVersion=1,signature=RckSOIrxy%2FKqC%2FZQOO0t74U9U4TFVYKmW%2FZflFRut7W1hipos3NLBGdpzbulcc5Q7XwZP1t3qgTZMFrC%2FlzOQCOsBhUgelvEAuACu49PEGiAus8sU%2FFJa1HOIUmst3oWjLT%2BDqY083mR7jVwc5O2JYP08wNCLu55PFZtXHBUfwEAYoZInhgRoLtQTr%2F7Bphd7L9cS3xD3tluxbgkcaFr7NQVrfWJuQKp%2BFrabo6xZr%2FRHZRd%2FijALuUYYjXH92n4VFwSXSO%2B%2BUBVPoGyWWz1q3QJ2tHNVU7wpc3wtCwwB76pNfGTbJit%2BdylGU8O5UkW3TwSkNnpzepRABM8bBQpgQ%*****" );
httpPost.addHeader("Content-Type","application/json");
StringEntity entity = new StringEntity("{\"beneficiaryNick\":\"ABC_Nickname\",\"beneficiaryToken\":\"*****\",\"customerId\":\"*****\"}");
httpPost.setEntity(entity);
CloseableHttpResponse response = client.execute(httpPost);
copy
var jsonStr="{\"beneficiaryNick\":\"ABC_Nickname\",\"beneficiaryToken\":\"*****\",\"customerId\":\"*****\"}";
var client = "http://{domain_name}.com/amsin/api/v1/business/account/inquiryBeneficiary";
var xhr = new XMLHttpRequest;
xhr.open("POST",client,true);
xhr.setRequestHeader("client-id","*****");
xhr.setRequestHeader("request-time","2022-05-17T11:19:20+08:00");
xhr.setRequestHeader("Content-Type","application/json");
xhr.setRequestHeader("signature","algorithm=RSA256,keyVersion=1,signature=RckSOIrxy%2FKqC%2FZQOO0t74U9U4TFVYKmW%2FZflFRut7W1hipos3NLBGdpzbulcc5Q7XwZP1t3qgTZMFrC%2FlzOQCOsBhUgelvEAuACu49PEGiAus8sU%2FFJa1HOIUmst3oWjLT%2BDqY083mR7jVwc5O2JYP08wNCLu55PFZtXHBUfwEAYoZInhgRoLtQTr%2F7Bphd7L9cS3xD3tluxbgkcaFr7NQVrfWJuQKp%2BFrabo6xZr%2FRHZRd%2FijALuUYYjXH92n4VFwSXSO%2B%2BUBVPoGyWWz1q3QJ2tHNVU7wpc3wtCwwB76pNfGTbJit%2BdylGU8O5UkW3TwSkNnpzepRABM8bBQpgQ%*****");
xhr.send(jsonStr); 

响应体范例

copy
{
    "beneficiaries": [
        {
            "beneficiaryBankAccount": {
                "bankAccountIBAN": "GB22GBGB123456123*****",
                "bankAccountName": "shen***",
                "bankBIC": "CHASGB*****"
            },
            "beneficiaryNick": "NickABC",
            "beneficiaryToken": "ALIPAYLfIqcPI58*****",
            "beneficiaryType": "THIRD_PARTY_COMPANY_BANK_ACCOUNT",
            "countryCode": "GB",
            "currency": "USD",
            "status": "SUCCESS"
        }
    ],
    "currentPageNumber": 1,
    "responseId": "*****",
    "result": {
        "resultStatus": "S",
        "resultCode": "SUCCESS",
        "resultMessage": "success."
    },
    "totalCount": 1,
    "totalPageNumber": 1
}

使用 referenceBeneficiaryId 查询范例

请求体范例

copy
{
    "referenceBeneficiaryId":"2022*****",
    "customerId":"*****",
    "pageNumber":"1",
    "pageSize":"50"
}

响应体范例

copy
{
    "beneficiaries": [
        {
            "beneficiaryBankAccount": {
                "bankAccountIBAN": "DE315001051765761*****",
                "bankAccountName": "shen***",
                "bankBIC": "CHASDE*****",
                "beneficiaryPhone": ""
            },
            "beneficiaryNick": "NickABC",
            "beneficiaryToken": "ALIPAYjIIt8*****",
            "beneficiaryType": "THIRD_PARTY_COMPANY_BANK_ACCOUNT",
            "countryCode": "DE",
            "currency": "EUR",
            "referenceBeneficiaryId": "2022*****",
            "status": "SUCCESS"
        }
    ],
    "currentPageNumber": 1,
    "responseId": "*****",
    "result": {
        "resultStatus": "S",
        "resultCode": "SUCCESS",
        "resultMessage": "success."
    },
    "totalCount": 1,
    "totalPageNumber": 1
}

@2024 WorldFirst