Bitnob LNURL API

Lightning addresses, LNURL withdraw links and LNURL payments.

GitHub OpenAPI

Operations 17

GET /api/lnurl/addresses List lightning addresses #
POST /api/lnurl/addresses Create a lightning address #
GET /api/lnurl/addresses/{id} Get a lightning address #
PATCH /api/lnurl/addresses/{id} Update a lightning address #
DELETE /api/lnurl/addresses/{id} Delete a lightning address #
POST /api/lnurl/decode Decode an LNURL #
GET /api/lnurl/domains List domains #
POST /api/lnurl/domains Register a domain #
GET /api/lnurl/domains/{id} Get a domain #
POST /api/lnurl/domains/{id}/disable Disable a domain #
POST /api/lnurl/domains/{id}/verify Verify a domain #
POST /api/lnurl/encode Encode an LNURL #
POST /api/lnurl/pay Pay a lightning address or LNURL #
POST /api/lnurl/resolve Resolve a destination #
POST /api/lnurl/withdrawals Issue a withdraw link #
GET /api/lnurl/withdrawals/{id} Get a withdraw link #
POST /api/lnurl/withdrawals/{id}/cancel Cancel a withdraw link #

Specifications

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/bitnob:bitnob-lnurl-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

bitnob-lnurl-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Bitnob API requests LNURL API
  version: 1.0.0
  description: 'What you send to the Bitnob API: path and query parameters, request bodies and auth headers. Responses are left out; see the full Bitnob API spec for those.'
servers:
- description: Production
  url: https://api.bitnob.com
security:
- ClientId: []
  Timestamp: []
  Nonce: []
  Signature: []
- ClientId: []
  Secret: []
tags:
- description: Lightning addresses, LNURL withdraw links and LNURL payments.
  name: LNURL
