Onerway
POST

查询可用付款方式

按收款国家、账户币种及主体类型查询当前商户可用的付款方式。

请求

ApiKey
Onerway 分配的账户服务 API key 请求 Header;必须使用与请求域名相同环境的值。
示例:
Content-Type
请求体媒体类型。
示例:
destinationCountry
收款账户所在国家或地区,参见国家/地区枚举。
约束
规则
2 个字符
accountCurrency
收款账户币种,参见币种枚举。
约束
规则
使用系统支持的三位大写字母币种代码,例如 USD。
entityType
收款人的主体类型,取值见枚举说明。
可选值
INDIVIDUAL
个人
BUSINESS
企业
onBehalfOf
请求实际对应的商户号,仅在代其他商户发起请求时填写。

请求示例

curl -X POST 'https://sandbox-transfer-api.onerway.com/api/v3/acct/queryPaymentMethods' \
  -H 'ApiKey: replace_with_account_service_apikey' \
  -H 'Content-Type: application/json' \
  --data-raw '{
  "destinationCountry": "US",
  "accountCurrency": "USD",
  "entityType": "BUSINESS"
}'

响应

respCode
响应码;20000 表示请求处理成功,其余为错误码。
respMsg
响应码对应的可读说明。
成功业务数据;失败不作为有效业务数据读取
结构化失败信息;并非每个失败分支都有该字段

响应示例

{
  "respCode": "20000",
  "respMsg": "Success",
  "data": {
    "destinationCountry": "US",
    "accountCurrency": "USD",
    "entityType": "BUSINESS",
    "paymentMethods": [
      "BANK_TRANSFER"
    ]
  }
}
20040004

destinationCountry 使用小写 us。

触发条件: destinationCountry 使用小写 us。

示例

{
  "respCode": "40004",
  "respMsg": "Illegal parameter [destinationCountry]",
  "error": {
    "type": "validation_error",
    "code": "40004",
    "message": "Illegal parameter [destinationCountry]",
    "requestId": "req_00000000000000000000000000000001",
    "errorDetails": [
      {
        "errorCode": "40004",
        "message": "Illegal parameter [destinationCountry]"
      }
    ],
    "param": "destinationCountry"
  }
}