Create Charge
Generate a Lightning payment request for user-initiated payments
Create Lightning payment requests (invoices) that users can pay to add funds or make purchases. Perfect for user-initiated transactions like deposits, premium upgrades, or marketplace purchases.
Lightning Invoices - This creates a standard Lightning Network invoice that can be paid from any Lightning wallet, not just ZBD.
Use Cases
Marketplace
User-to-user transactions between ZBD users
Tournament Entry
Collect entry fees with payment proof
Configuration
Header Parameters
Your ZBD Project API Key
Content Type (must be application/json)
Body Parameters
Amount to charge in millisatoshis
Common amounts:
"10000"
= 10 sats (~$0.005)"100000"
= 100 sats (~$0.05)"1000000"
= 1,000 sats (~$0.50)"10000000"
= 10,000 sats (~$5.00)
The user’s gamertag who will receive credit when paid
Note: The invoice can be paid by anyone, but this gamertag gets credited
Description shown in Lightning wallets (max 150 chars)
Examples:
- “Deposit to GameApp wallet”
- “Premium upgrade - 30 days”
- “Tournament entry fee”
Invoice expiration time in seconds (default: 600 = 10 minutes)
Range: 60 to 3600 (1 minute to 1 hour)
Your internal reference ID for tracking
Use for linking to your database records
Webhook URL for payment notifications
ZBD will POST to this URL when invoice is paid
Response
Response Fields
Field | Type | Description |
---|---|---|
id | string | Unique charge identifier |
status | string | Always “CHARGE_PENDING” initially |
amount | string | Amount in millisatoshis |
invoiceRequest | string | Lightning invoice (payment request) |
invoiceExpiresAt | string | When invoice expires (ISO 8601) |
createdAt | string | Creation timestamp |
internalId | string | Your reference ID |
callbackUrl | string | Your webhook URL |
Universal Compatibility - These invoices work with any Lightning wallet, not just ZBD. Users can pay from Cash App, Strike, Phoenix, or any other Lightning-enabled service.