paths:
  /api/lnurl/addresses:
    get:
      tags:
      - LNURL
      summary: List lightning addresses
      description: Lists a customer's lightning addresses. customer_id is required.
      operationId: lnurlListAddresses
      parameters:
      - description: Only results for this customer.
        example: 019a3a01-2c4d-7e5f-8a6b-7c8d9e0f1a2b
        in: query
        name: customer_id
        required: true
        schema:
          format: uuid
          type: string
    post:
      tags:
      - LNURL
      summary: Create a lightning address
      description: Creates a lightning address (identifier@host) for a customer on one of your verified domains. If the customer already holds the identifier, the existing address is returned.
      operationId: lnurlCreateAddress
      requestBody:
        content:
          application/json:
            examples:
              basic:
                summary: A lightning address with a sendable range
                value:
                  customer_id: 019a3a01-2c4d-7e5f-8a6b-7c8d9e0f1a2b
                  domain_id: 019a3c10-5d2e-7f31-8a4b-6c7d8e9f0a12
                  identifier: adaeze
                  max_sendable_sat: 1000000
                  min_sendable_sat: 1
              with_options:
                summary: With a description, payer comments, an image and zaps
                value:
                  allows_nostr: true
                  comment_max: 140
                  customer_id: 019a3a01-2c4d-7e5f-8a6b-7c8d9e0f1a2b
                  description: Pay Adaeze Okafor
                  domain_id: 019a3c10-5d2e-7f31-8a4b-6c7d8e9f0a12
                  identifier: adaeze
                  image_b64: iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mNkYPhfDwAChwGA60e6kgAAAABJRU5ErkJggg==
                  max_sendable_sat: 1000000
                  min_sendable_sat: 1
            schema:
              $ref: '#/components/schemas/LnurlCreateAddressRequest'
        required: true
  /api/lnurl/addresses/{id}:
    get:
      tags:
      - LNURL
      summary: Get a lightning address
      description: Returns one of your lightning addresses.
      operationId: lnurlGetAddress
      parameters:
      - description: Lightning address id
        example: 019a3c20-6e3f-7a42-9b5c-7d8e9f0a1b23
        in: path
        name: id
        required: true
        schema:
          format: uuid
          type: string
    patch:
      tags:
      - LNURL
      summary: Update a lightning address
      description: 'Updates a lightning address. To change the sendable range, send both min_sendable_sat and max_sendable_sat. disable: true disables the address, and it can''t be re-enabled.'
      operationId: lnurlUpdateAddress
      parameters:
      - description: Lightning address id
        example: 019a3c20-6e3f-7a42-9b5c-7d8e9f0a1b23
        in: path
        name: id
        required: true
        schema:
          format: uuid
          type: string
      requestBody:
        content:
          application/json:
            examples:
              change_description:
                summary: Change the description
                value:
                  description: Pay Adaeze at Acme Logistics Ltd
              change_range:
                summary: Change the sendable range
                value:
                  max_sendable_sat: 500000
                  min_sendable_sat: 1000
              disable:
                summary: Disable the address
                value:
                  disable: true
            schema:
              $ref: '#/components/schemas/LnurlUpdateAddressRequest'
        required: true
    delete:
      tags:
      - LNURL
      summary: Delete a lightning address
      description: Deletes one of your lightning addresses permanently; wallets can no longer pay it.
      operationId: lnurlDeleteAddress
      parameters:
      - description: Lightning address id
        example: 019a3c20-6e3f-7a42-9b5c-7d8e9f0a1b23
        in: path
        name: id
        required: true
        schema:
          format: uuid
          type: string
  /api/lnurl/decode:
    post:
      tags:
      - LNURL
      summary: Decode an LNURL
      description: Decodes an lnurl1... bech32 string (LUD-01) to its URL. Mixed-case input is rejected.
      operationId: lnurlDecode
      requestBody:
        content:
          application/json:
            examples:
              pay_link:
                summary: An LNURL-pay link
                value:
                  encoded: lnurl1dp68gurn8ghj7urp0yhx27rpd4cxcefwvdhk6tmvde6hymrs9askgct90fjstsuan7
            schema:
              $ref: '#/components/schemas/LnurlDecodeRequest'
        required: true
  /api/lnurl/domains:
    get:
      tags:
      - LNURL
      summary: List domains
      description: Lists your LNURL domains.
      operationId: lnurlListDomains
    post:
      tags:
      - LNURL
      summary: Register a domain
      description: Registers your own domain for lightning addresses and returns the TXT and CNAME records to publish. Then call POST /api/lnurl/domains/{id}/verify.
      operationId: lnurlRegisterDomain
      requestBody:
        content:
          application/json:
            examples:
              host:
                summary: A bare host name
                value:
                  host: tips.example.org
            schema:
              $ref: '#/components/schemas/LnurlRegisterDomainRequest'
        required: true
  /api/lnurl/domains/{id}:
    get:
      tags:
      - LNURL
      summary: Get a domain
      description: Returns one of your domains.
      operationId: lnurlGetDomain
      parameters:
      - description: Domain id
        example: 019a3c10-5d2e-7f31-8a4b-6c7d8e9f0a12
        in: path
        name: id
        required: true
        schema:
          format: uuid
          type: string
  /api/lnurl/domains/{id}/disable:
    post:
      tags:
      - LNURL
      summary: Disable a domain
      description: 'Disables a domain: its addresses stop resolving and it can''t be used for new addresses or withdraw links. This can''t be undone.'
      operationId: lnurlDisableDomain
      parameters:
      - description: Domain id
        example: 019a3c10-5d2e-7f31-8a4b-6c7d8e9f0a12
        in: path
        name: id
        required: true
        schema:
          format: uuid
          type: string
  /api/lnurl/domains/{id}/verify:
    post:
      tags:
      - LNURL
      summary: Verify a domain
      description: Checks the domain's TXT record (_bitnob.{host}) and sets its status to verified or failed.
      operationId: lnurlVerifyDomain
      parameters:
      - description: Domain id
        example: 019a3c11-6e3f-7042-9b5c-7d8e9f0a1b23
        in: path
        name: id
        required: true
        schema:
          format: uuid
          type: string
  /api/lnurl/encode:
    post:
      tags:
      - LNURL
      summary: Encode an LNURL
      description: Bech32-encodes an http or https URL as a lower-case lnurl1... string (LUD-01).
      operationId: lnurlEncode
      requestBody:
        content:
          application/json:
            examples:
              pay_url:
                summary: An LNURL-pay URL
                value:
                  url: https://pay.example.com/lnurlp/adaeze
            schema:
              $ref: '#/components/schemas/LnurlEncodeRequest'
        required: true
  /api/lnurl/pay:
    post:
      tags:
      - LNURL
      summary: Pay a lightning address or LNURL
      description: Pays a lightning address or LNURL-pay string from your BTC balance on behalf of a customer. Retrying with the same reference returns the original result.
      operationId: lnurlPay
      requestBody:
        content:
          application/json:
            examples:
              lightning_address:
                summary: Pay a lightning address
                value:
                  amount_sat: 25000
                  customer_id: 019a3a01-2c4d-7e5f-8a6b-7c8d9e0f1a2b
                  destination: kwame@wallet.example.net
                  reference: lnurl_pay_20261030_0001
              lnurl_with_comment:
                summary: Pay an lnurl1 string with a comment, payer data and a fee cap
                value:
                  amount_sat: 25000
                  comment: Invoice 1042, thanks
                  customer_id: 019a3a01-2c4d-7e5f-8a6b-7c8d9e0f1a2b
                  destination: lnurl1dp68gurn8ghj7ampd3kx2apwv4uxzmtsd3jjumn9wshkcmn4wfk8qtmtwask6eg92fvej
                  max_fee_sat: 50
                  payer_data_json: '{"name":"Adaeze Okafor"}'
                  reference: lnurl_pay_20261030_0002
            schema:
              $ref: '#/components/schemas/LnurlPayRequest'
        required: true
  /api/lnurl/resolve:
    post:
      tags:
      - LNURL
      summary: Resolve a destination
      description: Resolves a lightning address or LNURL-pay string to a BOLT11 invoice for amount_sat, without paying it.
      operationId: lnurlResolve
      requestBody:
        content:
          application/json:
            examples:
              lightning_address:
                summary: Resolve a lightning address
                value:
                  amount_sat: 25000
                  destination: kwame@wallet.example.net
              lnurl_with_comment:
                summary: Resolve an lnurl1 string with a comment
                value:
                  amount_sat: 25000
                  comment: Invoice 1042, thanks
                  destination: lnurl1dp68gurn8ghj7ampd3kx2apwv4uxzmtsd3jjumn9wshkcmn4wfk8qtmtwask6eg92fvej
            schema:
              $ref: '#/components/schemas/LnurlResolveRequest'
        required: true
  /api/lnurl/withdrawals:
    post:
      tags:
      - LNURL
      summary: Issue a withdraw link
      description: Creates an LNURL-withdraw link for a customer and reserves max_withdraw_sat from your BTC balance until the link is claimed, canceled or expires. Show lnurl_encoded to the person claiming it.
      operationId: lnurlIssueWithdraw
      requestBody:
        content:
          application/json:
            examples:
              short_lived:
                summary: A smaller link, valid for an hour
                value:
                  customer_id: 019a3a02-3d5e-7f60-9b7c-8d9e0f1a2b3c
                  disposable: false
                  domain_id: 019a3c10-5d2e-7f31-8a4b-6c7d8e9f0a12
                  max_withdraw_sat: 5000
                  min_withdraw_sat: 100
                  ttl_seconds: 3600
              single_use:
                summary: A link for up to 50,000 sats, valid for a day
                value:
                  customer_id: 019a3a01-2c4d-7e5f-8a6b-7c8d9e0f1a2b
                  description: Refund for order 1042
                  disposable: true
                  domain_id: 019a3c10-5d2e-7f31-8a4b-6c7d8e9f0a12
                  max_withdraw_sat: 50000
                  min_withdraw_sat: 1000
                  ttl_seconds: 86400
            schema:
              $ref: '#/components/schemas/LnurlIssueWithdrawRequest'
        required: true
  /api/lnurl/withdrawals/{id}:
    get:
      tags:
      - LNURL
      summary: Get a withdraw link
      description: Returns a withdraw link and its claim status.
      operationId: lnurlGetWithdraw
      parameters:
      - description: Withdraw request id
        example: 019a3c30-7f40-7b53-8c6d-8e9f0a1b2c45
        in: path
        name: id
        required: true
        schema:
          format: uuid
          type: string
  /api/lnurl/withdrawals/{id}/cancel:
    post:
      tags:
      - LNURL
      summary: Cancel a withdraw link
      description: Cancels an unclaimed withdraw link and releases the reserved funds.
      operationId: lnurlCancelWithdraw
      parameters:
      - description: Withdraw request id
        example: 019a3c30-7f40-7b53-8c6d-8e9f0a1b2c45
        in: path
        name: id
        required: true
        schema:
          format: uuid
          type: string
