你可以接收什么
使用 Avalanche C-Chain。X-Chain 和 P-Chain 是不同网络,不属于此结账方式。C-Chain 代币转账需要 AVAX 支付手续费。
设置你的商店
- 安装 Wholly Crypto,创建项目和商店,并妥善保管钱包备份。
- 检查扫描器兼容的连接,并在 Store → Payment methods 中启用链和要接收的资产。
- 设置确认数和有效期。先用小额账单测试,确认支付已结算后再履行订单。
付款会到哪里
每张账单使用独立收款地址。保留完整备份、地址列表和派生信息;导入的钱包可能不会立即发现所有地址。
钱包设置指南准备好后再转出资金
支持原生币和已验证 ERC-20 的手动发送及自动归集。每个代币来源地址都需要本网络原生币支付 gas。项目可在限额内为符合条件的地址补充 gas。
自动归集教程付款问题排查
先检查此网络
选择 Avalanche C-Chain,而非 X-Chain 或 P-Chain。发送代币需要 C-Chain 上的 AVAX,其他链的质押余额不能支付 gas。
费用和验证
默认处理费为账单法币金额的 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": "avalanche",
"asset_tickers": [
"AVAX"
]
}
]
}'// 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": "avalanche",
"asset_tickers": [
"AVAX"
]
}
]
}`;
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": "avalanche",
"asset_tickers": [
"AVAX"
]
}
]
}
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": "avalanche",
"asset_tickers": [
"AVAX"
]
}
]
}""".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))