Satogate 接口文档
Description:Satogate 接口文档
HOST: https://api.satogate.io
Contacts:
Version:v1.0
URL:/v3/api-docs
[TOC]
01.货币信息
支持的货币列表
url:/currency/list
method:GET
produces:application/x-www-form-urlencoded
consumes:*/*
Note:
Params:
| name | description | in | require | type | schema |
|---|---|---|---|---|---|
| FP-API-KEY | 填写商户API KEY | header | false | ||
| FP-SIGN | 填写对请求参数的签名 | header | false | ||
| FP-TIMESTAMP | 填写签名时的时间戳 | header | false | ||
| chain | 链(ETH/BSC/TRON) | query | false | string |
Status:
| code | description | schema |
|---|---|---|
| 200 | OK | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response Params:
None
Response Example:
{
"data": {
"BSC": [
{
"symbol": "BNB",
"contract": null,
"icon": "https://pifutures.oss-cn-shanghai.aliyuncs.com/cash/bnb.png",
"decimals": 18,
"minCharge": "0"
},
{
"symbol": "USDT",
"contract": "0x0047b319f85284acb41d29fc2a1fa9066a13fe3f",
"icon": "https://pifutures.oss-cn-shanghai.aliyuncs.com/cash/usdt.png",
"decimals": 6,
"minCharge": "100.0"
},
{
"symbol": "USDC",
"contract": "0x0047b319f85284acb41d29fc2a1fa9066a13fe3f",
"icon": "https://pifutures.oss-cn-shanghai.aliyuncs.com/cash/usdc.png",
"decimals": 18,
"minCharge": "0"
}
],
"TRON": [
{
"symbol": "TRX",
"contract": null,
"icon": "https://pifutures.oss-cn-shanghai.aliyuncs.com/cash/TRX.png",
"decimals": 12,
"minCharge": "0"
},
{
"symbol": "USDT",
"contract": "TAK91B45WCr8Dz8QZQZGwHgvEZJEYa8wQK",
"icon": "https://pifutures.oss-cn-shanghai.aliyuncs.com/cash/usdt.png",
"decimals": 6,
"minCharge": "0"
}
]
},
"code": 200,
"message": ""
}
02.钱包地址
获取收款地址
url:/wallet/address
method:POST
produces:application/x-www-form-urlencoded,application/json
consumes:*/*
Note:
本接口接受一个可选参数merchantAddressId。
当参数为空时,会生成一次性收款地址,并包含一个充值订单ID;
当参数不为空时,将生成一个与此ID绑定的钱包地址,并持续监听收款情况,商户需要维护此ID与收款地址的关联,该情况下,返回结果将不包含充值订单ID(depositOrderId)
*目前暂不支持一次性钱包地址,merchantAddressId必填
Example:
{
"merchantAddressId": "String, 必填"
}
Params:
| name | description | in | require | type | schema |
|---|---|---|---|---|---|
| getAddressDto | GetAddressDto | body | true | GetAddressDto | GetAddressDto |
| merchantAddressId | 商户关联ID | false | string | ||
| FP-API-KEY | 填写商户API KEY | header | false | ||
| FP-SIGN | 填写对请求参数的签名 | header | false | ||
| FP-TIMESTAMP | 填写签名时的时间戳 | header | false |
Status:
| code | description | schema |
|---|---|---|
| 200 | OK | GetAddressResponse |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response Params:
| name | description | type | schema |
|---|---|---|---|
| depositOrderId | string | ||
| merchantAddressId | string | ||
| type | string | ||
| wallets | array | WalletAddressResponse | |
| address | string | ||
| chain | 可用值:BSC,BTC,ETH,POLYGON,TRON | string | |
| supportTokens | array | string |
Response Example:
{
"depositOrderId": "",
"merchantAddressId": "",
"type": "BOUND/DISPOSABLE",
"wallets": [
{
"address": "",
"chain": "ETH/BSC/TRON",
"supportTokens": []
}
]
}
钱包充值历史流水
url:/wallet/deposit/history
method:GET
produces:application/x-www-form-urlencoded
consumes:*/*
Note:
merchantAddressId与address两者必填其一
Params:
| name | description | in | require | type | schema |
|---|---|---|---|---|---|
| page | 页码 | query | true | integer(int32) | |
| pageSize | 每页数量 | query | true | integer(int32) | |
| FP-API-KEY | 填写商户API KEY | header | false | ||
| FP-SIGN | 填写对请求参数的签名 | header | false | ||
| FP-TIMESTAMP | 填写签名时的时间戳 | header | false | ||
| merchantAddressId | 商户关联ID | query | false | string | |
| address | address | query | false | string | |
| chain | ETH/BSC/TRON | query | false | string | |
| token | USDT | query | false | string | |
| startTime | 时间戳,单位秒 | query | false | string | |
| endTime | 时间戳,单位秒 | query | false | string |
Status:
| code | description | schema |
|---|---|---|
| 200 | OK | DepositHistoryResponse |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response Params:
| name | description | type | schema |
|---|---|---|---|
| data | array | DepositOrderResponse | |
| address | string | ||
| amount | string | ||
| amountUsd | string | ||
| chain | 可用值:BSC,BTC,ETH,POLYGON,TRON | string | |
| createTime | integer(int64) | ||
| depositAmount | string | ||
| finishedTime | integer(int64) | ||
| fromAddress | string | ||
| id | string | ||
| merchantAddressId | string | ||
| orderModeStatus | 商户订单收款模式状态,可用值:CREATED,FINISHED,PARTIALLY_PAID,TIMEOUT | string | |
| settleTxid | string | ||
| status | TIMEOUT仅出现于一次性钱包地址的情况 ,可用值:ERROR,FINISHED,INSUFFICIENT_AMOUNT,PROCESSING,TIMEOUT |
string | |
| token | 可用值:BNB,BTC,ETH,MATIC,TRX,USD,USDC,USDT | string | |
| txHash | string | ||
| txList | 链上交易Hash列表(对于商户订单收款模式,一个充值订单可能关联多笔链上转账) | array | string |
| page | integer(int32) | integer(int32) | |
| pageSize | integer(int32) | integer(int32) | |
| total | integer(int64) | integer(int64) |
Response Example:
{
"data": [
{
"address": "",
"amount": "",
"amountUsd": "",
"chain": "ETH/BSC/TRON",
"createTime": 0,
"depositAmount": "",
"finishedTime": 0,
"fromAddress": "",
"id": "",
"merchantAddressId": "",
"orderModeStatus": "",
"settleTxid": "",
"status": "",
"token": "USDT",
"txHash": "",
"txList": []
}
],
"page": 0,
"pageSize": 0,
"total": 0
}
查询项目ACCOUNT信息
url:/wallet/project/account
method:GET
produces:application/x-www-form-urlencoded
consumes:*/*
Note:
Params:
| name | description | in | require | type | schema |
|---|---|---|---|---|---|
| FP-API-KEY | 填写商户API KEY | header | false | ||
| FP-SIGN | 填写对请求参数的签名 | header | false | ||
| FP-TIMESTAMP | 填写签名时的时间戳 | header | false |
Status:
| code | description | schema |
|---|---|---|
| 200 | OK | BaseResponse«List«ProjectAccountResponse»» |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response Params:
| name | description | type | schema |
|---|---|---|---|
| code | integer(int32) | integer(int32) | |
| data | array | ProjectAccountResponse | |
| address | 地址 | string | |
| balance | 余额 | string | |
| chain | 链,可用值:BSC,BTC,ETH,POLYGON,TRON | string | |
| currency | 币种,可用值:BNB,BTC,ETH,MATIC,TRX,USD,USDC,USDT | string | |
| id | 账户ID | string | |
| message | string |
Response Example:
{
"code": 0,
"data": [
{
"address": "",
"balance": "",
"chain": "",
"currency": "",
"id": ""
}
],
"message": ""
}
查询实时链上余额
url:/wallet/project/account/balance
method:GET
produces:application/x-www-form-urlencoded
consumes:*/*
Note:
Params:
| name | description | in | require | type | schema |
|---|---|---|---|---|---|
| accountId | accountId | query | true | string | |
| FP-API-KEY | 填写商户API KEY | header | false | ||
| FP-SIGN | 填写对请求参数的签名 | header | false | ||
| FP-TIMESTAMP | 填写签名时的时间戳 | header | false |
Status:
| code | description | schema |
|---|---|---|
| 200 | OK | BaseResponse«string» |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response Params:
| name | description | type | schema |
|---|---|---|---|
| code | integer(int32) | integer(int32) | |
| data | string | ||
| message | string |
Response Example:
{
"code": 0,
"data": "",
"message": ""
}
商户创建新项目
url:/wallet/project/create
method:POST
produces:application/x-www-form-urlencoded,application/json
consumes:*/*
Note:
Example:
{
"assembleAddress": "",
"assembleChain": "",
"callbackUrl": "",
"name": "String, 必填",
"paymentPageCallbackUrl": "String, 选填",
"settleToken": ""
}
Params:
| name | description | in | require | type | schema |
|---|---|---|---|---|---|
| createMerchantProjectDTO | CreateMerchantProjectDTO | body | true | CreateMerchantProjectDTO | CreateMerchantProjectDTO |
| assembleAddress | true | string | |||
| assembleChain | 可用值:BSC,BTC,ETH,POLYGON,TRON | true | string | ||
| callbackUrl | true | string | |||
| name | 项目名称 | true | string | ||
| paymentPageCallbackUrl | 收银台页面回调url | false | string | ||
| settleToken | 可用值:BNB,BTC,ETH,MATIC,TRX,USD,USDC,USDT | true | string | ||
| FP-API-KEY | 填写商户API KEY | header | false | ||
| FP-SIGN | 填写对请求参数的签名 | header | false | ||
| FP-TIMESTAMP | 填写签名时的时间戳 | header | false |
Status:
| code | description | schema |
|---|---|---|
| 200 | OK | CreateProjectResponse |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response Params:
| name | description | type | schema |
|---|---|---|---|
| apiKey | string | ||
| apiSecret | string | ||
| assembleAddress | string | ||
| assembleChain | 可用值:BSC,BTC,ETH,POLYGON,TRON | string | |
| projectName | string | ||
| settleToken | 可用值:BNB,BTC,ETH,MATIC,TRX,USD,USDC,USDT | string |
Response Example:
{
"apiKey": "",
"apiSecret": "",
"assembleAddress": "",
"assembleChain": "",
"projectName": "",
"settleToken": ""
}
钱包转账流水
url:/wallet/transfer/history
method:GET
produces:application/x-www-form-urlencoded
consumes:*/*
Note:
Params:
| name | description | in | require | type | schema |
|---|---|---|---|---|---|
| page | 页码 | query | true | integer(int32) | |
| pageSize | 每页数量 | query | true | integer(int32) | |
| FP-API-KEY | 填写商户API KEY | header | false | ||
| FP-SIGN | 填写对请求参数的签名 | header | false | ||
| FP-TIMESTAMP | 填写签名时的时间戳 | header | false | ||
| projectId | projectId | query | false | string | |
| chain | ETH/BSC/TRON | query | false | string | |
| token | USDT | query | false | string | |
| startTime | 时间戳,单位秒 | query | false | string | |
| endTime | 时间戳,单位秒 | query | false | string |
Status:
| code | description | schema |
|---|---|---|
| 200 | OK | PageResponse«TransactionHistoryResponse» |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response Params:
| name | description | type | schema |
|---|---|---|---|
| content | array | TransactionHistoryResponse | |
| amount | 交易金额 | string | |
| chain | 链,可用值:BSC,BTC,ETH,POLYGON,TRON | string | |
| createTime | 创建时间 | integer(int64) | |
| currency | 币种,可用值:BNB,BTC,ETH,MATIC,TRX,USD,USDC,USDT | string | |
| fromAddress | 交易发起地址 | string | |
| gas | 交易手续费 | string | |
| gasPrice | 交易时使用的燃料费单价 | string | |
| id | 交易ID | string | |
| status | 交易状态,可用值:CANCELED,CREATED,ERROR,GAS_CHARGING,PROCESSING,SUCCESS,TO_BE_CONFIRMED,UNDER_REVIEW | string | |
| toAddress | 交易接收地址 | string | |
| txTime | 交易时间 | integer(int64) | |
| txid | 链上ID | string | |
| last | boolean | ||
| page | integer(int32) | integer(int32) | |
| page_size | integer(int32) | integer(int32) | |
| total | integer(int64) | integer(int64) | |
| total_pages | integer(int32) | integer(int32) |
Response Example:
{
"content": [
{
"amount": "",
"chain": "",
"createTime": 0,
"currency": "",
"fromAddress": "",
"gas": "",
"gasPrice": "",
"id": "",
"status": "",
"toAddress": "",
"txTime": 0,
"txid": ""
}
],
"last": true,
"page": 0,
"page_size": 0,
"total": 0,
"total_pages": 0
}
03.充值订单
修改订单状态
url:/deposit_order/changeStatus
method:POST
produces:application/x-www-form-urlencoded,application/json
consumes:*/*
Note:
Example:
{
"id": "",
"status": "FINISHED/TIMEOUT"
}
Params:
| name | description | in | require | type | schema |
|---|---|---|---|---|---|
| changeStatusDto | ChangeStatusDto | body | true | ChangeStatusDto | ChangeStatusDto |
| id | true | string | |||
| status | false | string | |||
| FP-API-KEY | 填写商户API KEY | header | false | ||
| FP-SIGN | 填写对请求参数的签名 | header | false | ||
| FP-TIMESTAMP | 填写签名时的时间戳 | header | false |
Status:
| code | description | schema |
|---|---|---|
| 200 | OK | DepositOrderResponse |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response Params:
| name | description | type | schema |
|---|---|---|---|
| address | string | ||
| amount | string | ||
| amountUsd | string | ||
| chain | 可用值:BSC,BTC,ETH,POLYGON,TRON | string | |
| createTime | integer(int64) | integer(int64) | |
| depositAmount | string | ||
| finishedTime | integer(int64) | integer(int64) | |
| fromAddress | string | ||
| id | string | ||
| merchantAddressId | string | ||
| orderModeStatus | 商户订单收款模式状态,可用值:CREATED,FINISHED,PARTIALLY_PAID,TIMEOUT | string | |
| settleTxid | string | ||
| status | TIMEOUT仅出现于一次性钱包地址的情况 ,可用值:ERROR,FINISHED,INSUFFICIENT_AMOUNT,PROCESSING,TIMEOUT |
string | |
| token | 可用值:BNB,BTC,ETH,MATIC,TRX,USD,USDC,USDT | string | |
| txHash | string | ||
| txList | 链上交易Hash列表(对于商户订单收款模式,一个充值订单可能关联多笔链上转账) | array |
Response Example:
{
"address": "",
"amount": "",
"amountUsd": "",
"chain": "ETH/BSC/TRON",
"createTime": 0,
"depositAmount": "",
"finishedTime": 0,
"fromAddress": "",
"id": "",
"merchantAddressId": "",
"orderModeStatus": "",
"settleTxid": "",
"status": "",
"token": "USDT",
"txHash": "",
"txList": []
}
(新)获取收款地址
url:/deposit_order/depositAddress
method:POST
produces:application/x-www-form-urlencoded,application/json
consumes:*/*
Note:
Example:
{
"merchantOrderAmount": 0,
"merchantOrderExpireTime": 0,
"merchantOrderId": "String, 必填"
}
Params:
| name | description | in | require | type | schema |
|---|---|---|---|---|---|
| getDepositAddressDTO | GetDepositAddressDTO | body | true | GetDepositAddressDTO | GetDepositAddressDTO |
| merchantOrderAmount | 订单金额 | true | number(bigdecimal) | ||
| merchantOrderExpireTime | 订单过期秒数(单位:秒,默认1800) | false | number(biginteger) | ||
| merchantOrderId | 商户方订单Id | true | string | ||
| FP-API-KEY | 填写商户API KEY | header | false | ||
| FP-SIGN | 填写对请求参数的签名 | header | false | ||
| FP-TIMESTAMP | 填写签名时的时间戳 | header | false |
Status:
| code | description | schema |
|---|---|---|
| 200 | OK | GetOrderAddressResponse |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response Params:
| name | description | type | schema |
|---|---|---|---|
| depositOrderId | string | ||
| merchantOrderId | string | ||
| type | string | ||
| wallets | array | WalletAddressResponse | |
| address | string | ||
| chain | 可用值:BSC,BTC,ETH,POLYGON,TRON | string | |
| supportTokens | array | string |
Response Example:
{
"depositOrderId": "",
"merchantOrderId": "",
"type": "BOUND/DISPOSABLE",
"wallets": [
{
"address": "",
"chain": "ETH/BSC/TRON",
"supportTokens": []
}
]
}
查询订单详情
url:/deposit_order/detail
method:GET
produces:application/x-www-form-urlencoded
consumes:*/*
Note:
Params:
| name | description | in | require | type | schema |
|---|---|---|---|---|---|
| id | id | query | true | string | |
| FP-API-KEY | 填写商户API KEY | header | false | ||
| FP-SIGN | 填写对请求参数的签名 | header | false | ||
| FP-TIMESTAMP | 填写签名时的时间戳 | header | false |
Status:
| code | description | schema |
|---|---|---|
| 200 | OK | DepositOrderResponse |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response Params:
| name | description | type | schema |
|---|---|---|---|
| address | string | ||
| amount | string | ||
| amountUsd | string | ||
| chain | 可用值:BSC,BTC,ETH,POLYGON,TRON | string | |
| createTime | integer(int64) | integer(int64) | |
| depositAmount | string | ||
| finishedTime | integer(int64) | integer(int64) | |
| fromAddress | string | ||
| id | string | ||
| merchantAddressId | string | ||
| orderModeStatus | 商户订单收款模式状态,可用值:CREATED,FINISHED,PARTIALLY_PAID,TIMEOUT | string | |
| settleTxid | string | ||
| status | TIMEOUT仅出现于一次性钱包地址的情况 ,可用值:ERROR,FINISHED,INSUFFICIENT_AMOUNT,PROCESSING,TIMEOUT |
string | |
| token | 可用值:BNB,BTC,ETH,MATIC,TRX,USD,USDC,USDT | string | |
| txHash | string | ||
| txList | 链上交易Hash列表(对于商户订单收款模式,一个充值订单可能关联多笔链上转账) | array |
Response Example:
{
"address": "",
"amount": "",
"amountUsd": "",
"chain": "ETH/BSC/TRON",
"createTime": 0,
"depositAmount": "",
"finishedTime": 0,
"fromAddress": "",
"id": "",
"merchantAddressId": "",
"orderModeStatus": "",
"settleTxid": "",
"status": "",
"token": "USDT",
"txHash": "",
"txList": []
}
锁定价格并提交订单
url:/deposit_order/lock
method:POST
produces:application/x-www-form-urlencoded,application/json
consumes:*/*
Note:
Example:
{
"asset": "充值币种",
"chain": "充值链",
"depositOrderId": "充值订单id",
"merchantOrderId": "商户方订单ID",
"price": 0
}
Params:
| name | description | in | require | type | schema |
|---|---|---|---|---|---|
| lockDepositOrderDTO | LockDepositOrderDTO | body | true | LockDepositOrderDTO | LockDepositOrderDTO |
| asset | 可用值:BNB,BTC,ETH,MATIC,TRX,USD,USDC,USDT | false | string | ||
| chain | 可用值:BSC,BTC,ETH,POLYGON,TRON | false | string | ||
| depositOrderId | false | string | |||
| merchantOrderId | false | string | |||
| price | false | number(bigdecimal) | |||
| FP-API-KEY | 填写商户API KEY | header | false | ||
| FP-SIGN | 填写对请求参数的签名 | header | false | ||
| FP-TIMESTAMP | 填写签名时的时间戳 | header | false |
Status:
| code | description | schema |
|---|---|---|
| 200 | OK | SubmitDepositOrderResponse |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response Params:
| name | description | type | schema |
|---|---|---|---|
| amount | number(bigdecimal) | number(bigdecimal) | |
| asset | 可用值:BNB,BTC,ETH,MATIC,TRX,USD,USDC,USDT | string | |
| chain | 可用值:BSC,BTC,ETH,POLYGON,TRON | string | |
| depositAddress | 充值地址 | string | |
| price | number(bigdecimal) | number(bigdecimal) |
Response Example:
{
"amount": 0,
"asset": "",
"chain": "",
"depositAddress": "",
"price": 0
}
询价
url:/deposit_order/quote
method:GET
produces:application/x-www-form-urlencoded
consumes:*/*
Note:
Params:
| name | description | in | require | type | schema |
|---|---|---|---|---|---|
| asset | 币种,可用值:BNB,BTC,ETH,MATIC,TRX,USD,USDC,USDT | query | true | string | |
| amount | usdt数量 | query | true | number(bigdecimal) | |
| FP-API-KEY | 填写商户API KEY | header | false | ||
| FP-SIGN | 填写对请求参数的签名 | header | false | ||
| FP-TIMESTAMP | 填写签名时的时间戳 | header | false |
Status:
| code | description | schema |
|---|---|---|
| 200 | OK | QuoteResponse |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response Params:
| name | description | type | schema |
|---|---|---|---|
| assetAmount | number(bigdecimal) | number(bigdecimal) | |
| price | number(bigdecimal) | number(bigdecimal) |
Response Example:
{
"assetAmount": 0,
"price": 0
}
解锁订单价格
url:/deposit_order/unlock
method:POST
produces:application/x-www-form-urlencoded,application/json
consumes:*/*
Note:
Example:
{
"depositOrderId": "充值订单id",
"merchantOrderId": "商户方订单id"
}
Params:
| name | description | in | require | type | schema |
|---|---|---|---|---|---|
| unlockDepositOrderDTO | UnlockDepositOrderDTO | body | true | UnlockDepositOrderDTO | UnlockDepositOrderDTO |
| depositOrderId | false | string | |||
| merchantOrderId | false | string | |||
| FP-API-KEY | 填写商户API KEY | header | false | ||
| FP-SIGN | 填写对请求参数的签名 | header | false | ||
| FP-TIMESTAMP | 填写签名时的时间戳 | header | false |
Status:
| code | description | schema |
|---|---|---|
| 200 | OK | |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response Params:
None
Response Example:
04.项目模块
创建项目
url:/project/create
method:POST
produces:application/x-www-form-urlencoded,application/json
consumes:*/*
Note:
Example:
{
"assembleAddr": "",
"assembleChain": "",
"name": "",
"settleCurrency": ""
}
Params:
| name | description | in | require | type | schema |
|---|---|---|---|---|---|
| createProjectDto | CreateProjectDto | body | true | CreateProjectDto | CreateProjectDto |
| assembleAddr | 归集地址(没有则自动生成) | false | string | ||
| assembleChain | 归集目标链,可用值:BSC,BTC,ETH,POLYGON,TRON | true | string | ||
| name | 项目名称 | true | string | ||
| settleCurrency | 结算资产,可用值:BNB,BTC,ETH,MATIC,TRX,USD,USDC,USDT | true | string | ||
| FP-API-KEY | 填写商户API KEY | header | false | ||
| FP-SIGN | 填写对请求参数的签名 | header | false | ||
| FP-TIMESTAMP | 填写签名时的时间戳 | header | false |
Status:
| code | description | schema |
|---|---|---|
| 200 | OK | BaseResponse«ProjectInfoResponse» |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response Params:
| name | description | type | schema |
|---|---|---|---|
| code | integer(int32) | integer(int32) | |
| data | ProjectInfoResponse | ProjectInfoResponse | |
| appKey | string | ||
| assembleAddress | string | ||
| assembleChain | 可用值:BSC,BTC,ETH,POLYGON,TRON | string | |
| callbackDomain | string | ||
| callbackUrl | string | ||
| createTime | integer(int64) | ||
| id | string | ||
| name | string | ||
| paymentPageUrl | string | ||
| settleCurrency | 可用值:BNB,BTC,ETH,MATIC,TRX,USD,USDC,USDT | string | |
| status | 可用值:ACTIVE,ARCHIVED,BANNED,DELETED,DEPRECATED,INACTIVE,LOCKED,NORMAL,PENDING,SUSPENDED | string | |
| message | string |
Response Example:
{
"code": 0,
"data": {
"appKey": "",
"assembleAddress": "",
"assembleChain": "",
"callbackDomain": "",
"callbackUrl": "",
"createTime": 0,
"id": "",
"name": "",
"paymentPageUrl": "",
"settleCurrency": "",
"status": ""
},
"message": ""
}
项目列表
url:/project/list
method:GET
produces:application/x-www-form-urlencoded
consumes:*/*
Note:
Params:
| name | description | in | require | type | schema |
|---|---|---|---|---|---|
| page | page | query | true | integer(int32) | |
| pageSize | pageSize | query | true | integer(int32) | |
| projectId | projectId | query | true | string | |
| status | status,可用值:ACTIVE,ARCHIVED,BANNED,DELETED,DEPRECATED,INACTIVE,LOCKED,NORMAL,PENDING,SUSPENDED | query | true | string | |
| FP-API-KEY | 填写商户API KEY | header | false | ||
| FP-SIGN | 填写对请求参数的签名 | header | false | ||
| FP-TIMESTAMP | 填写签名时的时间戳 | header | false |
Status:
| code | description | schema |
|---|---|---|
| 200 | OK | BaseResponse«PageResponse«ProjectInfoResponse»» |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response Params:
| name | description | type | schema |
|---|---|---|---|
| code | integer(int32) | integer(int32) | |
| data | PageResponse«ProjectInfoResponse» | PageResponse«ProjectInfoResponse» | |
| content | array | ProjectInfoResponse | |
| appKey | string | ||
| assembleAddress | string | ||
| assembleChain | 可用值:BSC,BTC,ETH,POLYGON,TRON | string | |
| callbackDomain | string | ||
| callbackUrl | string | ||
| createTime | integer | ||
| id | string | ||
| name | string | ||
| paymentPageUrl | string | ||
| settleCurrency | 可用值:BNB,BTC,ETH,MATIC,TRX,USD,USDC,USDT | string | |
| status | 可用值:ACTIVE,ARCHIVED,BANNED,DELETED,DEPRECATED,INACTIVE,LOCKED,NORMAL,PENDING,SUSPENDED | string | |
| last | boolean | ||
| page | integer(int32) | ||
| page_size | integer(int32) | ||
| total | integer(int64) | ||
| total_pages | integer(int32) | ||
| message | string |
Response Example:
{
"code": 0,
"data": {
"content": [
{
"appKey": "",
"assembleAddress": "",
"assembleChain": "",
"callbackDomain": "",
"callbackUrl": "",
"createTime": 0,
"id": "",
"name": "",
"paymentPageUrl": "",
"settleCurrency": "",
"status": ""
}
],
"last": true,
"page": 0,
"page_size": 0,
"total": 0,
"total_pages": 0
},
"message": ""
}
移除项目
url:/project/remove
method:POST
produces:application/x-www-form-urlencoded,application/json
consumes:*/*
Note:
Example:
{
"projectId": ""
}
Params:
| name | description | in | require | type | schema |
|---|---|---|---|---|---|
| deleteProjectDto | DeleteProjectDto | body | true | DeleteProjectDto | DeleteProjectDto |
| projectId | 项目ID | false | string | ||
| FP-API-KEY | 填写商户API KEY | header | false | ||
| FP-SIGN | 填写对请求参数的签名 | header | false | ||
| FP-TIMESTAMP | 填写签名时的时间戳 | header | false |
Status:
| code | description | schema |
|---|---|---|
| 200 | OK | BaseResponse«boolean» |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response Params:
| name | description | type | schema |
|---|---|---|---|
| code | integer(int32) | integer(int32) | |
| data | boolean | ||
| message | string |
Response Example:
{
"code": 0,
"data": true,
"message": ""
}
查询项目App Secret
url:/project/secret
method:GET
produces:application/x-www-form-urlencoded
consumes:*/*
Note:
Params:
| name | description | in | require | type | schema |
|---|---|---|---|---|---|
| projectId | projectId | query | true | string | |
| FP-API-KEY | 填写商户API KEY | header | false | ||
| FP-SIGN | 填写对请求参数的签名 | header | false | ||
| FP-TIMESTAMP | 填写签名时的时间戳 | header | false |
Status:
| code | description | schema |
|---|---|---|
| 200 | OK | BaseResponse«string» |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response Params:
| name | description | type | schema |
|---|---|---|---|
| code | integer(int32) | integer(int32) | |
| data | string | ||
| message | string |
Response Example:
{
"code": 0,
"data": "",
"message": ""
}
05.转账服务
发起转账
url:/transaction/transfer
method:POST
produces:application/x-www-form-urlencoded,application/json
consumes:*/*
Note:
Example:
{
"amount": "充值数量",
"asset": "充值币种",
"chain": "区块链",
"toAddress": "收款地址"
}
Params:
| name | description | in | require | type | schema |
|---|---|---|---|---|---|
| transferDTO | TransferDTO | body | true | TransferDTO | TransferDTO |
| amount | false | string | |||
| asset | 可用值:BNB,BTC,ETH,MATIC,TRX,USD,USDC,USDT | false | string | ||
| chain | 可用值:BSC,BTC,ETH,POLYGON,TRON | false | string | ||
| toAddress | false | string | |||
| FP-API-KEY | 填写商户API KEY | header | false | ||
| FP-SIGN | 填写对请求参数的签名 | header | false | ||
| FP-TIMESTAMP | 填写签名时的时间戳 | header | false |
Status:
| code | description | schema |
|---|---|---|
| 200 | OK | BaseResponse«TransactionHistoryResponse» |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response Params:
| name | description | type | schema |
|---|---|---|---|
| code | integer(int32) | integer(int32) | |
| data | TransactionHistoryResponse | TransactionHistoryResponse | |
| amount | 交易金额 | string | |
| chain | 链,可用值:BSC,BTC,ETH,POLYGON,TRON | string | |
| createTime | 创建时间 | integer(int64) | |
| currency | 币种,可用值:BNB,BTC,ETH,MATIC,TRX,USD,USDC,USDT | string | |
| fromAddress | 交易发起地址 | string | |
| gas | 交易手续费 | string | |
| gasPrice | 交易时使用的燃料费单价 | string | |
| id | 交易ID | string | |
| status | 交易状态,可用值:CANCELED,CREATED,ERROR,GAS_CHARGING,PROCESSING,SUCCESS,TO_BE_CONFIRMED,UNDER_REVIEW | string | |
| toAddress | 交易接收地址 | string | |
| txTime | 交易时间 | integer(int64) | |
| txid | 链上ID | string | |
| message | string |
Response Example:
{
"code": 0,
"data": {
"amount": "",
"chain": "",
"createTime": 0,
"currency": "",
"fromAddress": "",
"gas": "",
"gasPrice": "",
"id": "",
"status": "",
"toAddress": "",
"txTime": 0,
"txid": ""
},
"message": ""
}
06.支付页面
锁定价格并提交订单
url:/paymentPage/depositOrder/lock
method:POST
produces:application/x-www-form-urlencoded,application/json
consumes:*/*
Note:
Example:
{
"asset": "充值币种",
"chain": "充值链",
"depositOrderId": "充值订单id",
"merchantOrderAmount": 0,
"merchantOrderExpireTime": 0,
"merchantOrderId": "商户方订单ID",
"price": 0
}
Params:
| name | description | in | require | type | schema |
|---|---|---|---|---|---|
| ppLockDepositOrderDTO | PpLockDepositOrderDTO | body | true | PpLockDepositOrderDTO | PpLockDepositOrderDTO |
| asset | 可用值:BNB,BTC,ETH,MATIC,TRX,USD,USDC,USDT | false | string | ||
| chain | 可用值:BSC,BTC,ETH,POLYGON,TRON | false | string | ||
| depositOrderId | false | string | |||
| merchantOrderAmount | false | number(bigdecimal) | |||
| merchantOrderExpireTime | false | number(biginteger) | |||
| merchantOrderId | false | string | |||
| price | false | number(bigdecimal) | |||
| FP-API-KEY | 填写商户API KEY | header | false | ||
| FP-SIGN | 填写对请求参数的签名 | header | false | ||
| FP-TIMESTAMP | 填写签名时的时间戳 | header | false |
Status:
| code | description | schema |
|---|---|---|
| 200 | OK | SubmitDepositOrderResponse |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response Params:
| name | description | type | schema |
|---|---|---|---|
| amount | number(bigdecimal) | number(bigdecimal) | |
| asset | 可用值:BNB,BTC,ETH,MATIC,TRX,USD,USDC,USDT | string | |
| chain | 可用值:BSC,BTC,ETH,POLYGON,TRON | string | |
| depositAddress | 充值地址 | string | |
| price | number(bigdecimal) | number(bigdecimal) |
Response Example:
{
"amount": 0,
"asset": "",
"chain": "",
"depositAddress": "",
"price": 0
}
解锁订单价格
url:/paymentPage/depositOrder/unlock
method:POST
produces:application/x-www-form-urlencoded,application/json
consumes:*/*
Note:
Example:
{
"depositOrderId": "充值订单id",
"merchantOrderAmount": 0,
"merchantOrderExpireTime": 0,
"merchantOrderId": "商户方订单id"
}
Params:
| name | description | in | require | type | schema |
|---|---|---|---|---|---|
| ppUnlockDepositOrderDTO | PpUnlockDepositOrderDTO | body | true | PpUnlockDepositOrderDTO | PpUnlockDepositOrderDTO |
| depositOrderId | false | string | |||
| merchantOrderAmount | true | number(bigdecimal) | |||
| merchantOrderExpireTime | false | number(biginteger) | |||
| merchantOrderId | false | string | |||
| FP-API-KEY | 填写商户API KEY | header | false | ||
| FP-SIGN | 填写对请求参数的签名 | header | false | ||
| FP-TIMESTAMP | 填写签名时的时间戳 | header | false |
Status:
| code | description | schema |
|---|---|---|
| 200 | OK | |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response Params:
None
Response Example:
生成payment page跳转链接
url:/paymentPage/gen_payment_page
method:POST
produces:application/x-www-form-urlencoded
consumes:*/*
Note:
Params:
| name | description | in | require | type | schema |
|---|---|---|---|---|---|
| FP-API-KEY | 填写商户API KEY | header | false | ||
| FP-SIGN | 填写对请求参数的签名 | header | false | ||
| FP-TIMESTAMP | 填写签名时的时间戳 | header | false | ||
| appKey | query | false | string | ||
| merchantAddressId | query | false | string | ||
| merchantOrderAmount | query | false | string | ||
| merchantOrderExpireTime | query | false | number(biginteger) | ||
| merchantOrderId | query | false | string | ||
| secret | query | false | string |
Status:
| code | description | schema |
|---|---|---|
| 200 | OK | |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response Params:
None
Response Example:
PaymentPage页面参数
url:/paymentPage/index
method:GET
produces:application/x-www-form-urlencoded
consumes:*/*
Note:
Params:
| name | description | in | require | type | schema |
|---|---|---|---|---|---|
| uri | 当前页面路径 | query | true | string | |
| FP-API-KEY | 填写商户API KEY | header | false | ||
| FP-SIGN | 填写对请求参数的签名 | header | false | ||
| FP-TIMESTAMP | 填写签名时的时间戳 | header | false | ||
| merchantAddressId | 商户关联ID | query | false | string | |
| demo | 是否用于展示 | query | false | string | |
| merchantOrderId | 商户方订单Id | query | false | string | |
| merchantOrderAmount | 订单金额 | query | false | number(bigdecimal) | |
| merchantOrderExpireTime | 订单过期时间 | query | false | number(biginteger) |
Status:
| code | description | schema |
|---|---|---|
| 200 | OK | PaymentPageResponse |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response Params:
| name | description | type | schema |
|---|---|---|---|
| name | 商户或项目名称 | string | |
| ppUrl | string | ||
| priceLockSecond | number(biginteger) | number(biginteger) | |
| requestedDepositOrderInfo | RequestedDepositOrderInfo | RequestedDepositOrderInfo | |
| asset | 币种,可用值:BNB,BTC,ETH,MATIC,TRX,USD,USDC,USDT | string | |
| chain | 链,可用值:BSC,BTC,ETH,POLYGON,TRON | string | |
| id | id | string | |
| lastPriceLockedTime | 锁定价格时间 | integer(int64) | |
| price | 锁定价格时间 | number(bigdecimal) | |
| status | 状态,PRICE_LOCKED为已锁定价格,可用值:BORROWING,CREATED,DEPOSIT_ORDER_HANDLING,ERROR,FINISHED,FROZEN,INSUFFICIENT_AMOUNT,MARGIN_CHARGING,MARGIN_TRANSFERRING,PRICE_LOCKED,RECEIVED,REPAYING,TIMEOUT,TRADE_TRANSFERRING,TRADING,TX_HASH_SUBMITTED,WITHDRAWING | string | |
| wallets | array | WalletResponse | |
| address | string | ||
| chain | 可用值:BSC,BTC,ETH,POLYGON,TRON | string | |
| chainId | string | ||
| tokens | array | TokenInfoResponse | |
| contract | 代币合约地址,燃料币不返回此参数,如ETH、BNB | string | |
| decimals | 货币精度 | integer | |
| enabled | 是否支持充值 | boolean | |
| icon | 代币ICON | string | |
| minCharge | 最小充值金额(高于此金额才会被系统识别,否则系统将会忽略) | string | |
| symbol | 可用值:BNB,BTC,ETH,MATIC,TRX,USD,USDC,USDT | string |
Response Example:
{
"name": "",
"ppUrl": "",
"priceLockSecond": 0,
"requestedDepositOrderInfo": {
"asset": "",
"chain": "",
"id": "",
"lastPriceLockedTime": 0,
"price": 0,
"status": ""
},
"wallets": [
{
"address": "",
"chain": "ETH/BSC/TRON",
"chainId": "",
"tokens": [
{
"contract": "",
"decimals": 0,
"enabled": false,
"icon": "",
"minCharge": "",
"symbol": ""
}
]
}
]
}
07.结算订单
结算历史流水
url:/settlement_order/history
method:GET
produces:application/x-www-form-urlencoded
consumes:*/*
Note:
每一条结算记录包含相关的充值订单,字段:depositOrderList,是由order id组成的列表
Params:
| name | description | in | require | type | schema |
|---|---|---|---|---|---|
| page | 页码 | query | true | integer(int32) | |
| pageSize | 每页数量 | query | true | integer(int32) | |
| FP-API-KEY | 填写商户API KEY | header | false | ||
| FP-SIGN | 填写对请求参数的签名 | header | false | ||
| FP-TIMESTAMP | 填写签名时的时间戳 | header | false | ||
| status | PROCESSING/FINISHED/ERROR | query | false | string | |
| startTime | 时间戳,单位秒 | query | false | string | |
| endTime | 时间戳,单位秒 | query | false | string |
Status:
| code | description | schema |
|---|---|---|
| 200 | OK | SettlementHistoryResponse |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response Params:
| name | description | type | schema |
|---|---|---|---|
| data | array | SettlementOrderResponse | |
| amount | string | ||
| createTime | integer(int64) | ||
| currency | 可用值:BNB,BTC,ETH,MATIC,TRX,USD,USDC,USDT | string | |
| depositOrderList | array | string | |
| errorMsg | string | ||
| finishedTime | integer(int64) | ||
| id | string | ||
| status | 可用值:ERROR,FINISHED,PROCESSING | string | |
| page | integer(int32) | integer(int32) | |
| pageSize | integer(int32) | integer(int32) | |
| total | integer(int64) | integer(int64) |
Response Example:
{
"data": [
{
"amount": "",
"createTime": 0,
"currency": "ETH/BNB/TRX/USDT/USDC/USD",
"depositOrderList": [],
"errorMsg": "",
"finishedTime": 0,
"id": "",
"status": ""
}
],
"page": 0,
"pageSize": 0,
"total": 0
}
08.回调模板
回调给商家接口(demo)
url:/demo/callback
method:POST
produces:application/x-www-form-urlencoded,application/json
consumes:*/*
Note:
当商户接受到请求并处理完成后,返回字符串“OK”即可。
Example:
{
"address": "",
"amount": "",
"amountUsd": "",
"chain": "ETH/BSC/TRON",
"createTime": 0,
"finishedTime": 0,
"fromAddress": "",
"id": "",
"merchantAddressId": "",
"merchantOrderId": "",
"orderModeStatus": "",
"status": "",
"token": "USDT",
"txHash": "",
"txList": []
}
Params:
| name | description | in | require | type | schema |
|---|---|---|---|---|---|
| callbackDemoDto | CallbackDemoDto | body | true | CallbackDemoDto | CallbackDemoDto |
| address | true | string | |||
| amount | true | string | |||
| amountUsd | true | string | |||
| chain | false | string | |||
| createTime | false | integer(int64) | |||
| finishedTime | false | integer(int64) | |||
| fromAddress | true | string | |||
| id | 充值订单号 | false | string | ||
| merchantAddressId | 如果是固定地址的充值订单,则会返回与此固定地址绑定的商户关联ID | false | string | ||
| merchantOrderId | 商户订单id | false | string | ||
| orderModeStatus | 可用值:CREATED,FINISHED,PARTIALLY_PAID,TIMEOUT | false | string | ||
| status | 只有当状态为FINISHED、ERROR、INSUFFICIENT_AMOUNT、TIMEOUT时, 才会回调给商户(PROCESSING时不会回调) TIMEOUT仅出现于一次性钱包地址的情况 ,可用值:ERROR,FINISHED,INSUFFICIENT_AMOUNT,PROCESSING,TIMEOUT |
false | string | ||
| token | false | string | |||
| txHash | true | string | |||
| txList | true | array | string | ||
| FP-API-KEY | 填写商户API KEY | header | false | ||
| FP-SIGN | 填写对请求参数的签名 | header | false | ||
| FP-TIMESTAMP | 填写签名时的时间戳 | header | false |
Status:
| code | description | schema |
|---|---|---|
| 200 | OK | |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
Response Params:
None
Response Example: