inquiryStatementList
POST
: /amsin/api/v1/business/account/inquiryStatementList
集成商可调用此接口获取财务账单。
报文结构
万里汇接口报文结构包括:请求头、请求体、响应体。
请求头
字段名 | 是否必传 | 范例 | 说明 |
Client-Id | 是 |
| 关于这些参数的解释说明,详见:请求头。 |
Signature | 是 |
| |
Content-Type | 是 |
| |
Request-Time | 是 |
| |
Connected-CustomerId | 否(有条件要求) |
| 当平台客户操作商户账户时需要传递 |
Access-Token | 有条件要求 |
| 当用 OAUTH 授权时时需要传递 |
请求参数
字段名 | 数据类型 | 是否必填 | 描述 |
startTime | Datetime 对象 | 是 | 账单开始时间。 更多信息:
|
endTime | Datetime 对象 | 是 | 账单结束时间 更多信息:
|
transactionTypeList | 列表<字符串> | 否 | 本次调用查询的交易类型 更多信息:
字段取值包括:
完整取值范围详见: transactionType。 |
currencyList | 列表<字符串> | 否 | 集成商查询的币种列表,为 ISO-4217 标准规定的三位字母货币代码。 现阶段支持的币种有:
更多信息:
|
balanceTypes | 列表<字符串> | 否(有条件必填) | 该字段表示客户拥有的不同余额类型。 说明:客户在不同业务场景下,可使用不同的余额类型对资金余额做分隔管理,作用是为了风险管控。 可取值:此字段的可取值随着客户类型不同而有所差异:
|
pageSize | 整数 | 是 | 每页包含的条目数。该字段取值固定为10。 |
pageNumber | 整数 | 是 | 当前页码。该字段取值最大为50。 格式:1、2、3…… |
响应参数
响应信息处理
集成商调用接口后,万里汇返回集成商API调用结果。result.resultStatus
字段取值范围为:
Result status | 描述 |
S | 接口调用成功 |
F | 接口调用失败,具体失败原因见 |
U | 调用结果未知,需重试API请求。若问题依旧,联系万里汇技术支持。 |
结果码
result.resultCode
系统结果码
resultCode | resultStatus | resultMessage | 处理建议 |
SUCCESS | S | Success | |
PARAM_ILLEGAL | F | Illegal parameters exist. For example, a non-numeric input, or an invalid date. | 参考API文档页面,确认请求头和传参是否正确 |
PROCESS_FAIL | F | A general business failure occurred. Do not retry. | 需要人工介入,联系万里汇技术支持以解决此问题 |
UNKNOWN_EXCEPTION | U | API failed due to unknown reason. | 服务器错误,若稍后重试问题依旧,联系万里汇技术支持以解决问题 |
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请求方法为 |
业务结果码
resultCode | resultStatus | resultMessage | 处理建议 |
USER_NOT_EXIST | F | The user does not exist. | 使用正确的用户信息重试 |
SYSTEM_ERROR | F | System error. | 请勿重试,联系万里汇技术支持了解详情 |
SERVICE_NOT_ALLOWED | F | Service not allowed | 使用正确的信息重试,若问题依旧,联系万里汇技术支持以解决问题 |
CURRENCY_NOT_SUPPORT | F | The currency is not supported. | 暂不支持该币种 |
CONTRACT_CHECK_FAIL | F | The contract check has failed. | 检查合约状态后重试 |
AUTHORIZATION_NOT_EXIST | F | The authorization does not exist. | 当前授权关系不存在,请联系万里汇技术支持检查授权关系 |
ACCESS_TOKEN_EXPIRED | F | The access token expired. | 刷新token接口以重新获取访问令牌(access token),或联系万里汇技术支持以解决问题 |
示例代码
请求
请求体范例
{
"startTime": "2022-01-01T00:00:00Z",
"endTime": "2022-01-01T00:00:00Z",
"pageSize" : 10,
"pageNumber": 1,
"transactionTypeList":["TRANSFER_REFUND", "WITHDRAWAL_REFUND"],
"currencyList": ["HKD", "USD", "EUR"]
}
请求代码范例
var jsonStr="{\"startTime\":\"2022-01-01T00:00:00Z\",\"endTime\":\"2022-01-01T00:00:00Z\",\"pageSize\":20,\"pageNumber\":1,\"transactionTypeList\":[\"TRANSFER_REFUND\",\"WITHDRAWAL_REFUND\"],\"currencyList\":[\"HKD\",\"USD\",\"EUR\"]}";
var client = new RestClient("http://{domain_name}.com/amsin/api/v1/business/account/inquiryStatementList");
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...*****");
request.AddParameter("application/json; charset=utf-8", jsonStr, ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
url = "http://{domain_name}.com/amsin/api/v1/business/account/inquiryStatementList"
headers = {
"client-id": "*****",
"request-time": "2022-05-17T11:19:20+08:00",
"Content-Type": "application/json",
"signature": "algorithm=RSA256,keyVersion=1,signature=RckSOIrxy...*****"
}
datas ={"startTime":"2022-01-01T00:00:00Z","endTime":"2022-01-01T00:00:00Z","pageSize":20,"pageNumber":1,"transactionTypeList":["TRANSFER_REFUND","WITHDRAWAL_REFUND"],"currencyList":["HKD","USD","EUR"]}
res = requests.post(url=url, data=json.dumps(datas), headers=headers)
CloseableHttpClient client = HttpClientBuilder.create().build();
HttpPost httpPost = new HttpPost("http://{domain_name}.com/amsin/api/v1/business/account/inquiryStatementList");
httpPost.addHeader("client-id", "*****");
httpPost.addHeader("request-time", "2022-05-17T11:19:20+08:00");
httpPost.addHeader("signature","algorithm=RSA256,keyVersion=1,signature=RckSOIrxy...*****" );
httpPost.addHeader("Content-Type","application/json");
StringEntity entity = new StringEntity("{\"startTime\":\"2022-01-01T00:00:00Z\",\"endTime\":\"2022-01-01T00:00:00Z\",\"pageSize\":20,\"pageNumber\":1,\"transactionTypeList\":[\"TRANSFER_REFUND\",\"WITHDRAWAL_REFUND\"],\"currencyList\":[\"HKD\",\"USD\",\"EUR\"]}");
httpPost.setEntity(entity);
CloseableHttpResponse response = client.execute(httpPost);
var xhr = new XMLHttpRequest;
xhr.open("POST","http://{domain_name}.com/amsin/api/v1/business/account/inquiryStatementList";,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...*****");
xhr.send"{\"startTime\":\"2022-01-01T00:00:00Z\",\"endTime\":\"2022-01-01T00:00:00Z\",\"pageSize\":20,\"pageNumber\":1,\"transactionTypeList\":[\"TRANSFER_REFUND\",\"WITHDRAWAL_REFUND\"],\"currencyList\":[\"HKD\",\"USD\",\"EUR\"]}";
响应
响应体范例
当 transactionType
取值为 COLLECTION
{
"currentPageNumber": 1,
"responseId": "****",
"result": {
"resultStatus": "S",
"resultCode": "SUCCESS",
"resultMessage": "success."
},
"statementList": [
{
"accountBalance": {
"currency": "GBP",
"value": 999983820016
},
"fundMoveDetail": {
"beneficiaryAccountNo": "****@****.***",
"beneficiaryAccountType": "WORLDFIRST",
"beneficiaryBankName": "****",
"payerAccountNo": "****",
"payerAccountType": "BANK_CARD",
"payerName": "****",
"receiveAccount": "****",
"remarks": "****"
},
"originalTransactionAmount": {
"currency": "GBP",
"value": 2999
},
"transactionAmount": {
"currency": "GBP",
"value": 2999
},
"transactionId": "****",
"transactionStatus": "SUCCESS",
"transactionTime": "2022-10-18T06:36:35Z",
"transactionType": "COLLECTION"
},
{
"accountBalance": {
"currency": "USD",
"value": 999999
},
"fundMoveDetail": {
"beneficiaryAccountNo": "****@****.***",
"beneficiaryAccountType": "WORLDFIRST",
"beneficiaryBankName": "****",
"payerAccountNo": "****",
"payerAccountType": "BANK_CARD",
"payerName": "",
"receiveAccount": "****",
"remarks": "****"
},
"originalTransactionAmount": {
"currency": "USD",
"value": 2999
},
"transactionAmount": {
"currency": "USD",
"value": 2999
},
"transactionId": "****",
"transactionStatus": "SUCCESS",
"transactionTime": "2022-10-18T06:22:03Z",
"transactionType": "COLLECTION"
}
],
"totalCount": 3219,
"totalPageNumber": 1610
}
当 transactionType
取值为 TRANSFER
{
"currentPageNumber": 1,
"responseId": "****",
"result": {
"resultStatus": "S",
"resultCode": "SUCCESS",
"resultMessage": "success."
},
"statementList": [
{
"accountBalance": {
"currency": "NZD",
"value": 6244010960
},
"balanceType": "NORMAL_BALANCE",
"extTransactionId": "*****",
"feeAmount": {
"currency": "NZD",
"value": 0
},
"foreignExchangeQuote": {
"quotePrice": "4.60040000",
"transferFromCurrency": "NZD",
"transferToCurrency": "CNY"
},
"fundMoveDetail": {
"beneficiaryAccountNo": "****@****.***",
"beneficiaryAccountType": "ALIPAY_CN",
"beneficiaryBankName": "****",
"payerAccountNo": "****",
"payerAccountType": "WORLDFIRST",
"payerName": "****",
"receiveAccount": "****",
"remarks": "****"
},
"netAmount": {
"currency": "NZD",
"value": 666
},
"originalTransactionAmount": {
"currency": "NZD",
"value": 666
},
"receiveAmount": {
"currency": "CNY",
"value": 3064
},
"transactionAmount": {
"currency": "NZD",
"value": -666
},
"transactionId": "****",
"transactionStatus": "SUCCESS",
"transactionTime": "2023-05-28T23:47:06Z",
"transactionType": "TRANSFER"
}
],
"totalCount": 3576,
"totalPageNumber": 3576
}
其他 transactionType
取值
{
"currentPageNumber": 1,
"responseId": "*****",
"result": {
"resultStatus": "S",
"resultCode": "SUCCESS",
"resultMessage": "success."
},
"statementList": [
{
"accountBalance": {
"currency": "HKD",
"value": 698450
},
"extTransactionId": "*****",
"feeAmount": {
"currency": "EUR",
"value": 0
},
"fundMoveDetail": {
"beneficiaryAccountNo": "*****",
"beneficiaryAccountType": "ALIPAY",
"beneficiaryBankCountry": "",
"beneficiaryName": "",
"payerAccountType": "ALIPAY",
"payerName": ""
},
"originalTransactionAmount": {
"currency": "HKD",
"value": 112226
},
"refundForeignExchangeQuote": {
"quotePrice": "1",
"transferFromCurrency": "HKD",
"transferToCurrency": "HKD"
},
"transactionAmount": {
"currency": "HKD",
"value": 112226
},
"transactionId": "*****",
"transactionStatus": "SUCCESS",
"transactionTime": "2022-01-01T00:00:00Z",
"transactionType": "TRANSFER_REFUND"
},
{
"accountBalance": {
"currency": "HKD",
"value": 586224
},
"extTransactionId": "*****",
"feeAmount": {
"currency": "EUR",
"value": 0
},
"fundMoveDetail": {
"beneficiaryAccountNo": "*****",
"beneficiaryAccountType": "ALIPAY",
"beneficiaryBankCountry": "",
"beneficiaryName": "",
"payerAccountType": "ALIPAY",
"payerName": ""
},
"originalTransactionAmount": {
"currency": "HKD",
"value": 112226
},
"refundForeignExchangeQuote": {
"quotePrice": "1",
"transferFromCurrency": "HKD",
"transferToCurrency": "HKD"
},
"transactionAmount": {
"currency": "HKD",
"value": 112226
},
"transactionId": "*****",
"transactionStatus": "SUCCESS",
"transactionTime": "2022-01-01T00:00:00Z",
"transactionType": "TRANSFER_REFUND"
},
{
"accountBalance": {
"currency": "HKD",
"value": 473998
},
"extTransactionId": "*****",
"feeAmount": {
"currency": "EUR",
"value": 0
},
"fundMoveDetail": {
"beneficiaryAccountNo": "*****",
"beneficiaryAccountType": "ALIPAY",
"beneficiaryBankCountry": "",
"beneficiaryName": "",
"payerAccountType": "ALIPAY",
"payerName": ""
},
"originalTransactionAmount": {
"currency": "HKD",
"value": 120859
},
"refundForeignExchangeQuote": {
"quotePrice": "1",
"transferFromCurrency": "HKD",
"transferToCurrency": "HKD"
},
"transactionAmount": {
"currency": "HKD",
"value": 120859
},
"transactionId": "*****",
"transactionStatus": "SUCCESS",
"transactionTime": "2022-01-01T00:00:00Z",
"transactionType": "TRANSFER_REFUND"
},
{
"accountBalance": {
"currency": "HKD",
"value": 353139
},
"extTransactionId": "*****",
"feeAmount": {
"currency": "EUR",
"value": 0
},
"fundMoveDetail": {
"beneficiaryAccountNo": "*****",
"beneficiaryAccountType": "ALIPAY",
"beneficiaryBankCountry": "",
"beneficiaryName": "",
"payerAccountType": "ALIPAY",
"payerName": ""
},
"originalTransactionAmount": {
"currency": "HKD",
"value": 103594
},
"refundForeignExchangeQuote": {
"quotePrice": "1",
"transferFromCurrency": "HKD",
"transferToCurrency": "HKD"
},
"transactionAmount": {
"currency": "HKD",
"value": 103594
},
"transactionId": "*****",
"transactionStatus": "SUCCESS",
"transactionTime": "2022-01-01T00:00:00Z",
"transactionType": "TRANSFER_REFUND"
},
{
"accountBalance": {
"currency": "USD",
"value": 289633970
},
"extTransactionId": "*****",
"feeAmount": {
"currency": "EUR",
"value": 0
},
"fundMoveDetail": {
"beneficiaryAccountNo": "*****",
"beneficiaryAccountType": "ALIPAY",
"beneficiaryBankCountry": "",
"beneficiaryName": "",
"payerAccountType": "ALIPAY",
"payerName": ""
},
"originalTransactionAmount": {
"currency": "USD",
"value": 133056
},
"refundForeignExchangeQuote": {
"quotePrice": "1",
"transferFromCurrency": "USD",
"transferToCurrency": "USD"
},
"transactionAmount": {
"currency": "USD",
"value": 133056
},
"transactionId": "*****",
"transactionStatus": "SUCCESS",
"transactionTime": "2022-01-01T00:00:00Z",
"transactionType": "TRANSFER_REFUND"
},
{
"accountBalance": {
"currency": "HKD",
"value": 249545
},
"extTransactionId": "*****",
"feeAmount": {
"currency": "USD",
"value": 0
},
"fundMoveDetail": {
"beneficiaryAccountNo": "*****",
"beneficiaryAccountType": "ALIPAY",
"beneficiaryBankCountry": "",
"beneficiaryName": "",
"payerAccountType": "ALIPAY",
"payerName": ""
},
"originalTransactionAmount": {
"currency": "HKD",
"value": 131400
},
"refundForeignExchangeQuote": {
"quotePrice": "1",
"transferFromCurrency": "HKD",
"transferToCurrency": "HKD"
},
"transactionAmount": {
"currency": "HKD",
"value": 131400
},
"transactionId": "*****",
"transactionStatus": "SUCCESS",
"transactionTime": "2022-01-01T00:00:00Z",
"transactionType": "TRANSFER_REFUND"
},
{
"accountBalance": {
"currency": "HKD",
"value": 118145
},
"extTransactionId": "*****",
"feeAmount": {
"currency": "CNH",
"value": 0
},
"fundMoveDetail": {
"beneficiaryAccountNo": "*****",
"beneficiaryAccountType": "ALIPAY",
"beneficiaryBankCountry": "",
"beneficiaryName": "",
"payerAccountType": "ALIPAY",
"payerName": ""
},
"originalTransactionAmount": {
"currency": "HKD",
"value": 1102
},
"refundForeignExchangeQuote": {
"quotePrice": "1",
"transferFromCurrency": "HKD",
"transferToCurrency": "HKD"
},
"transactionAmount": {
"currency": "HKD",
"value": 1102
},
"transactionId": "*****",
"transactionStatus": "SUCCESS",
"transactionTime": "2022-01-01T00:00:00Z",
"transactionType": "TRANSFER_REFUND"
},
{
"accountBalance": {
"currency": "HKD",
"value": 117043
},
"extTransactionId": "*****",
"feeAmount": {
"currency": "CNH",
"value": 0
},
"fundMoveDetail": {
"beneficiaryAccountNo": "*****",
"beneficiaryAccountType": "ALIPAY",
"beneficiaryBankCountry": "",
"beneficiaryName": "",
"payerAccountType": "ALIPAY",
"payerName": ""
},
"originalTransactionAmount": {
"currency": "HKD",
"value": 1102
},
"refundForeignExchangeQuote": {
"quotePrice": "1",
"transferFromCurrency": "HKD",
"transferToCurrency": "HKD"
},
"transactionAmount": {
"currency": "HKD",
"value": 1102
},
"transactionId": "*****",
"transactionStatus": "SUCCESS",
"transactionTime": "2022-01-01T00:00:00Z",
"transactionType": "TRANSFER_REFUND"
},
{
"accountBalance": {
"currency": "USD",
"value": 289517914
},
"extTransactionId": "*****",
"feeAmount": {
"currency": "EUR",
"value": 0
},
"fundMoveDetail": {
"beneficiaryAccountNo": "*****",
"beneficiaryAccountType": "ALIPAY",
"beneficiaryBankCountry": "",
"beneficiaryName": "",
"payerAccountType": "ALIPAY",
"payerName": ""
},
"originalTransactionAmount": {
"currency": "USD",
"value": 121968
},
"refundForeignExchangeQuote": {
"quotePrice": "1",
"transferFromCurrency": "USD",
"transferToCurrency": "USD"
},
"transactionAmount": {
"currency": "USD",
"value": 121968
},
"transactionId": "*****",
"transactionStatus": "SUCCESS",
"transactionTime": "2022-01-01T00:00:00Z",
"transactionType": "TRANSFER_REFUND"
},
{
"accountBalance": {
"currency": "HKD",
"value": 115941
},
"extTransactionId": "*****",
"feeAmount": {
"currency": "USD",
"value": 0
},
"fundMoveDetail": {
"beneficiaryAccountNo": "*****",
"beneficiaryAccountType": "ALIPAY",
"beneficiaryBankCountry": "",
"beneficiaryName": "",
"payerAccountType": "ALIPAY",
"payerName": ""
},
"originalTransactionAmount": {
"currency": "HKD",
"value": 115941
},
"refundForeignExchangeQuote": {
"quotePrice": "1",
"transferFromCurrency": "HKD",
"transferToCurrency": "HKD"
},
"transactionAmount": {
"currency": "HKD",
"value": 115941
},
"transactionId": "*****",
"transactionStatus": "SUCCESS",
"transactionTime": "2022-01-01T00:00:00Z",
"transactionType": "TRANSFER_REFUND"
},
{
"accountBalance": {
"currency": "EUR",
"value": 330033371
},
"extTransactionId": "*****",
"feeAmount": {
"currency": "EUR",
"value": 2706
},
"fundMoveDetail": {
"beneficiaryAccountNo": "*****",
"beneficiaryAccountType": "BANK_CARD",
"beneficiaryBankCountry": "HK",
"beneficiaryName": "x***y",
"payerAccountNo": "*****",
"payerAccountType": "ALIPAY",
"payerName": "",
"remarks": "Memo_for_the_transfer"
},
"originalTransactionAmount": {
"currency": "EUR",
"value": 125000
},
"refundForeignExchangeQuote": {
"quotePrice": "1",
"transferFromCurrency": "EUR",
"transferToCurrency": "EUR"
},
"transactionAmount": {
"currency": "EUR",
"value": 122294
},
"transactionId": "*****",
"transactionStatus": "SUCCESS",
"transactionTime": "2022-01-01T00:00:00Z",
"transactionType": "TRANSFER_REFUND"
},
{
"accountBalance": {
"currency": "USD",
"value": 289748446
},
"extTransactionId": "*****",
"feeAmount": {
"currency": "USD",
"value": 3000
},
"fundMoveDetail": {
"beneficiaryAccountNo": "******",
"beneficiaryAccountType": "BANK_CARD",
"beneficiaryBankCountry": "HK",
"beneficiaryName": "x***y",
"payerAccountNo": "*****",
"payerAccountType": "ALIPAY",
"payerName": "",
"remarks": "Memo_for_the_transfer"
},
"originalTransactionAmount": {
"currency": "USD",
"value": 33000
},
"refundForeignExchangeQuote": {
"quotePrice": "1",
"transferFromCurrency": "USD",
"transferToCurrency": "USD"
},
"transactionAmount": {
"currency": "USD",
"value": 30000
},
"transactionId": "*****",
"transactionStatus": "SUCCESS",
"transactionTime": "2022-01-01T00:00:00Z",
"transactionType": "TRANSFER_REFUND"
},
{
"accountBalance": {
"currency": "USD",
"value": 289751446
},
"extTransactionId": "*****",
"feeAmount": {
"currency": "USD",
"value": 3000
},
"fundMoveDetail": {
"beneficiaryAccountNo": "*****",
"beneficiaryAccountType": "BANK_CARD",
"beneficiaryBankCountry": "HK",
"beneficiaryName": "x***y",
"payerAccountNo": "*****",
"payerAccountType": "ALIPAY",
"payerName": "",
"remarks": "Memo_for_the_transfer"
},
"originalTransactionAmount": {
"currency": "USD",
"value": 33000
},
"refundForeignExchangeQuote": {
"quotePrice": "1",
"transferFromCurrency": "USD",
"transferToCurrency": "USD"
},
"transactionAmount": {
"currency": "USD",
"value": 30000
},
"transactionId": "*****",
"transactionStatus": "SUCCESS",
"transactionTime": "2022-01-01T00:00:00Z",
"transactionType": "TRANSFER_REFUND"
},
{
"accountBalance": {
"currency": "USD",
"value": 289751446
},
"extTransactionId": "*****",
"feeAmount": {
"currency": "USD",
"value": 3000
},
"fundMoveDetail": {
"beneficiaryAccountNo": "*****",
"beneficiaryAccountType": "BANK_CARD",
"beneficiaryBankCountry": "HK",
"beneficiaryName": "ABC_name",
"payerAccountNo": "*****",
"payerAccountType": "ALIPAY",
"payerName": "",
"remarks": "Memo_for_the_transfer"
},
"originalTransactionAmount": {
"currency": "USD",
"value": 23000
},
"refundForeignExchangeQuote": {
"quotePrice": "1",
"transferFromCurrency": "USD",
"transferToCurrency": "USD"
},
"transactionAmount": {
"currency": "USD",
"value": 20000
},
"transactionId": "*****",
"transactionStatus": "SUCCESS",
"transactionTime": "2022-01-01T00:00:00Z",
"transactionType": "TRANSFER_REFUND"
}
],
"totalCount": 14,
"totalPageNumber": 1
}