Pay Invoice V2

Pay invoice.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
❗️

Errors

Due to the nature of the lightning network, payments can in rare cases take some time to be settled.

For this reason, this endpoint will return you in most cases a transaction with the status IN_FLIGHT.

To check if you invoice has been paid imediately or is in flight, you can check the value of the field settledDateUtc, if the value is 0, the invoice is IN_FLIGHT.

You can also check the value of:

  1. "transaction"."payment"."statusId": 1.
  2. "transaction"."payment"."status"."name": "IN_FLIGHT"
📘

Webhook

A POST call will be made to the webhookUrl when the payment change to SETTLED or FAILED .
The webhook will have the following body:

{
  "webhookSecret": string,
  "transaction": {
    "id": string,
    "createdAt": string,
    "accountId": string,
    "amount": int,
    "networkFee": int,
    "exchangeRateCurrencySats": int,
    "currencyID": int,
    "transactionTypeId": int,
    "payment": {
      "bolt11": string,
      "hash": string,
      "preImage": string,
      "memo": string,
      "amountMsat": int,
      "feeMsat": int,
      "paidMsat": int,
      "creationDateUtc": string,
      "settleDateUtc": string,
      "statusId": int,
      "failureId": int,
      "failureReason": {
        "id": int,
        "name": string,
        "description": string
      },
      "status": {
        "id": int,
        "name": string,
        "description": string
      }
    }
  }
}
📘

Payment Status

Check the payment status table: payment-status-table

Body Params
string
required

The account that will pay the invoice.bolt11

string
required
float

For amount-less invoices, the sender must specify the amount to send, in the currency of the account.

string
string
Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json