Skip to content

自由换汇交易发起

  • Endpoint: POST /aggregate-pay/api/gateway/applyExchange
  • Tags: 外汇(新)

Description

发起自由换汇交易

Parameters

FieldInTypeRequiredConstraintsDescription
Content-TypeheaderstringYes
signheaderstringYes签名信息请参考技术文档

Parameter Examples

  • Content-Type: "application/json"
  • sign: "FPFVT3o227JrFRbqu19boZCpVVTF9KznxyRawUmxpfXilHV/0yK46haPhAjNu1hPUMy7Vw/ILXhfzffNm4Fj0apWknlTY9OJxnSoQxS9BTFtc61tn5yV1q69x/kkBl82/qwg+XTJ4fOzy7Mar3VaC1E2PlDA6RkkKBUyNE6RYgsdB+Su7an4+4HVTNAnoe74WyvBgxTLMNg28igBTdqxaO3w/UBY6ObVp7vkqkQGdL1Y+HgmMYaAVwrM3+ALWGId0sJ+YqTY4WJ+0xCRGhaSnybiIjZsQEYyID68WNUfuavDLDsEhaMm/HfQvf5p0R1Ltovp3wwJnEbQcjY458iX5A=="

Request Body

Required

Content-Type: application/json

FieldTypeRequiredConstraintsDescriptionEnum
versionstringYes当前值为:1.5
keyVersionstringYes当前值为:1
requestTimestringYes符合rfc3339规范,格式:yyyy-MM-dd'T'HH:mm:ss.SSSXXX 时间需要在当前时间两分钟内
appIdstringYesPayerMax分配给商户应用的唯一标识,会员维度的集成appid
memberIdstringYes
dataobjectYes
data.accountInfoobjectYes
data.accountInfo.buyFundsAccountNostringYes买入资金账号,交易成功后该账户流入资金
data.accountInfo.sellFundsAccountNostringYes卖出资金账号,交易成功后该账户流出资金
data.outTradeNostringYesmaxLength: 64要保证商户下唯一
data.sidestringYes针对交易币种的买卖方向
data.targetCurrencystringYesmaxLength: 3, minLength: 3目标币种
data.transactionAmountstringYes交易金额
data.transactionCurrencystringYesmaxLength: 3, minLength: 3交易币种
data.callBackUrlstringNomaxLength: 512订单到达终态时的回调地址
data.rateReferenceIdstringNo汇率版本,可通过自由换汇汇率查询接口获取

Example

json
{
  "version": "1.5",
  "keyVersion": "1",
  "requestTime": "2025-12-05T20:55:13.712+08:00",
  "appId": "798b79c2e33a4d8e866410bf401551a7",
  "memberId": "20250619P01B00000075000002",
  "data": {
    "accountInfo": {
      "buyFundsAccountNo": "P25101038985",
      "sellFundsAccountNo": "P25101038984"
    },
    "outTradeNo": "20251201004059PO66350070490846T04",
    "side": "SELL",
    "targetCurrency": "PHP",
    "transactionAmount": "1001",
    "transactionCurrency": "USD",
    "callBackUrl": "http://xxxx/yyyy"
  }
}

Responses

200

FieldTypeRequiredConstraintsDescriptionEnum
msgstringYes
codestringYes
dataobjectYes
data.accountInfoobjectYes
data.accountInfo.buyFundsAccountNostringYes买入资金账户
data.accountInfo.sellFundsAccountNostringYes卖出资金账户
data.transactionCurrencystringYes交易币种
data.sidestringYes针对交易币种的买卖方向
data.tradeNostringYes平台订单号
data.targetCurrencystringYes目标币种
data.targetAmountstringYes目标金额
data.completeTimestringYes完成时间
data.rateReferenceIdstringYes汇率版本
data.ccyPairstringYes币种对(=交易币种目标币种)
data.ratestringYes汇率(1交易币种=?目标币种)
data.outTradeNostringYes商户订单号
data.transactionAmountstringYes交易金额
data.statusstringYes-PROCESSING 处理中 -SUCCESS 成功 -FAILED 失败

Response Example

json
{
  "msg": "",
  "code": "APPLY_SUCCESS",
  "data": {
    "accountInfo": {
      "buyFundsAccountNo": "P25101038985",
      "sellFundsAccountNo": "P25101038984"
    },
    "transactionCurrency": "USD",
    "side": "SELL",
    "tradeNo": "20251205125637TU9495336408000531T05",
    "targetCurrency": "PHP",
    "targetAmount": "58624.94",
    "completeTime": "2025-12-05T12:56:37.000Z",
    "rateReferenceId": "tieredBatchId0076176493939752933802672",
    "ccyPair": "USDPHP",
    "rate": "58.56637500",
    "outTradeNo": "20251201004059PO66350070490846T04",
    "transactionAmount": "1001.00",
    "status": "SUCCESS"
  }
}

此页面的内容有帮助吗?

感谢您帮助改进 PayerMax 产品文档!

Released under the MIT License.