components:
  schemas:
    LnurlResolveRequest:
      properties:
        allow_zap:
          description: Accepted but ignored today.
          type: boolean
        amount_sat:
          description: Amount in sats.
          format: int64
          minimum: 1
          type: integer
        comment:
          description: Sent to the recipient as given, whatever comment length its service advertises. At most 500 characters and 500 bytes.
          maxLength: 500
          type: string
        destination:
          description: Lightning address (user@host), lnurl1... string, or the https URL of an LNURL-pay endpoint. A leading "lightning:" scheme is stripped; http URLs are refused.
          maxLength: 2048
          type: string
        payer_data_json:
          description: LUD-18 payer data as a JSON object, serialised to a string.
          type: string
      required:
      - destination
      - amount_sat
      type: object
    LnurlRegisterDomainRequest:
      properties:
        host:
          description: Bare host name, for example pay.example.com. Lower-cased; URLs and paths are rejected.
          maxLength: 253
          type: string
      required:
      - host
      type: object
    LnurlDecodeRequest:
      properties:
        encoded:
          description: Must start with lnurl1 (case-insensitive).
          maxLength: 2048
          type: string
      required:
      - encoded
      type: object
    LnurlIssueWithdrawRequest:
      properties:
        customer_id:
          description: 'Customer the link serves. Required: an empty value is rejected as an invalid customer_id.'
          format: uuid
          type: string
        description:
          description: Text shown to the person withdrawing. At most 500 characters and 500 bytes.
          maxLength: 500
          type: string
        disposable:
          description: Stored and returned, with no effect on the link. Every link can be claimed once, whatever this value.
          type: boolean
        domain_id:
          description: A domain you own; must not be disabled.
          format: uuid
          type: string
        max_withdraw_sat:
          description: Maximum claim in sats; at least min_withdraw_sat. This amount is reserved from your balance when the link is issued, and a smaller claim returns the difference. A claim above 20,000,000 sats cannot be paid.
          format: int64
          minimum: 1
          type: integer
        min_withdraw_sat:
          description: Minimum claim in sats.
          format: int64
          minimum: 1
          type: integer
        ttl_seconds:
          description: Link lifetime in seconds. Must be positive.
          format: int32
          minimum: 1
          type: integer
      required:
      - domain_id
      - customer_id
      - min_withdraw_sat
      - max_withdraw_sat
      - ttl_seconds
      type: object
    LnurlEncodeRequest:
      properties:
        url:
          description: http or https URL.
          format: uri
          maxLength: 2048
          type: string
      required:
      - url
      type: object
    LnurlPayRequest:
      properties:
        allow_zap:
          description: Accepted but ignored today.
          type: boolean
        amount_sat:
          description: Amount in sats (max 20,000,000).
          format: int64
          maximum: 20000000
          minimum: 1
          type: integer
        comment:
          description: Sent to the recipient as given, whatever comment length its service advertises. At most 500 characters and 500 bytes.
          maxLength: 500
          type: string
        customer_id:
          description: 'Customer the payment is for. Required: an empty value is rejected as an invalid customer_id.'
          format: uuid
          type: string
        destination:
          description: Lightning address (user@host), lnurl1... string, or the https URL of an LNURL-pay endpoint. A leading "lightning:" scheme is stripped; http URLs are refused.
          maxLength: 2048
          type: string
        max_fee_sat:
          description: Most you will pay in Bitnob fees for this payment, in sats. 0 means no cap.
          format: int64
          minimum: 0
          type: integer
        payer_data_json:
          description: LUD-18 payer data as a JSON object, serialised to a string.
          type: string
        reference:
          description: 'Idempotency key: once a payment under this reference is recorded, a retry returns that record, as long as the destination still resolves.'
          maxLength: 100
          type: string
      required:
      - destination
      - customer_id
      - amount_sat
      - reference
      type: object
    LnurlUpdateAddressRequest:
      description: All fields optional; omitted fields are unchanged. The sendable range changes only when both bounds are sent.
      properties:
        description:
          description: Text shown to payers of this address. At most 500 characters and 500 bytes.
          maxLength: 500
          type: string
        disable:
          description: true disables the address.
          type: boolean
        max_sendable_sat:
          description: Applied only when min_sendable_sat is sent too.
          format: int64
          minimum: 1
          type: integer
        min_sendable_sat:
          description: Applied only when max_sendable_sat is sent too; then it must be positive and at most max_sendable_sat.
          format: int64
          minimum: 1
          type: integer
      type: object
    LnurlCreateAddressRequest:
      properties:
        allows_nostr:
          description: Advertise NIP-57 zap support.
          type: boolean
        comment_max:
          description: Maximum payer comment length. 0 (the default) disables comments.
          maximum: 1000
          minimum: 0
          type: integer
        customer_id:
          description: 'Customer that owns the address. Required: an empty value is rejected as an invalid customer_id.'
          format: uuid
          type: string
        description:
          description: Text shown to payers of this address. At most 500 characters and 500 bytes.
          maxLength: 500
          type: string
        domain_id:
          description: A verified domain you own.
          format: uuid
          type: string
        identifier:
          description: Local part; lower-cased before checking.
          pattern: ^[a-z0-9._-]{1,64}$
          type: string
        image_b64:
          description: Standard base64 image, at most 64 KiB encoded.
          maxLength: 65536
          type: string
        max_sendable_sat:
          description: Maximum payable amount in sats; must be at least min_sendable_sat.
          format: int64
          minimum: 1
          type: integer
        min_sendable_sat:
          description: Minimum payable amount in sats; must be positive.
          format: int64
          minimum: 1
          type: integer
      required:
      - domain_id
      - customer_id
      - identifier
      - min_sendable_sat
      - max_sendable_sat
      type: object
  securitySchemes:
    ClientId:
      type: apiKey
      in: header
      name: X-Auth-Client
      description: Your client id. Required in both auth modes.
    Nonce:
      type: apiKey
      in: header
      name: X-Auth-Nonce
      description: A unique random string for this request.
    Secret:
      type: apiKey
      in: header
      name: X-Auth-Secret
      description: 'Secret mode only: your client secret, sent instead of the timestamp, nonce and signature.'
    Signature:
      type: apiKey
      in: header
      name: X-Auth-Signature
      description: Hex HMAC-SHA256 of `{client_id}:{timestamp}:{nonce}:{body}` using your secret. The body is empty for GET.
    Timestamp:
      type: apiKey
      in: header
      name: X-Auth-Timestamp
      description: The current Unix time in seconds. Requests more than 5 minutes off are refused.