LNPay Docs
Search…
Get Invoice Status
Retrieve a LN transaction (invoice). This is usually used to see if a transaction has been settled or not, and for how much
get
https://api.lnpay.co
/v1/lntx/:lntx_id
GetLnTxObject
curl
JavaScript
Python
Node.js
curl -u sak_XXX: \
https://api.lnpay.co/v1/lntx/lntx_82yveCX2Wn0EkkdyzvyBv
LNPay.Initialize('pak_XXXXX');
let lntx_id = "lntx_82yveCX2Wn0EkkdyzvyBv";
let lntx = new LNPayLnTx(lntx_id);
lntx.getInfo(function(result) {
console.log("Is Settled" + result.settled);
}
);
lnpay_py.initialize('pak_O0iUMxk8kK_qUzkT4YKFvp1ZsUtp')
from lnpay_py.wallet import LNPayWallet
lntx_id = 'lntx_82yveCX2Wn0EkkdyzvyBv'
ln_tx = LNPayLnTx(lntx_id)
invoice_result = ln_tx.get_info()
print(invoice_result)
const lnpay = LNPay({
secretKey: 'sak_XXXXX'
});
const getInvoice = await lnpay.getInvoice({
id: 'lntx_82yveCX2Wn0EkkdyzvyBv',
});
Slim down the response size by appending the fields you want as query parameters
$ curl -u sak_XXXX: \
https://api.lnpay.co/v1/lntx/lntx_82yveCX2Wn0EkkdyzvyBv?fields=settled,num_satoshis
Copy link