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
}
}
Creates a Lightning invoice for the given wallet, allowing funds to be received via the Lightning Network.
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
}
}
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
}
}
createLightningInvoice
MAINNET
, REGTEST
Hide child attributes
"createLightningInvoice"
Hide child attributes
Hide child attributes
"INVOICE_CREATED"
.