> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flashnet.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# Inspect a BOLT11 invoice

> Read-only local inspection of a BOLT11 invoice, up to 16384 characters including an optional single lightning: prefix. Accepts lowercase or uppercase invoices; mixed case is rejected. Requires a server API key or a client key with orders:quote; account approval and client origin rules apply. Does not verify the signature, establish payability, fetch LNURL targets, create orders or make payments. LNURL, Lightning Address and BOLT12 inputs return actionable 400 errors. Expired and non-mainnet invoices can be inspected. Timestamps are Unix seconds. Responses use Cache-Control: private, no-store. No X-Idempotency-Key is required or persisted.

**/v1/lightning/decode**


## OpenAPI

````yaml https://orchestration.flashnet.xyz/openapi.json POST /v1/lightning/decode
openapi: 3.1.0
info:
  title: Flashnet Orchestrator API
  version: 0.1.0
  description: >-
    Partner API for quotes, orders, standing deposits, webhooks, and affiliates.
    Operations marked x-excluded are omitted from the documentation navigation;
    internal, pay-link, SSE, and provider-integration routes are outside this
    registry.
servers:
  - url: https://orchestration.flashnet.xyz
security: []
tags:
  - name: Lightning
    description: Read-only Lightning invoice inspection.
  - name: Orchestration
    description: >-
      Routes, limits, estimates, quotes, orders, onramp, and ZeroConf decisions
      for one-off swaps.
  - name: Standing Deposit Addresses
    description: >-
      Permanent per-customer deposit addresses bound to one immutable conversion
      instruction.
  - name: Webhooks
    description: >-
      Registration of HTTPS endpoints for order status events and recovery
      events.
  - name: Affiliates
    description: Registered fee recipients, their accrued balances, and claims.
  - name: Accumulation Addresses
    description: >-
      Legacy reusable addresses that convert one source asset into Spark BTC or
      USDB.
  - name: Liquidations
    description: >-
      Legacy Bitcoin L1 deposit addresses that convert each output to a
      configured destination.
  - name: System
  - name: Explorer
  - name: Dashboard
  - name: Affiliate Dashboard
paths:
  /v1/lightning/decode:
    post:
      tags:
        - Lightning
      summary: Inspect a BOLT11 invoice
      description: >-
        Read-only local inspection of a BOLT11 invoice, up to 16384 characters
        including an optional single lightning: prefix. Accepts lowercase or
        uppercase invoices; mixed case is rejected. Requires a server API key or
        a client key with orders:quote; account approval and client origin rules
        apply. Does not verify the signature, establish payability, fetch LNURL
        targets, create orders or make payments. LNURL, Lightning Address and
        BOLT12 inputs return actionable 400 errors. Expired and non-mainnet
        invoices can be inspected. Timestamps are Unix seconds. Responses use
        Cache-Control: private, no-store. No X-Idempotency-Key is required or
        persisted.
      operationId: postV1LightningDecode
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/LightningDecodeRequest'
      responses:
        '200':
          description: Decoded details; signatureVerified is always false
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LightningInvoiceDetails'
        '400':
          description: >-
            Invalid JSON or request (invalid_request, validation_error), invalid
            BOLT11 (invalid_bolt11_invoice), unsupported target
            (unsupported_invoice_type) or network (unsupported_invoice_network)
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Missing, invalid or expired API credentials
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Client scope, origin, account or authentication method not permitted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '413':
          description: Request body exceeds 128 KiB
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '429':
          description: >-
            Rate limited (`rate_limited`); see the [rate-limits
            guide](/api/rate-limits). Retry after Retry-After seconds when
            present (per-key limiter only), otherwise at X-RateLimit-Reset, an
            absolute epoch timestamp in milliseconds; both limiters also return
            X-RateLimit-Limit and X-RateLimit-Remaining.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    LightningDecodeRequest:
      type: object
      properties:
        invoice:
          type: string
          minLength: 1
          maxLength: 16384
      required:
        - invoice
      additionalProperties: false
    LightningInvoiceDetails:
      type: object
      properties:
        network:
          type: string
          enum:
            - mainnet
            - testnet
            - signet
            - regtest
            - simnet
        amountMsats:
          type:
            - string
            - 'null'
          pattern: ^\d+$
          description: Null for amountless invoices.
        amountSats:
          type:
            - string
            - 'null'
          pattern: ^\d+$
          description: Null for amountless invoices or amounts containing fractional sats.
        paymentHash:
          type: string
          pattern: ^[0-9a-f]{64}$
        timestamp:
          type: integer
          minimum: 0
          description: Invoice creation time in Unix seconds.
        expiry:
          type: integer
          minimum: 0
          description: Expiry duration in seconds; defaults to 3600.
        expiresAt:
          type: integer
          minimum: 0
          description: timestamp + expiry, in Unix seconds.
        expired:
          type: boolean
          description: Whether expiresAt has passed according to the server clock.
        description:
          type:
            - string
            - 'null'
        descriptionHash:
          type:
            - string
            - 'null'
          pattern: ^[0-9a-f]{64}$
        signatureVerified:
          type: boolean
          enum:
            - false
          description: Signature is not verified. Inspection does not establish payability.
      required:
        - network
        - amountMsats
        - amountSats
        - paymentHash
        - timestamp
        - expiry
        - expiresAt
        - expired
        - description
        - descriptionHash
        - signatureVerified
      additionalProperties: false
    ErrorResponse:
      type: object
      properties:
        error:
          $ref: '#/components/schemas/ErrorDetail'
      required:
        - error
      additionalProperties: false
    ErrorDetail:
      type: object
      properties:
        code:
          type: string
        message:
          type: string
      required:
        - code
        - message
      additionalProperties: false
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Partner API key in the form `Authorization: Bearer fn_...`.'

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.