Charge API
In order to receive Bitcoin through the Lightning Network using the ZBD API, you must first create a Charge. A Charge accepts the following attributes:
To create a Charge, use the
/charges API (or leverage one of our SDKs) by passing the correct attributes:
Receiving Funds
Now that you have created a Charge, you can allow anyone to pay this Payment Request in the Bitcoin Lightning Network. Depending on your use-case you may choose to display theinvoice.request property as a QR Code that others can scan with their mobile apps, or you can put it under a button click.
Any Bitcoin Lightning-capable wallets can read, decode, and effect payments against these Charges.
Charge Updates
All Charges will either complete or expire. If no payment is effected until the Charge’s expiration time, the Charge (and underlying Bitcoin Lightning Network Invoice) will expire and will therefore no longer be payable. To know the status of your specific Charge, check thestatus attribute returned from the /charges/create or /charges/get API calls.