Org

Register or replace the org's receive-only Lightning receiver for priced routes

Admin/owner-only, with step-up or fresh SIWX. Takes a Nostr Wallet Connect pairing (nwc_uri) on a node the organization controls. Before storing anything the gateway probes it: get_info must answer with a node public key on mainnet or testnet, make_invoice must be permitted, a pairing that permits pay_invoice (or any other spending method) is refused, and a one-satoshi test invoice must commit to the description hash the gateway supplies and be signed by the reported node. A failed check answers 422 LIGHTNING_RECEIVER_PROBE_FAILED with details.check naming it (get_info, can_spend, make_invoice, description_hash, signer, network). The pairing is stored encrypted, returned by no read, and used only to mint invoices for routes priced on lightning / lightning-testnet; sats settle on the organization's own node and Run402 never holds a spending credential or a preimage. Replacing a receiver rotates receiver_id. Audited; the organization is notified.

post/orgs/v1/{org_id}/lightning-receiver

Request

  • Base URL: https://api.run402.com
  • URL: https://api.run402.com/orgs/v1/{org_id}/lightning-receiver
  • Auth: one of:
    • HTTP bearer
    • API key in header SIGN-IN-WITH-X
    • API key in header x-admin-key

Path parameters

org_idstring uuid required

Request body

nwc_uristring required

A nostr+walletconnect:// pairing on a node the organization controls, permitting get_info and make_invoice and no spending method. Never returned by any read.

Response

Receiver replaced (a new receiver_id).

org_idstring uuid required
receiver_idstring uuid required

Rotates on every replacement; each issued invoice names the receiver that minted it.

node_pubkeystring required

The node's compressed public key (hex): the payTo of every Lightning entry and the key every invoice is signed with.

networkstring required

The lnbtc network id the receiver serves: lnbtc:000000000019d6689c085ae165831e93 (mainnet) or lnbtc:000000000933ea01ad0ee984209779ba (testnet).

methodsstring[] required

The NIP-47 methods the pairing permits, as probed.

probed_atstring date-time required
last_probe_status'ok' | 'failing' required

failing after a mint through the receiver failed; ok again after the next successful mint.

last_errorstring nullable required
custody'organization' required

The sats land on the organization's own node; Run402 holds only a receive-only pairing.

created_atstring date-time required
updated_atstring date-time required

Changes

No recorded changes to this operation across all 1 revision of this API.