--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"
}
}
privy-authorization-signature
Request authorization signature. If multiple signatures are required, they should be comma
separated.
Path Parameters
Body
Available options: payLightningInvoice
Available options: MAINNET
, REGTEST
The BOLT11 Lightning invoice to pay.
Maximum fee (in sats) the payer is willing to pay.
Whether to prefer paying on Spark. If true, will return a Transfer object. Defaults to false.
Amount to pay in sats. Required only for zero-amount invoices.
Returns
Available options: payLightningInvoice
If prefer_spark
is false, a LightningSendRequest
object with the following fields:
preferred_currency_value_rounded
preferred_currency_value_approx
If prefer_spark
is true, the response will be a Transfer
object with the following fields:
sender_identity_public_key
receiver_identity_public_key
Each item contains transfer metadata and encrypted leaf information.
owner_identity_public_key
A mapping from signer identifier to public share