Вышел Модуль интеграций 2.0 для MedusaЧитать анонс
Bitcoin Lightning через CLINK logo

Bitcoin Lightning через CLINK

Платёжный модуль Bitcoin Lightning для Medusa через протокол CLINK

npm install medusa-plugin-bitcoin-lightning-via-clink
Категория
Платежи
Создано
Woompaloompa
Регионы
Во всех регионах
Сервис
CLINK
Версия
1.0.2
Ежемесячные загрузки
83
Последнее обновление

Индекс качества

2/4
  • Безопасность, Пройдено5/5
    • Нет скриптов установки, Пройдено
    • Нет известных уязвимостей, Пройдено
    • Нет сообщений о вредоносном коде, Пройдено
    • Нет секретов в пакете, Пройдено
    • Нет обфускации, Пройдено
  • Совместимость, Не проверено1/5 · не проверено: 4
    • Диапазоны версий Medusa, Пройдено
    • Чистая установкаНе проверено
    • СборкаНе проверено
    • МиграцииНе проверено
    • ЗапускНе проверено
    • Мы ещё не устанавливали этот плагин в тестовый проект Medusa.
  • Сопровождение, Не пройдено3/5 · не проверено: 1
    • Публичный репозиторий, Пройдено
    • Свежий релиз, Пройдено
    • Нет отставания от MedusaНе проверено
    • Тесты в CI, Не пройденоВ репозитории нет CI, который запускает тесты.
    • Открытая лицензия, Пройдено
  • Документация, Пройдено3/3
    • Инструкция по установке, Пройдено
    • Английский язык, Пройдено
    • Переменные окружения, Пройдено

Версия 1.0.2 проверена на Medusa 2.23.1 (1 дек. 2026 г.). Как Gorgo проверяет плагины →

Зрелость

Первый стабильный релиз 22 июл. 2026 г., 3 версии, релизы в 2 из последних 12 месяцев. Как Gorgo оценивает зрелость →

icon

Bitcoin Lightning payment module for MedusaJS eCommerce via the CLINK protocol.

npm version License: GPL v3 Medusa v2 CLINK

Features

  • ⚡ Lightning Payments - Accept Bitcoin Lightning payments via CLINK protocol
  • 🔒 Self-Custodial - Your node, your funds, no third-party
  • 🌐 Nostr-Native - All communication via Nostr relays, no web server needed
  • 💱 Auto Conversion - CoinGecko, Kraken, Fixed rate, or Manual
  • 🔄 Subscriptions - Auto-renewal via CLINK Debits (nDebit)
  • 📱 QR + Copy - Beautiful QR codes with one-click copy for invoices
  • 🔐 Privacy - Ephemeral Nostr keys for payment requests
  • 🛡️ Dual Confirmation - Webhook (primary) + Polling (backup)
  • 📊 Admin Dashboard - Configure everything from the Medusa admin panel

What's in the Box

ComponentDescription
Core payment provider with CLINK SDK integration
Fiat-to-sats conversion (CoinGecko, Kraken, Fixed, Manual)
Recurring payments via nDebit protocol
Admin Settings WidgetConfigure noffer, currency source, subscriptions, refunds
Storefront ComponentQR code + copy + countdown timer + payment status polling
Webhook EndpointReal-time payment confirmations from CLINK relay
Status EndpointBackup polling for payment verification

Quick Start

1. Install

2. Configure

Add to your :

3. Enable in Admin

  1. Go to Settings > Regions
  2. Edit your region
  3. Enable Lightning (CLINK) as a payment provider

4. Accept Payments!

Customers can now pay with Lightning at checkout.

Documentation

Full documentation lives on the GitHub Wiki:

How It Works

No web server needed for your Lightning node. All communication flows over Nostr. See the Wiki architecture page for the full data flow.

Requirements

Configuration Options

OptionTypeRequiredDefaultDescription
stringYes-Your CLINK offer string
stringNoExchange rate source
numberNo-Fixed BTC rate (if using source)
numberNoInvoice expiry in seconds
numberNoPolling interval in ms
booleanNoEnable nDebit subscriptions
stringOnly for subscriptions-Merchant Nostr pubkey (64-hex); required when
stringNo-HMAC secret to verify webhook payloads (see Security below)
stringNo-Merchant email for refunds
stringNo-Merchant Nostr for refunds
booleanNoEnable debug logging

Security

v1.0.2 hardened the plugin against common payment and network attacks:

  • BOLT11 validation - Invoices returned by your node are validated before being shown to customers: mainnet prefix, amount matches the requested total, and a reasonable expiry. Invalid invoices are rejected and the payment session is failed.
  • SSRF protection - Relay URLs are validated ( only) and IP addresses are checked for safety. Localhost, domains, private/loopback/CGNAT/link-local IPs, and unsafe IPv6 ranges (ULA, link-local, multicast, IPv4-mapped) are rejected.
  • Webhook signature verification - Confirmations sent to the webhook endpoint are verified with an HMAC-SHA256 signature before the order is confirmed. Set a shared secret and the plugin will reject unsigned or tampered webhooks.
  • nDebit validation - Subscription debit pointers are decoded and validated (pubkey, relay) before use. A correlation key ties each debit request to the originating subscription.
  • Payment hash correlation - The webhook verifies the payment's matches the expected session before confirming the order.

Webhook secret

Two ways to set it (env var takes precedence):

If no secret is configured, webhook signatures are not checked (single-tenant setups behind a firewall). Configure one in production. See the Configuration Wiki page for details.

See the Configuration Wiki page for details on each option.

Supported Wallets

For Merchants (to get your ):

For Customers (to pay):

Development

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for details.

License

GPL-3.0 - See LICENSE for details.

Support

Other Conversations