LNPay Docs
Search…
Disposable LNURL-withdraw
This endpoint allows generation of disposable ONE-TIME use LNURLs. This is good for controlling how often and when users can withdraw from a wallet. Upon successful withdrawal, the LNURL is invalid
get
https://api.lnpay.co/v1/wallet
/:wallet_key/lnurl/withdraw
GetWalletLnurlWithdraw
Note: These LNURLs are ONE-TIME use. This is to prevent repeated access to the wallet.
the ott is a One-Time-Token that is encoded in the LNURL and saved by the wallet to verify
curl
JavaScript
Python
1
curl -u sak_XXXXXXX: \
2
"https://api.lnpay.co/v1/wallet/wal_XXXXXXX/lnurl/withdraw?num_satoshis=3"
Copied!
1
LNPay.Initialize('pak_O0iUMxk8kK_qUzkT4YKFvp1ZsUtp');
2
3
let lnurlParams = {"num_satoshis":12,"memo":"SatsBack!"};
4
let myWallet = new LNPayWallet('wa_Opnn4kGOGBMnfCLFXtsDnjTb');
5
myWallet.getLnurl(lnurlParams,
6
function(result) {
7
console.log(result);
8
}
9
);
Copied!
1
lnpay_py.initialize('pak_O0iUMxk8kK_qUzkT4YKFvp1ZsUtp')
2
from lnpay_py.wallet import LNPayWallet
3
4
my_wallet = LNPayWallet('wa_Opnn4kGOGBMnfCLFXtsDnjTb')
5
lnurl_params = {
6
'num_satoshis': 1,
7
'memo': 'SatsBack!'
8
}
9
lnurl_link = my_wallet.get_lnurl(lnurl_params)
10
print(lnurl_link)
Copied!
Last modified 5mo ago
Copy link