LNURL Withdraw

get
GetWalletLnurlWithdraw

https://lnpay.co/v1/wallet/:wallet_access_key/lnurl/withdraw
Generate an LNURL-withdraw link.
Request
Response
Request
Path Parameters
wallet_access_key
required
string
access_key with admin permission
Query Parameters
public
optional
boolean
(default: false) if set to true, the LNURL will be a one-time allowable withdraw for the amount set with no sensitive data in the LNURL. Good for public use.
passThru
optional
string
base64 encoded json of data to use in webhooks, etc
memo
optional
string
memo for the invoice
num_satoshis
optional
integer
Max number of satoshis this LNURL is good for. If blank max wallet balance is used
Response
200: OK
LNURL generated
{
"lnurl":"LNURL1DP68GURN8GHJ7MRWWPSHJTNRDUHHVVF0W4EK2U30WASKCMR9WSHHWC2LFACXUM35DDR5736ZF4HXVS6VGEV8GU6YDE49GC30D3H82UNV94C8YMMRV4EHX0M0W36R66MGD95KS4JGFADRS4ZRFEXK2SN2FFUXUSMHFA98XDZ8D3T9SDECWVHR43"
"ott":"Y4J9"
}

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
$ curl -u pak_O0iUMxk8kK_qUzkT4YKFvp1ZsUtp: \
https://lnpay.co/v1/wallet/wa_Opnn4kGOGBMnfCLFXtsDnjTb/lnurl/withdraw?num_satoshis=3
# We are using the "admin" access key in this instance as denoted by the "wa_"
JavaScript
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);
}
);
Python
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)