从注册到收款、提现的完整说明,以及商户 API 的字段与错误码。
开发者平台让第三方产品接入 VavaCoin 的 USDT(TRC20)收款能力。你的应用通过商户 API 创建收款单,用户按精确金额链上转账;网络确认后资金计入你的开发者余额。你可以随时申请提现,平台审核后链上打款到你绑定的 TRC20 地址。
用户付款(USDT/TRC20,精确金额匹配)
│ PayHub 链上轮询确认
▼
开发者平台入账(余额 +,写流水)──签名回调──▶ 你的 notify_url
│
你的应用 / 控制台 ──申请提现──▶ 平台审核 ──链上打款──▶ 你绑定的 TRC20 地址
基础地址:https://vavacoin.valzexa.com/dev/api/v1(HMAC 签名鉴权)
bodyHash = SHA256(body).hex() // GET: empty body = SHA256("")
message = METHOD + "\n" + path_with_query + "\n" + X-Timestamp + "\n" + bodyHash
signature = HMAC-SHA256(appSecret, message).hex()
Headers: X-Dev-App-ID / X-Timestamp(RFC3339Nano) / X-Signature
A timestamp skew over 5 minutes is rejected; retries must regenerate the timestamp and signature.
{
"out_trade_no": "your-order-1001", // optional; globally unique after platform prefix DV<appid hash>-
"subject": "Pro Plan", // order title
"amount": "9.90", // USD decimal string, $1.00 ~ $1000.00
"notify_url": "https://your.app/api/notify" // optional; polling also supported
}
→ { "code":0, "data":{
"out_trade_no":"DV…", "amount_total":"9.90", "status":"pending",
"pay":{ "address":"T…", "amount":"10.07", "token":"USDT",
"network":"TRC20", "qr_code":"tron:T…?amount=10.07",
"expire_time":"…", "notice":"…" } } }
用户必须按 pay.amount 的精确金额转账(尾数机制用于并发订单区分),金额不符将无法自动入账。
→ { "code":0, "data":{ "out_trade_no":"DV…", "status":"paid",
"amount_total":"9.90", "payhub_status":"paid", "paid_at":"…" } }
status: pending / paid / closed
POST {notify_url}
X-Dev-App-ID: DK… X-Notify-Timestamp: RFC3339Nano
X-Notify-Signature: HMAC-SHA256(appSecret, out_trade_no + "\n" + timestamp + "\n" + SHA256(body))
{ "type":"payment.success", "out_trade_no":"DV…", "app_id":"DK…",
"status":"paid", "amount_total":"9.90", "pay_time":"…" }
→ Return 2xx to acknowledge; otherwise we retry with exponential backoff (up to 10 times). The signing string differs from the merchant API:
message = out_trade_no + "\n" + timestamp + "\n" + SHA256(body)
→ { "code":0, "data":{ "prices":[
{ "symbol":"vvc", "name":"VavaCoin", "price":"0.987396",
"price_micro":987396, "change_bps":489, "ts":… }, … ] } }
All platform coins (VVC/VEN/VPT/VGD/BTC/ETH/USDT) with live price, 24h change and high/low.
{ "from":"usdt", "to":"vvc", "amount":"5.00" } // amount: from-coin quantity, ≤4 decimals
→ { "code":0, "data":{ "credited_out":"5.0193", "rate":1.008922, "fee_bps":50 } }
Executed at the platform live price with a conversion fee; balances are kept per coin; returns 1001 if insufficient.
{ "amount":"2.00", "address":"T…" } // address optional, defaults to bound address (USDT/TRC20)
→ { "code":0, "data":{ "payout_id":3, "status":"pending", "amount_total":"2.00" } }
Request-and-review: funds freeze on request; paid on-chain after review; rejected requests refund automatically.
GET /api/v1/transfers lists transfer (payout) records.
| code | 含义 |
|---|---|
| 0 | 成功 |
| 1001 | 参数错误(金额超出 $1.00 ~ $1000.00 等) |
| 1401 | 鉴权失败(AppID 无效 / 签名错误 / 时间戳过期) |
| 1404 | 订单或资源不存在 |
| 2001 | 下单失败(收款通道异常,可重试) |