EasyPay API 开发文档
欢迎使用 EasyPay 开发者接口。本系统为全球商户提供高性能的数字货币支付(代收)与自动化打款(代付)解决方案。
通过 EasyPay,您可以分钟级集成 USDT、BTC、ETH 等主流加密货币的收款能力,并享受全自动的地址管理与链上监控服务。
身份验证
所有接口请求均需在 JSON Body 中携带 app_id 和 app_secret。这两个参数由平台管理员在后台分配。
INFO 认证参数:app_id (商户ID), app_secret (商户密钥)
请妥善保管您的 app_secret,切勿泄露给第三方或直接在前端 JavaScript 代码中暴露。
统一下单接口 (pay/create)
商户系统通过此接口获取收款地址。系统会根据订单金额自动匹配押金池中的收款账号。
POST https://jbholdem.top/api.php?action=pay/create
请求参数
| 字段名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| app_id | String | 是 | 商户应用 ID |
| app_secret | String | 是 | 商户密钥 |
| order_sn | String | 是 | 商户系统内部订单号 |
| amount | Float | 是 | 订单金额 (法币,如 100.00) |
| pay_type | String | 是 | 支付方式 (固定传 usdt) |
| notify_url | String | 是 | 支付成功后的回调通知地址 |
响应示例
{
"code": 200,
"msg": "success",
"data": {
"order_sn": "EP20260521...",
"out_order_sn": "M20260521001",
"account_no": "TR7NHqfqX3K9fS8oWxPk7s8vSTfRdfG9ea",
"amount": 100.00,
"expire_at": "2026-05-21 23:45:00"
}
}
异步回调通知
当订单在链上确认到账后,EasyPay 会向您的 notify_url 发送 POST 请求。
通知参数
| 字段名 | 说明 | 示例 |
|---|---|---|
| order_sn | EasyPay 系统单号 | EP... |
| out_order_sn | 商户原单号 | M... |
| amount | 到账金额 | 100.00 |
| status | 状态 (2 为成功) | 2 |
注意: 您的接口在处理完成后必须返回纯文本 success,否则系统将认为通知失败并持续重试。
发起代付请求 (withdraw/create)
商户从热钱包向用户地址进行一键打款。此接口为同步执行,成功将直接返回链上交易 Hash (TXID)。
POST https://jbholdem.top/api.php?action=withdraw/create
| 字段名 | 必填 | 说明 |
|---|---|---|
| order_sn | 是 | 提款订单号 (需唯一) |
| amount | 是 | 转账数量 (如 10.5) |
| currency | 是 | 币种 (USDT) |
| network | 是 | 网络 (TRC20) |
| address | 是 | 目标钱包地址 |
示例代码
PHP 接入示例
$data = [
'app_id' => 'YOUR_APP_ID',
'app_secret' => 'YOUR_APP_SECRET',
'order_sn' => time(),
'amount' => 100.00,
'pay_type' => 'usdt',
'notify_url' => 'https://your-site.com/notify'
];
$ch = curl_init('https://jbholdem.top/api.php?action=pay/create');
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
print_r(json_decode($response, true));
Node.js 接入示例
const axios = require('axios');
async function createOrder() {
const res = await axios.post('https://jbholdem.top/api.php?action=pay/create', {
app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET',
order_sn: 'ORD_' + Date.now(),
amount: 100.5,
pay_type: 'usdt',
notify_url: 'https://your-site.com/notify'
});
console.log(res.data);
}