POST
/
v0
/
withdrawal-requests

Description

Withdrawal Requests can be thought of as exact opposites to Charges. Charges in the ZBD API are QR codes that represent Payment Requests in the Bitcoin Lightning Network. These QR codes expect that a payer will scan and perform a payment against it.

A Withdrawal Request is the same in that it also is represented as a QR code. But unlike Charges, Withdrawal Requests are QR codes that someone scans to receive Bitcoin. You can read more about the LNURL Withdrawal specification here.

Think of it like this:

  • Charges -> Lightning QR codes that YOU SPEND

  • Withdrawal Requests -> Lightning QR codes that YOU RECEIVE

Usage

The most common use of this API endpoint are 1) Fintechs adding the ability for Withdrawals / Payouts through the Lightning Network, and 2) Apps and Games sending Bitcoin microrewards through Withdrawal QR codes / redeem codes.

Every Withdrawal Request will be in a pending state until someone scans the QR code and claims the funds.

Withdrawal Requests created by ZBD API are single-use and will not work if attempted again.

Configuration

Header Parameters

apikey
string
required

ZBD Project API Key

Content-Type
string

Content Type

Body

amount
string
required

The amount for the Withdrawal Request -> in millisatoshis

description
string

Note or comment for this Withdrawal Request

expiresIn
number

Time until Withdrawal Request expiration -> in seconds

internalId
string

Open metadata string property

callbackUrl
string

The endpoint ZBD will POST Charge updates to