受け取れる資産
LightningはBTC用で、ステーブルコインやオンチェーン送金は受け取りません。各リクエストには金額、支払いハッシュ、期限があり、請求額の全額を支払います。
Bitcoinのオンチェーン決済ストアを設定しよう
設定 → チェーン接続でHTTPSのLNDかWSSのNWCを追加し、お店で有効にしよう。公開接続先が必要で、LAN専用やTor専用のアドレスは直接使えません。
認証情報と資金の管理
受取専用の限定権限を使い、LNDの管理者用・送金用macaroonは使わないでね。NWCは接続方式であり保管方式ではありません。誰が鍵を持つか確認しよう。
支払いの受取先
QRはBitcoinアドレスではなくBOLT11請求書です。オンチェーンで支払わないでね。期限切れなら新規作成が必要で、単純に期限延長はできません。
いつ支払いが完了する?
Wholly Cryptoは接続ウォレットが報告する決済を検証します。未払い請求書や保留HTLCは支払いではありません。Lightning入金にブロック確認や公開エクスプローラーリンクはありません。
準備ができたら資金を移そう
送金、チャネル流動性、バックアップは外部ウォレットやノードで管理しよう。オンチェーンスイープはLightning残高を移せず、プロジェクトのエクスポートは外部ウォレットのバックアップにもなりません。
Lightningウォレットガイド支払いのトラブル対処
経路が見つからなければ受取流動性、ウォレットの稼働、期限を確認しよう。正常なAPIでも経路は保証されません。結果不明なら決済状態を確認してから再試行をお願いしてね。
手数料と検証
標準の処理手数料は請求書の法定通貨額の1%で、別のクレジット残高から引かれます。適用されるのは割り当て済みの料率です。ネットワークとサーバーの費用は別です。
公開プロバイダーには障害やリクエスト制限があります。送信済みの取引や戻り先への転送は支払いの証明ではありません。検証済みの請求書ステータスと署名付き通知を使ってね。
処理クレジット API・IPN・Webhook為替計算機
金額を換算
概算であり、支払いの見積もりではありません。ネットワーク手数料、取引所手数料、加盟店のスプレッドは含みません。
レートの出典は?
暗号資産の概算にはキャッシュ済みの Kraken 公開価格を使い、利用可能な場合は Binance も使います。一部の Binance 価格は USDT を USD の基準にします。法定通貨は Frankfurter の日次参考レートで、リアルタイムの取引価格ではありません。
スナップショットは自動更新されます。結果の下にある出典の日付を確認してください。入力額はブラウザー内にとどまります。資産の掲載は決済対応を保証しません。
APIで請求書を作る
サーバー上で実行し、APIホスト・プロジェクトID・ストアIDを置き換えよう。認証情報は秘密に。金額は10進数の文字列です。
まずストアで有効にしよう。選択は有効な方法の絞り込みで、資産の追加ではありません。一致しなければストアの既定値になります。決済画面を出す前に返された方法を確認してね。
: "${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": "bitcoin",
"payment_rail": "lightning"
}
]
}'// 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": "bitcoin",
"payment_rail": "lightning"
}
]
}`;
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": "bitcoin",
"payment_rail": "lightning"
}
]
}
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": "bitcoin",
"payment_rail": "lightning"
}
]
}""".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))