POST
/
v0
/
ln-address
/
fetch-charge
curl --request POST \
  --url https://api.zebedee.io/v0/ln-address/fetch-charge \
  --header 'Content-Type: application/json' \
  --header 'apikey: <apikey>' \
  --data '{
  "lnaddress": "<string>",
  "amount": "<string>",
  "description": "<string>"
}'
{
  "success": true,
  "data": {
    "lnaddress": "andre@zbd.gg",
    "amount": "15000",
    "invoice": {
      "uri": "lightning:lnbc100n1p3mtxc3pp5tz4srtee9c4gsvlcqa6azu60a2ak2fvrnk7jv52j6n0rzp0musnqhp5xt5ts9t74akf67j59ynkr5qz8x3hs4g09d3dttmjrwwdhrxgc03qcqzpgxqzfvsp5529t5y03yaakumqrm9cwr5t6nysnr5cv93pnvw089a25aa7wszas9qyyssqalswdlc92983203l5azl43nksehadfy2uahc9v6qwg67xs52z02hg6vh7alrm3yx46ywdrl3dxey75t9l2ekmuwc3tu4ug03dy729fspdld2lj",
      "request": "lnbc100n1p3mtxc3pp5tz4srtee9c4gsvlcqa6azu60a2ak2fvrnk7jv52j6n0rzp0musnqhp5xt5ts9t74akf67j59ynkr5qz8x3hs4g09d3dttmjrwwdhrxgc03qcqzpgxqzfvsp5529t5y03yaakumqrm9cwr5t6nysnr5cv93pnvw089a25aa7wszas9qyyssqalswdlc92983203l5azl43nksehadfy2uahc9v6qwg67xs52z02hg6vh7alrm3yx46ywdrl3dxey75t9l2ekmuwc3tu4ug03dy729fspdld2lj"
    }
  }
}

Description

If instead of sending Bitcoin payments directly to a given Lightning Address, you would rather create a Payment Request QR code for that Lightning Address, you can use this API.

Usage

Depending on your system’s configuration or your product’s UX, you may need the ability to generate Charges for specific users. For ZBD users that’s easy using the ZBD Gamertag endpoints. For any user that is using a different provider, you can use this endpoint.

The way to think of this is:

Configuration

Header Parameters

apikey
string
required

ZBD Project API Key

Content-Type
string

Content Type

Body

lnaddress
string
required

The Lightning Address of the intended recipient

amount
string
required

The amount for the Charge -> in millisatoshis

description
string

Note or comment of this Charge

{
  "success": true,
  "data": {
    "lnaddress": "andre@zbd.gg",
    "amount": "15000",
    "invoice": {
      "uri": "lightning:lnbc100n1p3mtxc3pp5tz4srtee9c4gsvlcqa6azu60a2ak2fvrnk7jv52j6n0rzp0musnqhp5xt5ts9t74akf67j59ynkr5qz8x3hs4g09d3dttmjrwwdhrxgc03qcqzpgxqzfvsp5529t5y03yaakumqrm9cwr5t6nysnr5cv93pnvw089a25aa7wszas9qyyssqalswdlc92983203l5azl43nksehadfy2uahc9v6qwg67xs52z02hg6vh7alrm3yx46ywdrl3dxey75t9l2ekmuwc3tu4ug03dy729fspdld2lj",
      "request": "lnbc100n1p3mtxc3pp5tz4srtee9c4gsvlcqa6azu60a2ak2fvrnk7jv52j6n0rzp0musnqhp5xt5ts9t74akf67j59ynkr5qz8x3hs4g09d3dttmjrwwdhrxgc03qcqzpgxqzfvsp5529t5y03yaakumqrm9cwr5t6nysnr5cv93pnvw089a25aa7wszas9qyyssqalswdlc92983203l5azl43nksehadfy2uahc9v6qwg67xs52z02hg6vh7alrm3yx46ywdrl3dxey75t9l2ekmuwc3tu4ug03dy729fspdld2lj"
    }
  }
}