Send Bitcoin via Lightning

Send Bitcoin instantly over the Lightning Network. Pay Bolt11 invoices, Lightning Addresses, or LNURL endpoints -- all through the same transaction API.

Pay a Bolt11 Invoice

curl -X POST https://api.neutron.me/api/v2/transaction/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -d '{
    "sourceReq": {
      "ccy": "BTC",
      "method": "neutronpay"
    },
    "destReq": {
      "ccy": "BTC",
      "method": "lightning",
      "reqDetails": {
        "paymentRequest": "lnbc100u1p5pc6lq..."
      }
    }
  }'

No amtRequested needed -- the amount is encoded in the invoice. Then confirm:

curl -X PUT https://api.neutron.me/api/v2/transaction/{txnId}/confirm \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Pay a Lightning Address

Lightning Addresses look like email addresses (e.g., [email protected]):

curl -X POST https://api.neutron.me/api/v2/transaction/ \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -d '{
    "sourceReq": {
      "ccy": "BTC",
      "method": "neutronpay",
      "amtRequested": 0.0001
    },
    "destReq": {
      "ccy": "BTC",
      "method": "lnurl",
      "reqDetails": {
        "lnurl": "[email protected]"
      }
    }
  }'

Set the amount on the source side since Lightning Addresses don't have a fixed amount.

Decode Before Paying

Inspect an invoice before paying:

curl "https://api.neutron.me/api/v2/lightning/invoice?invoice=lnbc100u1p5pc6lq..." \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN"

Returns amount, expiry, destination node, and payment status.

Complete Example (Python)

import requests

BASE_URL = 'https://api.neutron.me'
TOKEN = 'YOUR_ACCESS_TOKEN'

def pay_invoice(invoice, ref=None):
    txn = requests.post(f'{BASE_URL}/api/v2/transaction/', headers={
        'Content-Type': 'application/json',
        'Authorization': f'Bearer {TOKEN}',
    }, json={
        'extRefId': ref,
        'sourceReq': {'ccy': 'BTC', 'method': 'neutronpay'},
        'destReq': {'ccy': 'BTC', 'method': 'lightning',
                    'reqDetails': {'paymentRequest': invoice}},
    }).json()

    print(f"Amount: {txn['sourceReq']['amtRequested']} BTC")
    print(f"Fees: {txn['sourceReq'].get('neutronpayFees', 0)} BTC")

    requests.put(f"{BASE_URL}/api/v2/transaction/{txn['txnId']}/confirm",
                 headers={'Authorization': f'Bearer {TOKEN}'})
    return txn['txnId']

Tips

  • Lightning payments are irreversible once confirmed
  • If a payment fails (no route), funds are not deducted
  • Bolt11 invoices expire -- confirm promptly
  • No KYC required for Lightning transactions
  • Fees are minimal (often less than 1 sat for routing)