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

# Get receive status

> Returns the status of a specified Lightning receive, identified by its payment hash, invoice string, or preimage. The response tracks progress through timestamps: `htlc_vtxos` is populated once HTLCs are created by the Ark server, `preimage_revealed_at` records when the preimage was sent, and `finished_at` indicates the receive has settled or been canceled.



## OpenAPI

````yaml https://gitlab.com/ark-bitcoin/bark/-/raw/master/bark-rest/openapi.json get /api/v1/lightning/receives/{identifier}
openapi: 3.1.0
info:
  title: barkd REST API
  description: >-
    A simple REST API for barkd, a wallet daemon for integrating bitcoin
    payments into your app over HTTP. Supports self-custodial Lightning, Ark,
    and on-chain out of the box.


    barkd is a long-running daemon best suited for always-on or
    high-connectivity environments like nodes, servers, desktops, and
    point-of-sale terminals.


    All endpoints return JSON. Amounts are denominated in satoshis.
  contact:
    name: Second Team
    email: hello@second.tech
  license:
    name: MIT
    identifier: MIT
  version: 0.1.4
servers: []
security:
  - bearer: []
tags:
  - name: boards
    description: Move on-chain bitcoin onto the Ark protocol.
  - name: exits
    description: Move bitcoin back on-chain without server cooperation.
  - name: fees
    description: Estimate fees for wallet operations before executing them.
  - name: lightning
    description: Create Lightning invoices and track receives.
  - name: onchain
    description: Manage barkd's on-chain bitcoin wallet.
  - name: wallet
    description: Manage Ark balances and VTXOs, send payments via Ark, LN, and on-chain.
  - name: bitcoin
    description: Query bitcoin network data.
  - name: notifications
    description: Receive real-time notifications from barkd.
paths:
  /api/v1/lightning/receives/{identifier}:
    get:
      tags:
        - lightning
      summary: Get receive status
      description: >-
        Returns the status of a specified Lightning receive, identified by its
        payment hash, invoice string, or preimage. The response tracks progress
        through timestamps: `htlc_vtxos` is populated once HTLCs are created by
        the Ark server, `preimage_revealed_at` records when the preimage was
        sent, and `finished_at` indicates the receive has settled or been
        canceled.
      operationId: get_receive_status
      parameters:
        - name: identifier
          in: path
          description: Payment hash, invoice string or preimage to search for
          required: true
          schema:
            type: string
      responses:
        '200':
          description: Returns the Lightning receive status
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/LightningReceiveInfo'
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/BadRequestError'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundError'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/InternalServerError'
components:
  schemas:
    LightningReceiveInfo:
      type: object
      required:
        - amount_sat
        - payment_hash
        - payment_preimage
        - invoice
        - htlc_vtxos
      properties:
        amount_sat:
          type: integer
          format: int64
          description: The amount of the lightning receive
          minimum: 0
        finished_at:
          type:
            - string
            - 'null'
          format: date-time
          description: The timestamp at which the lightning receive was finished
        htlc_vtxos:
          type: array
          items:
            $ref: '#/components/schemas/WalletVtxoInfo'
          description: |-
            The HTLC VTXOs granted by the server for the lightning receive

            Empty if the lightning HTLC has not yet been received by the server.
        invoice:
          type: string
          description: The invoice string
        payment_hash:
          type: string
          description: The payment hash linked to the lightning receive info
        payment_preimage:
          type: string
          description: The payment preimage linked to the lightning receive info
        preimage_revealed_at:
          type:
            - string
            - 'null'
          format: date-time
          description: The timestamp at which the preimage was revealed
    BadRequestError:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    NotFoundError:
      type: object
      required:
        - resources
        - message
      properties:
        message:
          type: string
        resources:
          type: array
          items:
            type: string
    InternalServerError:
      type: object
      required:
        - message
      properties:
        message:
          type: string
    WalletVtxoInfo:
      allOf:
        - $ref: '#/components/schemas/VtxoInfo'
          description: The VTXO details.
        - type: object
          required:
            - state
          properties:
            state:
              $ref: '#/components/schemas/VtxoStateInfo'
              description: The current state of this VTXO in the wallet.
      description: A VTXO together with its current wallet state.
    VtxoInfo:
      type: object
      description: |-
        Information about a single VTXO (Virtual Transaction Output).

        A VTXO is a chain of off-chain, pre-signed transactions rooted in an
        on-chain output. It represents spendable bitcoin on Ark.
      required:
        - id
        - amount_sat
        - policy_type
        - user_pubkey
        - server_pubkey
        - expiry_height
        - exit_delta
        - chain_anchor
      properties:
        amount_sat:
          type: integer
          format: int64
          description: The value of this VTXO in sats.
          minimum: 0
        chain_anchor:
          type: string
          description: |-
            The on-chain outpoint that roots this VTXO, formatted as
            `txid:vout`. Typically an output of a round transaction or a
            board transaction.
        exit_delta:
          $ref: '#/components/schemas/u16'
          description: |-
            The relative timelock, in blocks, that must elapse before the
            final on-chain claim in an emergency exit.
        exit_depth:
          type:
            - integer
            - 'null'
          format: int32
          description: |-
            The number of off-chain transactions in this VTXO. Each must
            be broadcast and confirmed on-chain in sequence during an
            emergency exit.
          minimum: 0
        expiry_height:
          $ref: '#/components/schemas/u32'
          description: |-
            The block height at which this VTXO expires. After expiry, the
            server can reclaim the sats. Refresh before expiry to receive
            new VTXOs, or exit to move them on-chain.
        id:
          type: string
          description: Unique identifier for this VTXO, formatted as `txid:vout`.
        policy_type:
          type: string
          description: The spending policy that governs this VTXO.
        server_pubkey:
          type: string
          description: |-
            The Ark server's public key used to co-sign transactions
            involving this VTXO.
        user_pubkey:
          type: string
          description: |-
            The owner's public key. Only the holder of the corresponding
            private key can spend this VTXO.
    VtxoStateInfo:
      oneOf:
        - type: object
          description: The VTXO can be spent immediately.
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - spendable
        - type: object
          description: The VTXO has already been spent.
          required:
            - type
          properties:
            type:
              type: string
              enum:
                - spent
        - type: object
          description: |-
            The VTXO is locked by an in-progress movement (e.g. a pending
            round or Lightning payment).
          required:
            - type
          properties:
            movement_id:
              type: integer
              format: int32
              description: The movement that locked this VTXO, if any.
              minimum: 0
            type:
              type: string
              enum:
                - locked
      description: The current state of a VTXO in the wallet.
    u16:
      type: integer
      format: int32
      minimum: 0
    u32:
      type: integer
      format: int32
      minimum: 0
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
      bearerFormat: AuthToken
      description: Base64url-encoded auth token

````