Skip to content

Getting Started

WoompaLoompa edited this page Jul 21, 2026 · 3 revisions

Complete guide to install and set up the CLINK payment plugin for Medusa.

Prerequisites

  • Medusa v2.x store
  • Node.js 18+
  • Lightning wallet/node with CLINK support

Supported Wallets (Merchant)

Wallet Platform Link
ShockWallet iOS/Android shockwallet.app
Lightning.Pub Self-hosted lightning.pub
ZEUS iOS/Android zeusln.com

Installation

Step 1: Install the Package

# In your Medusa project root
npm install medusa-bitcoin-lightning-payment-module-via-clink

Step 2: Configure medusa-config.ts

import { Modules } from "@medusajs/framework/utils"

module.exports = defineConfig({
  modules: [
    {
      resolve: "@medusajs/medusa/payment",
      options: {
        providers: [
          {
            resolve: "medusa-bitcoin-lightning-payment-module-via-clink",
            id: "clink",
            options: {
              // Required: Your CLINK offer string
              noffer: "noffer1...",
              
              // Optional: Currency source (default: coingecko)
              currencySource: "coingecko",
              
              // Optional: Invoice timeout in seconds (default: 600)
              invoiceTimeout: 600,
              
              // Optional: Enable subscriptions
              enableSubscriptions: false,
              
              // Optional: Debug logging
              debug: false
            }
          }
        ]
      }
    }
  ]
})

Step 3: Get Your CLINK Offer

Using ShockWallet (Recommended):

  1. Download ShockWallet
  2. Create/import your Lightning wallet
  3. Go to ReceiveCLINK Offer
  4. Copy the noffer1... string
  5. Paste into your config

Step 4: Restart Medusa

npm run dev

Step 5: Enable in Admin

  1. Go to Medusa AdminSettingsRegions
  2. Edit your region
  3. Under Payment Providers, enable Lightning (CLINK)
  4. Save

Test It!

  1. Add a product to cart
  2. Go to checkout
  3. Select Lightning (CLINK)
  4. Scan the QR code with your wallet
  5. Pay!

Next Steps

Need Help?

Clone this wiki locally