Pay Lightning Network Charges
Learn how to pay Lightning Network Charges using ZBD.
Payment API
In order to make a payment against a Lightning Network Payment Request (a.k.a Lightning Invoices, or Charges), you simply have to use the Send Payment API endpoint. A Payment accepts the following attributes:
Property | Status | Description |
---|---|---|
invoice | String | The Lightning payment request, or invoice, that is meant to be paid. |
description | String | The Payment description (only used for internal record-keeping). |
internalId | String | An optional free-use attribute. Usually used by setting the Player/User ID of your Game/Application in order to link specific Payments to specific users. |
callbackUrl | String | The URL ZBD services will make a POST HTTP request to with information about the Payment’s status updates. See Callbacks for more. |
To perform the Payment, use the API (or leverage one of our SDKs) by passing the correct attributes:
If the submitted request suceeds, you can expect a JSON API response that resembles the following:
Payment Updates
There are cases where Lightning Payments can get stuck
in transit (e.g. a network node on the path to the payment’s destination suddenly goes offline). ZBD aims to provide cutting edge Lightning Network infrastructure with high availability and liquidity. That said, due to the possibility of running into stuck payment cases, the recommended method of getting Payment updates is through the callbackUrl
attribute. By providing a callbackUrl
when making the Payment, the ZBD API is able to make a POST request to that URL and pass along Payment updates as they happen.
Was this page helpful?