POST
/
v0
/
gamertag
/
charges
curl --request POST \
  --url https://api.zebedee.io/v0/gamertag/charges \
  --header 'Content-Type: application/json' \
  --header 'apikey: <apikey>' \
  --data '{
  "amount": "<string>",
  "gamertag": "<string>",
  "description": "<string>",
  "expiresIn": 123,
  "internalId": "<string>",
  "callbackUrl": "<string>"
}'
{
  "success": true,
  "data": {
    "unit": "msats",
    "status": "CHARGE_PENDING",
    "amount": "15000",
    "createdAt": "2023-03-14T19:40:13.880Z",
    "internalId": "test",
    "callbackUrl": "https://my-website.ngrok.io/callback",
    "description": "Requesting Charge for Gamertag",
    "invoiceRequest": "lnbc10n1pjppnvapp5camc852ky0et9g46gyey9mnv5xgux6tnkkq5qc6cexrr65xw2j9sdps2fjhzat9wd6xjmn8yppksctjvajjqen0wgsywctdv4e8gct8cqzpgxqzjcsp5jgs84mxjwk8n9r7xmp7ulzycy7882f5m8zagk45s2qp23p7rprqq9qyyssq3ysvdsgg5qvx0nwtlz46hcrucs7m6nkvsffcze5nhes40hqrnnes3xjcq0a4wtpqvvrdqlyqy3sz5yhqh6944unan4d32py2azq38zgq4c5ysu",
    "invoiceExpiresAt": "2023-03-14T19:50:13.859Z",
    "invoiceDescriptionHash": null
  }
}

Description

While you can use the Pay to ZBD Gamertag endpoint to make a direct Bitcoin payment to a given ZBD user, if for whatever reason you’d want to create a general Lightning Network Charge / Payment Request QR code, you can use this endpoint.

The response payload will include a invoiceRequest which is the contents of the Charge / Payment Request QR code. Do note that Charges have defined expiration times. After a Charge expires it cannot be paid, simply create another Charge.

Configuration

Header Parameters

apikey
string
required

ZBD Project API Key

Content-Type
string

Content Type

Body

amount
string
required

The amount for the Payment -> in millisatoshis

gamertag
string
required

Destination ZBD Gamertag

description
string

Note or comment for this Payment (visible to recipient)

expiresIn
number

Time until Charge expiration -> in seconds

internalId
string

Open metadata string property

callbackUrl
string

The endpoint ZBD will POST Charge updates to