pull down to refresh
reply
but how come that the curl Create Invoice API call works just fine?
curl -X POST https://lnbits.mydomain.tld/api/v1/payments -d '{"out": false, "amount": 1000, "memo":"testtest"}' -H "X-Api-Key: <my_invoice_key>" -H "Content-type: application/json"
reply
Does this error happen consistently with SN?
failed to create test invoice: Unable to connect to http://lnbits-phoenixd-phoenixd-1:9740
Afaict, we tried the domain you provided us (
lnbits.mydomain.tld
) but LNbits returned this error. Maybe it wasn't able to reach the container when it tried but it would work on retries?reply
The container must have reachable as it is running next to the Lnbits container, and I tried the curl command literally a few secs later, successfully.
That said, I went through the process again just now - and it magically works now. I can save the incoice key, without error message. Weird. but at least it works
reply
reply
It does work in the sense that it returns a proper BOLT11 invoice, But LNBits seems to convert msat -> sat incorrectly. 10000msat becomes a 100sat invoice amount (should be 10sats).
It's still not an explanation for the OP error message
reply
It appears that
msat
is not a valid unit
for LNBits, but instead of throwing an error, they just divide amount
by 100.I raised this issue: https://github.com/lnbits/lnbits/issues/2642
Let's see what they respond.
which shouldn't even be required when one has the admin_key, right??
Yes, but we store the admin key in your browser and the invoice key on the server since that's where we coordinate autowithdrawals and p2p zaps. We don't want to store spending permissions on the server so we need something restricted to receives for the server.
reply
phoenixd
with container namelnbits-phoenixd-phoenixd-1
, and for some reason SN is trying to access the local address when I press Save. It should use the Lnbits Create invoice POST api request... which I can confirm works just find with the Invoice key.