你可以接收什么
使用 BNB Smart Chain 及已验证 EVM 代币合约,通常称为 BEP-20。这不是原来的 Beacon Chain。手续费使用 BNB,而非 ETH。
设置你的商店
- 安装 Wholly Crypto,创建项目和商店,并妥善保管钱包备份。
- 检查扫描器兼容的连接,并在 Store → Payment methods 中启用链和要接收的资产。
- 设置确认数和有效期。先用小额账单测试,确认支付已结算后再履行订单。
付款会到哪里
账单使用独立的收款地址。常见的 0x 地址不能标识网络,客户必须选择 BNB Smart Chain,而不是 Ethereum 或原来的 Beacon Chain。
钱包设置指南准备好后再转出资金
通过手动发送或自动归集合并收款。每个来源地址都需要 BNB 才能发送代币。项目补 gas 可在限额内提供帮助,但 Ethereum 上的 ETH 不能支付这些费用。
自动归集教程代币名称一样就能接收吗?
不行。请核对准确的 BNB Smart Chain 合约和发行方。跨链或封装版本是独立资产,有各自的风险。只启用你确实想接收的已验证合约。
付款问题排查
先检查此网络
选择 BNB Smart Chain,而非 Ethereum 或 Beacon Chain。相同 0x 地址不代表跨链转账。发送代币需要此网络的 BNB。
费用和验证
默认处理费为账单法币金额的 1%,从单独的预付余额扣除,实际以分配给你的费率为准。网络费用和服务器成本另计。
公共服务商可能中断或限制请求。提交交易或跳回商店并不能证明已付款,请以验证后的账单状态和签名通知为准。
处理额度 API、IPN 与 Webhook汇率计算器
换算金额
这是估算,不是付款报价。不含网络手续费、交易所费用或商户加价。
汇率来自哪里?
加密货币估算使用缓存的 Kraken 公共价格,并在可用时使用 Binance。部分 Binance 价格以 USDT 作为美元参考。法币汇率来自 Frankfurter,为每日参考汇率,并非实时交易报价。
快照自动刷新。请检查结果下方的来源日期。输入的金额只保留在浏览器中。列出某项资产不保证支持该资产付款。
通过 API 创建账单
在服务器上运行示例,替换 API 主机、项目 ID 和店铺 ID,并保密凭据。金额使用十进制字符串。
先在店铺启用付款方式。筛选只缩小已启用的范围,不添加资产。没有匹配时使用店铺默认方式。展示收银台前请检查返回结果。
: "${WHOLLY_TOKEN:?Set WHOLLY_TOKEN to your server-side API token}"
# Keep this key and the exact body for retries; use a new key for each new invoice.
curl --fail-with-body --max-time 30 \
--request POST \
--url "https://api.example.com/v1/projects/YOUR_PROJECT_ID/stores/YOUR_STORE_ID/invoices" \
--header "Authorization: Bearer $WHOLLY_TOKEN" \
--header 'Idempotency-Key: order-1042-attempt-1' \
--header 'Content-Type: application/json' \
--data-raw '{
"amount": "25.00",
"currency": "EUR",
"order_id": "order-1042",
"payment_methods": [
{
"chain_slug": "bnb-chain",
"asset_tickers": [
"BNB"
]
}
]
}'// Node.js 18+ · run on your server, never in browser code.
const token = process.env.WHOLLY_TOKEN;
if (!token) throw new Error("Set WHOLLY_TOKEN");
// Keep this key and the exact body for retries; use a new key for each new invoice.
const body = `{
"amount": "25.00",
"currency": "EUR",
"order_id": "order-1042",
"payment_methods": [
{
"chain_slug": "bnb-chain",
"asset_tickers": [
"BNB"
]
}
]
}`;
const response = await fetch("https://api.example.com/v1/projects/YOUR_PROJECT_ID/stores/YOUR_STORE_ID/invoices", {
method: "POST",
headers: {
"Authorization": `Bearer ${token}`,
"Idempotency-Key": "order-1042-attempt-1",
"Content-Type": "application/json"
},
body,
redirect: "error",
signal: AbortSignal.timeout(30000)
});
if (!response.ok) throw new Error(`HTTP ${response.status}: ${await response.text()}`);
console.log(await response.json());<?php
// PHP 8+ with the cURL extension; run on your server.
$token = getenv('WHOLLY_TOKEN');
if (!$token) { throw new RuntimeException('Set WHOLLY_TOKEN'); }
// Keep this key and the exact body for retries; use a new key for each new invoice.
$body = <<<'JSON'
{
"amount": "25.00",
"currency": "EUR",
"order_id": "order-1042",
"payment_methods": [
{
"chain_slug": "bnb-chain",
"asset_tickers": [
"BNB"
]
}
]
}
JSON;
$ch = curl_init("https://api.example.com/v1/projects/YOUR_PROJECT_ID/stores/YOUR_STORE_ID/invoices");
curl_setopt_array($ch, [
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_FOLLOWLOCATION => false,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTPHEADER => ['Authorization: Bearer ' . $token, "Idempotency-Key: order-1042-attempt-1", "Content-Type: application/json"],
CURLOPT_POSTFIELDS => $body,
]);
$response = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
if ($response === false) { throw new RuntimeException(curl_error($ch)); }
curl_close($ch);
if ($status < 200 || $status >= 300) { throw new RuntimeException("HTTP $status: $response"); }
print_r(json_decode($response, true, 512, JSON_THROW_ON_ERROR));# Python 3 · standard library; run on your server.
import json
import os
from urllib.request import Request, build_opener, HTTPRedirectHandler
class NoRedirect(HTTPRedirectHandler):
def redirect_request(self, req, fp, code, msg, headers, newurl):
return None
# Keep this key and the exact body for retries; use a new key for each new invoice.
headers = {
"Idempotency-Key": "order-1042-attempt-1",
"Content-Type": "application/json"
}
headers["Authorization"] = "Bearer " + os.environ["WHOLLY_TOKEN"]
body = """{
"amount": "25.00",
"currency": "EUR",
"order_id": "order-1042",
"payment_methods": [
{
"chain_slug": "bnb-chain",
"asset_tickers": [
"BNB"
]
}
]
}""".encode("utf-8")
request = Request("https://api.example.com/v1/projects/YOUR_PROJECT_ID/stores/YOUR_STORE_ID/invoices",
method="POST", headers=headers, data=body)
# Non-2xx responses raise HTTPError. Do not retry writes with a new key.
with build_opener(NoRedirect()).open(request, timeout=30) as response:
print(json.load(response))