Get Balance

Get the wallet object which includes current balance

get
GetWallet

https://api.lnpay.co/v1/wallet/:wallet_access_key
Returns info about the wallet, including balance
Request
Response
Request
Path Parameters
wallet_access_key
required
string
Wallet Access Key (WAK)
Response
200: OK
{
"id":"wal_czDztN5eJ4r5sJ",
"created_at":1582461859,
"updated_at":1618419816,
"user_label":"My Postman Collection Wallet",
"balance":74,
"balance_msat":null,
"statusType":{
"type":"wallet",
"name":"active",
"display_name":"Active"
},
"walletType":{
"name":"generic_wallet",
"display_name":"Generic Wallet"
}
}
curl
JavaScript
Python
curl
$ curl -u sak_XXXXXXX: \
https://api.lnpay.co/v1/wallet/wakr_XXXXX
# We are using the "read" access key in this instance as denoted by the "wakr_"
JavaScript
LNPay.Initialize('sak_XXXXXXX');
let myWallet = new LNPayWallet('wr_XXXXXX');
myWallet.getInfo(function(result) {
console.log('Balance:' + result.balance);
}
);
Python
lnpay_py.initialize('sak_XXXXXXX')
my_wallet = LNPayWallet('wr_XXXXXXX')
info = my_wallet.get_info()
print(info)