latestOpenAPI 3.0.32026-08-224982,0272.8 MB
e445c15e5bee
Lightning
Create a lightning invoice
This API call is used to create a new lightning invoice which can be used for requesting and receiving payments over the lightning network.
post/api/v2/wallet/{walletId}/lightning/invoice
Path parameters
walletIdstring required
Example:59cd72485007a239fb00282ed480da1f
Request body
Example request
{
"valueMsat": "50000000",
"valueSat": 50000,
"memo": "Payment for services",
"expiry": 3600
}Response
OK
Example response
{
"memo": "Payment for the coffee",
"invoice": "lnbc500n1p3zv5vkpp5x0thcaz8wep54clc2xt5895azjdzmthyskzzh9yslggy74qtvl6sdpdg3hkuct5d9hkugrxdaezqjn0dphk2fmnypkk2mtsdahkccqzpgxqyz5vqsp5v80q4vq4pwakq2l0hcqgtelgajsymv4ud4jdcrqtnzhvet55qlus9qyyssquqh2wl2m866qs5n72c5vg6wmqx9vzwhs5ypualq4mcu76h2tdkcq3jtjwtggfff7xwtdqxlnwqk8cxpzryjghrmmq3syraswp9vjr7cqry9l96",
"paymentHash": "63d9ce82e09d16761a85116ed8b65407db4fb22f85d03573de09c480f2c6d175",
"valueMsat": "50000",
"expiresAt": "2022-04-01T18:46:24.677Z",
"walletId": "59cd72485007a239fb00282ed480da1f",
"createdAt": "2022-04-01T18:46:24.677Z",
"updatedAt": "2022-04-01T18:46:24.677Z"
}