Retrieve Wallet

Get the wallet object which includes current balance. See Access Keys

get
GetWallet

https://api.lnpay.co/v1/wallet/:wallet_key
Returns info about the wallet, including balance.
Request
Response
Request
Path Parameters
wallet_key
required
string
wal_ for server side wakr_ for client side
Response
200: OK
Returns: Wallet
{
"id":"wal_czDztN5eJ4r5sJ",
"created_at":1582461859,
"updated_at":1618419816,
"user_label":"My Postman Collection Wallet",
"balance":74, #Sats
"balance_msat":null,
"statusType":{
"type":"wallet",
"name":"active",
"display_name":"Active"
},
"walletType":{
"name":"generic_wallet",
"display_name":"Generic Wallet"
}
}

See the Access Keys section on how to define wallet_key

cURL
Node.js
Python
JavaScript
cURL
curl -u sak_XXXXXXX: \
https://api.lnpay.co/v1/wallet/wal_XXXXXX
Node.js
const lnpay = LNPay({
secretKey: 'sak_XXXXX'
});
const balance = await lnpay.getBalance();
console.log(balance);
Python
lnpay_py.initialize('sak_XXXXXXX')
my_wallet = LNPayWallet('wr_XXXXXXX')
info = my_wallet.get_info()
print(info)
JavaScript
LNPay.Initialize('pak_XXXXXXX');
let myWallet = new LNPayWallet('wakr_XXXXXX');
myWallet.getInfo(function(result) {
console.log('Balance:' + result.balance);
}
);