LNPay Docs
Search…
⌃K

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
curl -u sak_XXXXXXX: \
"https://api.lnpay.co/v1/wallet/wal_XXXXXXX/lnurl/withdraw?num_satoshis=3"
LNPay.Initialize('pak_O0iUMxk8kK_qUzkT4YKFvp1ZsUtp');
let lnurlParams = {"num_satoshis":12,"memo":"SatsBack!"};
let myWallet = new LNPayWallet('wa_Opnn4kGOGBMnfCLFXtsDnjTb');
myWallet.getLnurl(lnurlParams,
function(result) {
console.log(result);
}
);
lnpay_py.initialize('pak_O0iUMxk8kK_qUzkT4YKFvp1ZsUtp')
from lnpay_py.wallet import LNPayWallet
my_wallet = LNPayWallet('wa_Opnn4kGOGBMnfCLFXtsDnjTb')
lnurl_params = {
'num_satoshis': 1,
'memo': 'SatsBack!'
}
lnurl_link = my_wallet.get_lnurl(lnurl_params)
print(lnurl_link)