--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": "payLightningInvoice",
"network": "MAINNET",
"params": {
"invoice": "lnbc1230n1p...",
"max_fee_sats": 5,
"prefer_spark": true,
"amount_sats_to_send": 5000
}
}'
{
"method": "payLightningInvoice",
"data": {
"id": "2fb0b49e-0aef-4726-a348-2dd0a9432c12",
"created_at": "2025-07-24T16:43:12.509Z",
"updated_at": "2025-07-24T16:43:12.509Z",
"network": "MAINNET",
"encoded_invoice": "lnbc1230n1p...",
"fee": {
"original_value": 3,
"original_unit": "SATOSHI",
"preferred_currency_unit": "USD",
"preferred_currency_value_rounded": 0.01,
"preferred_currency_value_approx": 0.012
},
"status": "SUCCESS",
"typename": "LightningSendRequest"
}
}
Pay a Lightning Network invoice from a Spark wallet.
--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": "payLightningInvoice",
"network": "MAINNET",
"params": {
"invoice": "lnbc1230n1p...",
"max_fee_sats": 5,
"prefer_spark": true,
"amount_sats_to_send": 5000
}
}'
{
"method": "payLightningInvoice",
"data": {
"id": "2fb0b49e-0aef-4726-a348-2dd0a9432c12",
"created_at": "2025-07-24T16:43:12.509Z",
"updated_at": "2025-07-24T16:43:12.509Z",
"network": "MAINNET",
"encoded_invoice": "lnbc1230n1p...",
"fee": {
"original_value": 3,
"original_unit": "SATOSHI",
"preferred_currency_unit": "USD",
"preferred_currency_value_rounded": 0.01,
"preferred_currency_value_approx": 0.012
},
"status": "SUCCESS",
"typename": "LightningSendRequest"
}
}
--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": "payLightningInvoice",
"network": "MAINNET",
"params": {
"invoice": "lnbc1230n1p...",
"max_fee_sats": 5,
"prefer_spark": true,
"amount_sats_to_send": 5000
}
}'
{
"method": "payLightningInvoice",
"data": {
"id": "2fb0b49e-0aef-4726-a348-2dd0a9432c12",
"created_at": "2025-07-24T16:43:12.509Z",
"updated_at": "2025-07-24T16:43:12.509Z",
"network": "MAINNET",
"encoded_invoice": "lnbc1230n1p...",
"fee": {
"original_value": 3,
"original_unit": "SATOSHI",
"preferred_currency_unit": "USD",
"preferred_currency_value_rounded": 0.01,
"preferred_currency_value_approx": 0.012
},
"status": "SUCCESS",
"typename": "LightningSendRequest"
}
}
payLightningInvoice
MAINNET
, REGTEST
Hide child attributes
payLightningInvoice
prefer_spark
is false, a LightningSendRequest
object with the following fields:Hide child attributes
prefer_spark
is true, the response will be a Transfer
object with the following fields:Hide child attributes
Hide child attributes
Hide child attributes