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
1
curl -u sak_XXX: \
2
https://api.lnpay.co/v1/lntx/lntx_82yveCX2Wn0EkkdyzvyBv
Copied!
1
LNPay.Initialize('pak_XXXXX');
2
3
let lntx_id = "lntx_82yveCX2Wn0EkkdyzvyBv";
4
let lntx = new LNPayLnTx(lntx_id);
5
lntx.getInfo(function(result) {
6
console.log("Is Settled" + result.settled);
7
}
8
);
Copied!
1
lnpay_py.initialize('pak_O0iUMxk8kK_qUzkT4YKFvp1ZsUtp')
2
from lnpay_py.wallet import LNPayWallet
3
4
lntx_id = 'lntx_82yveCX2Wn0EkkdyzvyBv'
5
ln_tx = LNPayLnTx(lntx_id)
6
invoice_result = ln_tx.get_info()
7
print(invoice_result)
Copied!
1
const lnpay = LNPay({
2
secretKey: 'sak_XXXXX'
3
});
4
5
const getInvoice = await lnpay.getInvoice({
6
id: 'lntx_82yveCX2Wn0EkkdyzvyBv',
7
});
Copied!
Slim down the response size by appending the fields you want as query parameters
1
$ curl -u sak_XXXX: \
2
https://api.lnpay.co/v1/lntx/lntx_82yveCX2Wn0EkkdyzvyBv?fields=settled,num_satoshis
Copied!
Last modified 3mo ago
Copy link