REST
POST
/api/v1/lightning/withdrawalsCreate Lightning Withdrawal
Create a withdrawal via Lightning Network. Send the payment request to pay.
Auth:Bearer <api_key>
Tags:LightningWithdrawals
Request
cURL
curl -X POST https://publicapi.sandbox.hercle.financial/api/v1/lightning/withdrawals \
-H "Authorization: Bearer eyJhb..." \
-H "Content-Type: application/json" \
-d '{"key": "value"}'Headers
| Name | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer token for authentication |
| Content-Type | string | Yes | application/json |
Request Body
Schema
object
paymentRequestHash*:string
// Encoded Lightning payment request to payExample
{
"paymentRequestHash": "lnbc1..."
}Response
Success Response Schema
Withdrawal created successfully
| Field | Type | Description |
|---|---|---|
paymentId | string | Unique identifier for the payment |
status | string | Status of the withdrawal request Allowed values: OPENCLOSED |
amountBTC | number | Withdrawal amount in BTC |
destinationPublicKey | string | Public key of the destination Lightning node |
Responses
Withdrawal created successfully
201 application/json
{
"paymentId": "xxxx",
"status": "OPEN",
"amountBTC": 0.001,
"destinationPublicKey": "xxxx"
}API Tester
Test this endpoint directly against the sandbox environment
Get your API key from Hercle Sandbox
https://publicapi.sandbox.hercle.financial/api/v1/lightning/withdrawals