Lightning - Pay a Lightning Invoice

post/api/v2/{coin}/wallet/{walletId}/lightning/pay

Pay a Lightning Network invoice from the given wallet.

Path Parameters

  • coinstringRequired
    A lightning coin name.
    Example: lnbtc
  • walletIdstringRequired
    Example: 59cd72485007a239fb00282ed480da1f
    Pattern: ^[0-9a-f]{32}$

Request Body

invoice string required
The BOLT 11 invoice to pay
amountMsat string required
The amount to pay in millisatoshis
passphrase string required
The wallet passphrase
sequenceId string
Optional sequence ID for the payment transfer
comment string
Optional comment for the payment transfer

200 Response

txRequestId string
Transaction request identifier
txRequestState string
Allowed values: initialized pendingApproval pendingUserCommitment pendingUserRShare pendingUserGShare readyToSend pendingUserSignature pendingDelivery signed delivered canceled rejected failed
pendingApproval object
id string
Example: 59cd72485007a239fb00282ed480da1f
Match pattern: ^[0-9a-f]{32}$
coin string
A cryptocurrency or token ticker symbol.
Example: btc
wallet string
Example: 59cd72485007a239fb00282ed480da1f
Match pattern: ^[0-9a-f]{32}$
enterprise string
Example: 59cd72485007a239fb00282ed480da1f
Match pattern: ^[0-9a-f]{32}$
organization string
Example: 59cd72485007a239fb00282ed480da1f
Match pattern: ^[0-9a-f]{32}$
creator string
Example: 59cd72485007a239fb00282ed480da1f
Match pattern: ^[0-9a-f]{32}$
createDate string <date-time>
infoAny of
stateAny of
Allowed values: pending awaitingSignature pendingFinalApproval pendingCustodianApproval pendingVideoApproval pendingIdVerification
scope string
What kind of entity the Pending Approval is tied to
Allowed values: enterprise wallet
userIds array[string]
All the Users who should see this Pending Approval
Example: 59cd72485007a239fb00282ed480da1f
approvalsRequired integer
Minimum: >= 1
Example: 1
walletLabel string
resolvers array[object]
addressLabels array[object]
Address labels of recipients in this Pending Approval
paymentStatus object
status string
State of the lightning payment
Allowed values: in_flight settled failed
paymentHash string
Hash of the lightning payment, unique identifier used when doing transfer lookup
paymentPreimage string
Optional preimage of the payment
amountMsat string
Amount in millisatoshis
feeMsat string
Fee in millisatoshis
failureReason string
Reason for payment failure: * TIMEOUT - Payment timed out * NO_ROUTE - No route found * ERROR - Non-recoverable error * INCORRECT_PAYMENT_DETAILS - Payment details are incorrect * INSUFFICIENT_BALANCE - Insufficient channel outbound capacity * INSUFFICIENT_WALLET_BALANCE - Insufficient custodial lightning balance * EXCESS_WALLET_BALANCE - Excess custodial lightning balance * INVOICE_EXPIRED - Invoice has expired * CANCELED - Payment was canceled
Allowed values: TIMEOUT NO_ROUTE ERROR INCORRECT_PAYMENT_DETAILS INSUFFICIENT_BALANCE INSUFFICIENT_WALLET_BALANCE EXCESS_WALLET_BALANCE INVOICE_EXPIRED CANCELED

400 Response

One of
error string required
Human-readable error message
requestId string required
Client request id
context object
Properties that apply to a specific error name
name string required
Error code