Skip to content

LNURL API

LNURL-pay, LNURL-withdraw, and LNURL-auth API endpoints.

Handle LNURL protocol operations - scan, pay, and authenticate.

Scan LNURL

GET /api/v1/lnurlscan/{code}

Auth: Invoice key or Admin key

Parse and resolve an LNURL, Lightning Address, or BOLT11 invoice. Returns the decoded parameters needed to complete the flow.

Parameters

FieldTypeRequiredDescription
codestring (path)YesAn LNURL (lnurl1...), Lightning Address (user@domain.com), or BOLT11 invoice (lnbc...)

Response 200 (LNURL-pay)

FieldTypeDescription
kindstring"pay"
domainstringService domain
descriptionstringPayment description
minSendableintegerMinimum amount in millisatoshis
maxSendableintegerMaximum amount in millisatoshis
callbackstringCallback URL for completing payment
commentAllowedintegerMax comment length (0 = no comments)
json
{
  "kind": "pay",
  "domain": "example.com",
  "description": "Send sats",
  "minSendable": 1000,
  "maxSendable": 1000000,
  "callback": "https://example.com/lnurlp/callback/...",
  "commentAllowed": 140
}

Response 200 (LNURL-withdraw)

FieldTypeDescription
kindstring"withdraw"
domainstringService domain
descriptionstringWithdrawal description
minWithdrawableintegerMinimum amount in millisatoshis
maxWithdrawableintegerMaximum amount in millisatoshis
callbackstringCallback URL for completing withdrawal
json
{
  "kind": "withdraw",
  "domain": "example.com",
  "description": "Withdraw sats",
  "minWithdrawable": 1000,
  "maxWithdrawable": 50000,
  "callback": "https://example.com/withdraw/callback/..."
}

Pay LNURL

POST /api/v1/payments/lnurl

Auth: Admin key

Execute a payment through an LNURL-pay flow. First use Scan LNURL to get the callback and parameters.

Parameters

FieldTypeRequiredDescription
callbackstringYesCallback URL from the scan response
amountintegerYesAmount in millisatoshis
description_hashstringYesSHA256 hash of the payment description
commentstringNoOptional comment (if commentAllowed > 0)

Response 200

FieldTypeDescription
payment_hashstringUnique payment identifier
checking_idstringID for status polling
json
{
  "payment_hash": "abc123def456...",
  "checking_id": "abc123def456..."
}

LNURL Auth

POST /api/v1/lnurlauth

Auth: Admin key

Perform LNURL authentication (login with Lightning). Signs the challenge with the wallet's key and sends the response to the service.

Parameters

FieldTypeRequiredDescription
callbackstringYesLNURL-auth callback URL (includes tag=login and k1=...)

Response 200

FieldTypeDescription
successbooleanWhether authentication succeeded
json
{
  "success": true
}

News · Shop · SaaS · Telegram · Released under the MIT License.