consultTransfer
POST
: /amsin/api/v1/business/fund/consultTransfer
集成商可调用本接口按所需场景查询转账相关信息。
接口结构
万里汇接口报文结构包括:请求头,请求体。
请求头
字段名 | 是否必传 | 范例 | 说明 |
Client-Id | 是 |
| 关于这些参数的解释说明,详见:请求头 |
Signature | 是 |
| |
Content-Type | 是 |
| |
Request-Time | 是 |
| |
Connected-CustomerId | 否(有条件) |
| 当平台客户操作商户账户时需要传递 |
请求参数
字段名 | 数据类型 | 是否必传 | 描述 |
transferFromDetail | 是 | 支付方需要支付的转账金额 | |
transferToDetail | 是 | 转账细节,包括收款方可收到的金额等 |
响应参数
字段名 | 数据类型 | 是否必传 | 描述 |
result | Result 对象 | 是 | 代表API调用结果 |
说明:以下字段,只有当 | |||
transferFromDetail | 否 | 支付方需要支付的转账金额 | |
transferToDetail | 否 | 转账细节,包括收款方可收到的金额等 |
响应处理
集成商调用接口后,万里汇返回集成商API调用结果。result.resultStatus
字段取值范围为:
result.resultStatus | 描述 |
S | API请求成功。 |
F | API请求失败。 失败原因参见结果码(即 |
U | API响应结果为 |
结果码
result.resultCode
系统结果码
resultCode | resultStatus | resultMessage | 处理建议 |
SUCCESS | S | Success | |
UNKNOWN_EXCEPTION | U | API failed due to unknown reason. | 服务器错误,若稍后重试问题依旧,联系万里汇技术支持以解决问题 |
REQUEST_TRAFFIC_EXCEED_LIMIT | U | The request traffic exceeds the limit. | 重试,若问题依旧,联系万里汇技术支持 |
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. | 需要人工介入,联系万里汇技术支持以解决此问题 |
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 | 处理建议 |
UN_SUPPORT_BUSINESS | F | Unsupported business. | 包含无效参数(如货币代码错误),使用正确的参数重试 |
USER_NO_PERMISSION | F | User does not have permission. | 使用其他用户信息重试 |
CURRENCY_NOT_SUPPORT | F | The currency is not supported. | 确认币种信息正确后重试 |
USER_NOT_EXIST | F | The user does not exist. | 使用正确的用户信息重试 |
USER_ACCOUNT_ABNORMAL | F | The user account status is abnormal. | 使用其他用户信息重试。如问题依旧,看戏万里汇技术支持 |
USER_STATUS_ABNORMAL | F | The status of the user is abnormal. Retry with another card. | 使用其他用户信息重试 |
CONTRACT_CHECK_FAIL | F | The contract check has failed. | 请检查合约状态后重试 |
范例
请求体范例
{
"transferFromDetail": {
"transferFromAmount": {
"currency": "USD",
"value": 1000
}
},
"transferToDetail": {
"transferToAmount": {
"currency": "EUR"
},
"feeAmount": {
"currency": "USD",
"value": 10
},
"transferToMethod": {
"customerId": "*****",
"paymentMethodType": "BALANCE"
}
}
}
响应体范例
{
"result": {
"resultStatus": "S",
"resultCode": "SUCCESS",
"resultMessage": "success."
},
"transferFromDetail": {
"transferFromAmount": {
"currency": "USD",
"value": 1000
}
},
"transferToDetail": {
"transferToAmount": {
"currency": "EUR",
"value": 938
},
"feeAmount": {
"currency": "USD",
"value": 10
},
"transferToMethod": {
"customerId": "*****",
"paymentMethodType": "BALANCE"
},
"transferQuote": {
"quoteId": "*****",
"quoteCurrencyPair": "USD/EUR",
"quotePrice": "1.32570",
"quoteStartTime": "2022-11-15T09:05:01Z",
"quoteExpiryTime": "2022-11-15T09:05:31Z"
}
}
}