LNPay Docs
Search…
Keysend
Initiate a keysend payment from your wallet to a destination pubkey
post
https://api.lnpay.co
/v1/wallet/:wallet_key/keysend
PostWalletKeysend
FAILURE_REASON_NO_ROUTE is a common error that means one of two things
    There is no route because the fee_limit_msat is too low or the default 5% is too low (this is usually the issue)
    There is no route because the lightning node cannot find a path (sometimes this happens with private nodes, or new nodes)
Check the QueryRoutes endpoint for help in determining what the issue is.
cURL
Node.js
1
curl -u sak_XXXXXXX: \
2
-H "Content-Type: application/json" \
3
-X POST \
4
-d '{"dest_pubkey":"033868c219bdb51a33560d854d500fe7d3898a1ad9e05dd89d0007e11313588500","num_satoshis":2}' \
5
https://api.lnpay.co/v1/wallet/waka_XXXXXXX/keysend
6
7
# Note we are using the "admin" access_key as denoted by "wa_"
Copied!
1
const lnpay = LNPay({
2
secretKey: 'sak_XXXXX',
3
walletAccessKey: 'wal_XXXXX',
4
});
5
6
const keysend = await lnpay.keysend({
7
passTru: {
8
order_id: '100',
9
},
10
dest_pubkey: '033868c219bdb51a3...',
11
num_satoshis: 1,
12
});
Copied!
Last modified 3mo ago
Copy link