发起换汇

换汇询价

Endpoint

Sandbox

POST https://preapi.futurepay-develop.com/api/v1/fx/inquiry

Production

POST https://api.futurepay.global/api/v1/fx/inquiry

Request Parameters

ParameterRequiredTypeDescription
directionMint指定买入卖出,0:指定买入,1:指定卖出
buyCcyMString买入币种
sellCcyMString卖出币种
amountMBigDecimal交易金额

Request Example

{
    "direction": 1,
    "sellCcy": "MXN",
    "buyCcy": "USD",
    "amount": "1000"
}

Response

FieldTypeDescription
tokenString换汇汇率锁定Token,发起换汇时需传参调用
directionint汇率查询方向,0:买入,1:卖出
rateBigDecimal汇率
expireTimeLong过期时间,Unix 时间戳(秒)
sellingMoney卖出金额
buyingMoney买入金额
currencyPairString币种对

Money

FieldTypeDescription
amountBigDecimal金额
currencyString币种
accuracyint精度

Response Example

{
    "code": "0",
    "msg": "succeeded",
    "serverTime": 1781602704768,
    "data": {
        "token": "fxq_30M8iSJmv6lLbW",
        "direction": 1,
        "selling": {
            "amount": 1000.00,
            "currency": "MXN",
            "accuracy": 2
        },
        "buying": {
            "amount": 57.31,
            "currency": "USD",
            "accuracy": 2
        },
        "currencyPair": "USDMXN",
        "rate": "17.4487608109",
        "expireTime": 1781602734
    },
    "success": true
}

申请换汇

Endpoint

Sandbox

POST https://preapi.futurepay-develop.com/api/v1/fx/apply

Production

POST https://api.futurepay.global/api/v1/fx/apply

Request Parameters

ParameterRequiredTypeDescription
referenceMString商户请求订单号
tokenMString换汇汇率查询 Token

Request Example

{
    "reference": "321315787ss",
    "token": "8239018321kk"
}

Response

FieldTypeDescription
tradeNoString换汇订单号
statusint换汇状态,10:处理中,2000:成功,2500:失败,3000:取消

Response Example

{
    "code": "0",
    "msg": "succeeded",
    "serverTime": 1763113556851,
    "data": {
        "tradeNo": "Fx43890183213474",
        "status": 10
    },
    "success": true
}

换汇订单查询

Endpoint

Sandbox

POST https://preapi.futurepay-develop.com/api/v1/fx/query-detail

Production

POST https://api.futurepay.global/api/v1/fx/query-detail

Request Parameters

ParameterRequiredTypeDescription
merchantReferenceOString商户订单号
tradeNoOString换汇订单号

Request Example

{
    "tradeNo": "Fx238190384173291"
}

Response

FieldTypeDescription
tradeNoString换汇订单号
directionint汇率查询方向,0:买入,1:卖出
rateBigDecimal汇率
createTimeLong创建时间,Unix 时间戳(秒)
buyAmountMoney买入金额
sellAmountMoney卖出金额
statusint换汇状态,10:处理中,2000:成功,2500:失败,3000:取消

Money

FieldTypeDescription
amountBigDecimal金额
currencyString币种
accuracyint精度

Response Example

{
    "code": "0",
    "msg": "succeeded",
    "serverTime": 1763113556851,
    "data": {
        "sellAmount": {
            "currency": "USD",
            "amount": 100.00,
            "accuracy": 2
        },
        "buyAmount": {
            "currency": "CNH",
            "amount": 700.00,
            "accuracy": 2
        },
        "rate": 7.0000000000,
        "createTime": 1763113556851,
        "tradeNo": "Fx83290213809131",
        "direction": 1,
        "status": 2000
    },
    "success": true
}

Webhook

Event

EXCHANGE_ORDER_RESULT

Payload Example

{
    "appId": "1929723739684102144",
    "merchantId": "1929723739654762496",
    "notificationItems": [
        {
            "msg": "SUCCESS",
            "reference": "ZXCZXCZXC",
            "eventCode": "EXCHANGE_ORDER_RESULT",
            "tradeNo": "FX805275403079772",
            "status": 2000,
            "eventDate": 1774438800740
        }
    ]
}


Did this page help you?