Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion content/medusajs/plugins/_meta.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export default {
"get-started": "Get started",
"available": "Available plugins",
"automations": "Automations",
"notifications": "Notifications"
"notifications": "Notifications",
"bitcoin-lightning-clink": "Bitcoin Lightning (CLINK)"
}

1 change: 1 addition & 0 deletions content/medusajs/plugins/available/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ sidebarTitle: Available plugins
| [Notifications](/medusajs/plugins/notifications/get-started) | Codee Team | Reviewed | Transactional notifications with template system, admin builder, and rendering workflows for email and Slack |
| [Reorder](/medusajs/plugins/reorder/get-started) | Reorder | In Review | Subscription management plugin — billing cycles, automated renewals, dunning, retention flows, and analytics |
| [Avalara](/medusajs/plugins/avalara/get-started) | Avalara | In Review | Official Avalara-certified tax automation plugin for Medusa — real-time tax calculations, order transaction management, and address validation powered by AvaTax API. |
| [Bitcoin Lightning (CLINK)](/medusajs/plugins/bitcoin-lightning-clink/get-started) | WoompaLoompa | In Review | Accept Bitcoin Lightning payments via the CLINK protocol. Self-custodial, instant settlement, subscriptions via nDebit. |
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
---
title: Get started
sidebarTitle: Get started
---

# Bitcoin Lightning (CLINK)

Accept Bitcoin Lightning payments for your Medusa store via the CLINK protocol. Self-custodial, instant settlement, with subscription support via nDebit.

| Field | Details |
|-------|---------|
| **Status** | In Review |
| **Repository** | [github.com/WoompaLoompa/medusa-clink](https://github.com/WoompaLoompa/medusa-clink) |
| **Version** | <StarterVersion repo="WoompaLoompa/medusa-clink" fallback="1.0.0" /> |
| **Author** | [WoompaLoompa](https://github.com/WoompaLoompa) |

## Features

- **Self-Custodial** — Merchant runs their own Lightning node, no third-party custody
- **Instant Settlement** — Payments settle in seconds via Lightning Network
- **No Server Required** — Uses Nostr relays for transport, no web server needed
- **Auto Currency Conversion** — Real-time rates from CoinGecko, Kraken, Fixed, or Manual
- **QR Code + Copy** — Both QR code display and one-click copy for invoices
- **Dual Confirmation** — Webhook (primary) + Polling (backup) for reliable payment detection
- **Subscriptions** — Recurring payments via nDebit (CLINK Debits)
- **Privacy-Preserving** — Ephemeral keys for payment requests

## Compatibility

- **Medusa Version**: `>= 2.0.0`
- **Node Version**: `>= 20`
- **Lightning Node**: Any CLINK-compatible node (e.g., [Lightning.Pub](https://github.com/nicokosi/lightning-pub))

## Installation

### 1. Install the package

```bash
npm install medusa-plugin-bitcoin-lightning-via-clink
# or
yarn add medusa-plugin-bitcoin-lightning-via-clink
```

### 2. Register the plugin

Add to your `medusa-config.ts`:

```typescript
module.exports = defineConfig({
plugins: [
{
resolve: "medusa-plugin-bitcoin-lightning-via-clink",
id: "clink",
options: {
noffer: "noffer1...", // Your CLINK offer string
currencySource: "coingecko", // or "kraken", "fixed", "manual"
},
},
],
})
```

### 3. Configure

1. Go to **Settings > Regions** in your Medusa admin
2. Enable **Lightning (CLINK)** as a payment provider
3. Set your `noffer` string (found in your CLINK-compatible wallet)

## Configuration Options

| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `noffer` | `string` | required | Your CLINK offer string (`noffer1...`) |
| `currencySource` | `string` | `"coingecko"` | Exchange rate provider: `coingecko`, `kraken`, `fixed`, `manual` |
| `fixedRate` | `number` | `null` | Fixed exchange rate (satoshis per unit) when using `fixed` source |
| `enableSubscriptions` | `boolean` | `false` | Enable subscription support via nDebit |

## Links

- [GitHub Repository](https://github.com/WoompaLoompa/medusa-clink)
- [npm package](https://www.npmjs.com/package/medusa-plugin-bitcoin-lightning-via-clink)
- [Wiki & Documentation](https://github.com/WoompaLoompa/medusa-clink/wiki)

## License

GPL-3.0

## Links

- [GitHub Repository](https://github.com/WoompaLoompa/medusa-clink)
- [npm package](https://www.npmjs.com/package/medusa-plugin-bitcoin-lightning-via-clink)