ノンカストディアル決済
USDT / USDCは加盟店ウォレットへ直接送金され、BoltUtilが資金や秘密鍵を保管することはありません。
導入ガイド
実稼働 USDT / USDC チェックアウトにはウォレット アドレス以上のものが必要です。 Node.js から注文を作成し、チェックアウト データをブラウザーに返し、オンチェーン支払い Webhook が検証された後にのみ履行します。
手順
Node.js を使用した Web サイトで USDT / USDC 支払いを受け入れる方法
バックエンドから金額、ネットワーク、外部注文IDを指定して決済注文を作成します。
購入者に決済URL、ネットワーク、受取アドレス、QRコード、正確なUSDT / USDC金額を表示します。
BoltUtilがネットワーク、トークンコントラクト、宛先、金額、有効期限、承認数を確認します。
支払い確認後、Webhook署名を検証し、冪等に商品やサービスを提供します。
BoltUtil は支払いを照合し、署名付きコールバックを送信します。加盟店のサーバーで署名と注文状態を確認し、重複処理を防いでから納品・開通・入金処理を行います。
>統合に関するメモ
USDT / USDCは加盟店ウォレットへ直接送金され、BoltUtilが資金や秘密鍵を保管することはありません。
TRON、Ethereum、BNB Smart Chain、Polygon、Solana、Base に対応。TRON は USDT / USDC のみ。その他の USDT / USDC 決済も、資産の有効化と有効な受取ウォレットが必要です。
HMAC署名、タイムスタンプ、再送ログにより、安全な決済後処理を実装できます。
import crypto from 'node:crypto'
// Node.js 20+ server module. Call only after authenticating the buyer.
// order must come from your database, with ownership and price checked.
// Never pass req.body directly; persist externalOrderId before calling.
export async function createStablecoinCheckout(order) {
const key = process.env.BOLTUTIL_API_KEY
const secret = process.env.BOLTUTIL_API_SECRET
if (!key || !secret) throw new Error('Missing server credentials')
const payload = JSON.stringify({
externalOrderId: order.externalOrderId,
amount: order.amount,
currency: 'USDC',
network: 'BASE',
notifyUrl: 'https://merchant.com/webhooks/boltutil',
returnUrl: 'https://merchant.com/orders/complete'
})
const timestamp = Date.now().toString()
const signature = crypto.createHmac('sha256', secret)
.update(`${timestamp}.${payload}`).digest('hex')
// A timeout does not prove creation failed. Query order/status using
// the SAME externalOrderId before deciding whether to retry.
const response = await fetch('https://api.boltutil.com/api/v1/order/create', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-Bolt-Key': key,
'X-Bolt-Timestamp': timestamp,
'X-Bolt-Signature': signature
},
body: payload,
signal: AbortSignal.timeout(10000)
})
const result = await response.json()
if (!response.ok || result.code !== 200 || !result.data?.checkoutUrl) {
throw new Error('Create order failed; reconcile the saved order')
}
// Save result.data on the server. Return only checkout data to the buyer.
return result.data
}導入・調査用の例です。リクエストは送信されません。注文データ、ネットワーク設定、API ドキュメントを確認してください。
API ドキュメントを読むAPIキーをブラウザーへ公開せず、決済画面を表示する前に外部注文IDを保存します。
アドレスだけでなく、TRC20、ERC20、BEP20、Polygon、Solanaのどれを使うか明示します。
戻り先URLは支払い証明ではありません。署名付きWebhookかサーバー側の状態照会を使用します。
導入ガイド
いいえ。資金は加盟店ウォレットへ直接送られ、BoltUtilは送金を監視して通知します。
ネットワーク、トークン、宛先、正確な金額、注文状態、有効期限を確認します。
TRON は USDT のみ対応します。Ethereum、BNB Smart Chain、Polygon、Solana、Base は設定された USDT / USDC に対応します。利用可否は有効なチャネルと加盟店ウォレットによります。
顧客にスクリーンショットの送信を依頼することなく、注文を作成し、転送を監視し、バックエンドに通知します。