curl --request POST \
--url https://api.privy.io/v1/wallets/{wallet_id}/rpc \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--header 'privy-app-id: <privy-app-id>' \
--data '{
"method": "createLightningInvoice",
"network": "MAINNET",
"params": {
"amount_sats": 20
}
}'
{
"method": "createLightningInvoice",
"data": {
"id": "SparkLightningReceiveRequest:019842c4-c50f-cd96-0000-612d71a61547",
"created_at": "2025-07-25T18:07:28.527107+00:00",
"updated_at": "2025-07-25T18:07:28.527107+00:00",
"network": "MAINNET",
"invoice": {
"encodedInvoice": "lnbc...",
"bitcoinNetwork": "MAINNET",
"paymentHash": "f59c86aaafa9920f410d1567d9ee38bf526c932691c23c7bac6d8519682a6d76",
"amount": {
"originalValue": 20000,
"originalUnit": "MILLISATOSHI",
"preferredCurrencyUnit": "USD",
"preferredCurrencyValueRounded": 2,
"preferredCurrencyValueApprox": 2.3228803716608595
},
"createdAt": "2025-07-25T18:07:28.484042+00:00",
"expiresAt": "2025-08-24T18:07:28.484042+00:00",
"memo": null
},
"status": "INVOICE_CREATED",
"typename": "LightningReceiveRequest",
"payment_preimage": null,
"receiver_identity_public_key": null
}
}
privy-authorization-signature
Request authorization signature. If multiple signatures are required, they should be comma
separated.
Path Parameters
Body
Available options: createLightningInvoice
Available options: MAINNET
, REGTEST
Parameters for the invoice to be created.
The amount of sats to be received.
Returns
Always "createLightningInvoice"
Details about the created Lightning invoice.
Unique ID of the Lightning receive request.
Timestamp of invoice creation.
Timestamp of last update.
The Bitcoin network this invoice is valid for.
Encoded invoice details.
Bolt11-encoded Lightning invoice string.
The hash of the preimage for this payment request.
Amount details.
preferredCurrencyValueRounded
preferredCurrencyValueApprox
Timestamp of invoice creation.
Timestamp of invoice expiration.
Optional memo included with the invoice.
Current status of the invoice. Possible value: "INVOICE_CREATED"
.
receiver_identity_public_key
Public key of the receiving node.