结算发起
curl --request POST \
--url https://sandbox-pay.epay123.net/api/channelbiz/cbcoinpay/settleRequest \
--header 'Content-Type: application/json' \
--data '
{
"version": "1.0.1",
"signType": "MD5",
"sign": "xxxxxx",
"reqTime": "1622016572190",
"mchNo": "M1234567890",
"appId": "88808634c46ff1a7807888888",
"requestId": "BIZ1234567890",
"amount": 1000,
"tokenId": "TRON_USDT",
"payoutChannel": "Crypto",
"currency": "USD",
"notifyUrl": "https://xxx/notify",
"addrServerRequestId": "ADDR1234567890",
"address": "TX1234567890",
"bankServerRequestId": "BANK1234567890",
"bankName": "Bank Of US",
"bankAccount": "1234567890"
}
'import requests
url = "https://sandbox-pay.epay123.net/api/channelbiz/cbcoinpay/settleRequest"
payload = {
"version": "1.0.1",
"signType": "MD5",
"sign": "xxxxxx",
"reqTime": "1622016572190",
"mchNo": "M1234567890",
"appId": "88808634c46ff1a7807888888",
"requestId": "BIZ1234567890",
"amount": 1000,
"tokenId": "TRON_USDT",
"payoutChannel": "Crypto",
"currency": "USD",
"notifyUrl": "https://xxx/notify",
"addrServerRequestId": "ADDR1234567890",
"address": "TX1234567890",
"bankServerRequestId": "BANK1234567890",
"bankName": "Bank Of US",
"bankAccount": "1234567890"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
version: '1.0.1',
signType: 'MD5',
sign: 'xxxxxx',
reqTime: '1622016572190',
mchNo: 'M1234567890',
appId: '88808634c46ff1a7807888888',
requestId: 'BIZ1234567890',
amount: 1000,
tokenId: 'TRON_USDT',
payoutChannel: 'Crypto',
currency: 'USD',
notifyUrl: 'https://xxx/notify',
addrServerRequestId: 'ADDR1234567890',
address: 'TX1234567890',
bankServerRequestId: 'BANK1234567890',
bankName: 'Bank Of US',
bankAccount: '1234567890'
})
};
fetch('https://sandbox-pay.epay123.net/api/channelbiz/cbcoinpay/settleRequest', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox-pay.epay123.net/api/channelbiz/cbcoinpay/settleRequest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'version' => '1.0.1',
'signType' => 'MD5',
'sign' => 'xxxxxx',
'reqTime' => '1622016572190',
'mchNo' => 'M1234567890',
'appId' => '88808634c46ff1a7807888888',
'requestId' => 'BIZ1234567890',
'amount' => 1000,
'tokenId' => 'TRON_USDT',
'payoutChannel' => 'Crypto',
'currency' => 'USD',
'notifyUrl' => 'https://xxx/notify',
'addrServerRequestId' => 'ADDR1234567890',
'address' => 'TX1234567890',
'bankServerRequestId' => 'BANK1234567890',
'bankName' => 'Bank Of US',
'bankAccount' => '1234567890'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox-pay.epay123.net/api/channelbiz/cbcoinpay/settleRequest"
payload := strings.NewReader("{\n \"version\": \"1.0.1\",\n \"signType\": \"MD5\",\n \"sign\": \"xxxxxx\",\n \"reqTime\": \"1622016572190\",\n \"mchNo\": \"M1234567890\",\n \"appId\": \"88808634c46ff1a7807888888\",\n \"requestId\": \"BIZ1234567890\",\n \"amount\": 1000,\n \"tokenId\": \"TRON_USDT\",\n \"payoutChannel\": \"Crypto\",\n \"currency\": \"USD\",\n \"notifyUrl\": \"https://xxx/notify\",\n \"addrServerRequestId\": \"ADDR1234567890\",\n \"address\": \"TX1234567890\",\n \"bankServerRequestId\": \"BANK1234567890\",\n \"bankName\": \"Bank Of US\",\n \"bankAccount\": \"1234567890\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox-pay.epay123.net/api/channelbiz/cbcoinpay/settleRequest")
.header("Content-Type", "application/json")
.body("{\n \"version\": \"1.0.1\",\n \"signType\": \"MD5\",\n \"sign\": \"xxxxxx\",\n \"reqTime\": \"1622016572190\",\n \"mchNo\": \"M1234567890\",\n \"appId\": \"88808634c46ff1a7807888888\",\n \"requestId\": \"BIZ1234567890\",\n \"amount\": 1000,\n \"tokenId\": \"TRON_USDT\",\n \"payoutChannel\": \"Crypto\",\n \"currency\": \"USD\",\n \"notifyUrl\": \"https://xxx/notify\",\n \"addrServerRequestId\": \"ADDR1234567890\",\n \"address\": \"TX1234567890\",\n \"bankServerRequestId\": \"BANK1234567890\",\n \"bankName\": \"Bank Of US\",\n \"bankAccount\": \"1234567890\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-pay.epay123.net/api/channelbiz/cbcoinpay/settleRequest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"version\": \"1.0.1\",\n \"signType\": \"MD5\",\n \"sign\": \"xxxxxx\",\n \"reqTime\": \"1622016572190\",\n \"mchNo\": \"M1234567890\",\n \"appId\": \"88808634c46ff1a7807888888\",\n \"requestId\": \"BIZ1234567890\",\n \"amount\": 1000,\n \"tokenId\": \"TRON_USDT\",\n \"payoutChannel\": \"Crypto\",\n \"currency\": \"USD\",\n \"notifyUrl\": \"https://xxx/notify\",\n \"addrServerRequestId\": \"ADDR1234567890\",\n \"address\": \"TX1234567890\",\n \"bankServerRequestId\": \"BANK1234567890\",\n \"bankName\": \"Bank Of US\",\n \"bankAccount\": \"1234567890\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "成功",
"data": {
"serverRequestId": "1234567890",
"status": 0
},
"sign": "<string>"
}钱包结算接口
结算发起
商户通过此接口发起结算请求,将可用余额结算至已申报的地址。
POST
/
api
/
channelbiz
/
cbcoinpay
/
settleRequest
结算发起
curl --request POST \
--url https://sandbox-pay.epay123.net/api/channelbiz/cbcoinpay/settleRequest \
--header 'Content-Type: application/json' \
--data '
{
"version": "1.0.1",
"signType": "MD5",
"sign": "xxxxxx",
"reqTime": "1622016572190",
"mchNo": "M1234567890",
"appId": "88808634c46ff1a7807888888",
"requestId": "BIZ1234567890",
"amount": 1000,
"tokenId": "TRON_USDT",
"payoutChannel": "Crypto",
"currency": "USD",
"notifyUrl": "https://xxx/notify",
"addrServerRequestId": "ADDR1234567890",
"address": "TX1234567890",
"bankServerRequestId": "BANK1234567890",
"bankName": "Bank Of US",
"bankAccount": "1234567890"
}
'import requests
url = "https://sandbox-pay.epay123.net/api/channelbiz/cbcoinpay/settleRequest"
payload = {
"version": "1.0.1",
"signType": "MD5",
"sign": "xxxxxx",
"reqTime": "1622016572190",
"mchNo": "M1234567890",
"appId": "88808634c46ff1a7807888888",
"requestId": "BIZ1234567890",
"amount": 1000,
"tokenId": "TRON_USDT",
"payoutChannel": "Crypto",
"currency": "USD",
"notifyUrl": "https://xxx/notify",
"addrServerRequestId": "ADDR1234567890",
"address": "TX1234567890",
"bankServerRequestId": "BANK1234567890",
"bankName": "Bank Of US",
"bankAccount": "1234567890"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
version: '1.0.1',
signType: 'MD5',
sign: 'xxxxxx',
reqTime: '1622016572190',
mchNo: 'M1234567890',
appId: '88808634c46ff1a7807888888',
requestId: 'BIZ1234567890',
amount: 1000,
tokenId: 'TRON_USDT',
payoutChannel: 'Crypto',
currency: 'USD',
notifyUrl: 'https://xxx/notify',
addrServerRequestId: 'ADDR1234567890',
address: 'TX1234567890',
bankServerRequestId: 'BANK1234567890',
bankName: 'Bank Of US',
bankAccount: '1234567890'
})
};
fetch('https://sandbox-pay.epay123.net/api/channelbiz/cbcoinpay/settleRequest', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sandbox-pay.epay123.net/api/channelbiz/cbcoinpay/settleRequest",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'version' => '1.0.1',
'signType' => 'MD5',
'sign' => 'xxxxxx',
'reqTime' => '1622016572190',
'mchNo' => 'M1234567890',
'appId' => '88808634c46ff1a7807888888',
'requestId' => 'BIZ1234567890',
'amount' => 1000,
'tokenId' => 'TRON_USDT',
'payoutChannel' => 'Crypto',
'currency' => 'USD',
'notifyUrl' => 'https://xxx/notify',
'addrServerRequestId' => 'ADDR1234567890',
'address' => 'TX1234567890',
'bankServerRequestId' => 'BANK1234567890',
'bankName' => 'Bank Of US',
'bankAccount' => '1234567890'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox-pay.epay123.net/api/channelbiz/cbcoinpay/settleRequest"
payload := strings.NewReader("{\n \"version\": \"1.0.1\",\n \"signType\": \"MD5\",\n \"sign\": \"xxxxxx\",\n \"reqTime\": \"1622016572190\",\n \"mchNo\": \"M1234567890\",\n \"appId\": \"88808634c46ff1a7807888888\",\n \"requestId\": \"BIZ1234567890\",\n \"amount\": 1000,\n \"tokenId\": \"TRON_USDT\",\n \"payoutChannel\": \"Crypto\",\n \"currency\": \"USD\",\n \"notifyUrl\": \"https://xxx/notify\",\n \"addrServerRequestId\": \"ADDR1234567890\",\n \"address\": \"TX1234567890\",\n \"bankServerRequestId\": \"BANK1234567890\",\n \"bankName\": \"Bank Of US\",\n \"bankAccount\": \"1234567890\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sandbox-pay.epay123.net/api/channelbiz/cbcoinpay/settleRequest")
.header("Content-Type", "application/json")
.body("{\n \"version\": \"1.0.1\",\n \"signType\": \"MD5\",\n \"sign\": \"xxxxxx\",\n \"reqTime\": \"1622016572190\",\n \"mchNo\": \"M1234567890\",\n \"appId\": \"88808634c46ff1a7807888888\",\n \"requestId\": \"BIZ1234567890\",\n \"amount\": 1000,\n \"tokenId\": \"TRON_USDT\",\n \"payoutChannel\": \"Crypto\",\n \"currency\": \"USD\",\n \"notifyUrl\": \"https://xxx/notify\",\n \"addrServerRequestId\": \"ADDR1234567890\",\n \"address\": \"TX1234567890\",\n \"bankServerRequestId\": \"BANK1234567890\",\n \"bankName\": \"Bank Of US\",\n \"bankAccount\": \"1234567890\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox-pay.epay123.net/api/channelbiz/cbcoinpay/settleRequest")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"version\": \"1.0.1\",\n \"signType\": \"MD5\",\n \"sign\": \"xxxxxx\",\n \"reqTime\": \"1622016572190\",\n \"mchNo\": \"M1234567890\",\n \"appId\": \"88808634c46ff1a7807888888\",\n \"requestId\": \"BIZ1234567890\",\n \"amount\": 1000,\n \"tokenId\": \"TRON_USDT\",\n \"payoutChannel\": \"Crypto\",\n \"currency\": \"USD\",\n \"notifyUrl\": \"https://xxx/notify\",\n \"addrServerRequestId\": \"ADDR1234567890\",\n \"address\": \"TX1234567890\",\n \"bankServerRequestId\": \"BANK1234567890\",\n \"bankName\": \"Bank Of US\",\n \"bankAccount\": \"1234567890\"\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"msg": "成功",
"data": {
"serverRequestId": "1234567890",
"status": 0
},
"sign": "<string>"
}Body
application/json
结算发起请求参数
版本号
Example:
"1.0.1"
签名类型,目前只支持MD5方式
Example:
"MD5"
签名值,详见签名算法
Example:
"xxxxxx"
时间戳,13位时间戳
Example:
"1622016572190"
商户号
Example:
"M1234567890"
商户应用ID
Example:
"88808634c46ff1a7807888888"
请求ID
Example:
"BIZ1234567890"
加密货币/法币金额,单位分
Example:
1000
结算币种ID
Example:
"TRON_USDT"
结算提现方式:加密提币Crypto/法币出金OffRamp,API方式暂且仅支持Crypto
Example:
"Crypto"
法币,目前仅支持USD
Example:
"USD"
回调地址
Example:
"https://xxx/notify"
加密货币申请ID, Crypto结算方式时与address必传其一
Example:
"ADDR1234567890"
提币地址, Crypto结算方式时与addrServerRequestId必传其一
Example:
"TX1234567890"
法币银行申请ID, OffRamp结算方式时bankServerRequestId与bankName+bankAccount必传其一
Example:
"BANK1234567890"
法币银行, OffRamp结算方式时bankServerRequestId与bankName+bankAccount必传其一
Example:
"Bank Of US"
法币银行账号, OffRamp结算方式时bankServerRequestId与bankName+bankAccount必传其一
Example:
"1234567890"
