Skip to Content
Deposits

Deposit Lightning

POST/account/deposit/lightningPrivate

Create a Lightning invoice to deposit amount sats. Returns the deposit depositId and the invoice (paymentRequest), which expires after 24 hours. With descriptionHash, the invoice commits to that hash instead of a default description. Track the deposit with GET /account/deposits/lightning.

Permissions: account:deposits:write

Request Body

application/json
  1. body
amount*integer

Amount to deposit

Range0 < value
comment?string

Comment for the deposit

descriptionHash?string

Description hash for the deposit

Match^[a-f0-9]{64}$

Response Body

OK

application/json
  1. response
depositId*string

Deposit ID

paymentRequest*string

Payment request

import { createHttpClient } from '@ln-markets/sdk/rest/v3'

const client = createHttpClient({
  key: 'your-key',
  secret: 'your-secret',
  passphrase: 'your-passphrase',
})

const result = await client.account.depositLightning({
  amount: 1000
})
{
  "depositId": "66d68e66-b450-4ce2-a402-fd8c8dab828e",
  "paymentRequest": "lnbc13370n1pjufyndpp5p96cfwq662q0mkn7a0vy4h8rq5z6kw5q0lv60udwrhg8na909wwsdzcf38zqntpwf4k2arnypzx2ur0wd5hggp4x9jk2vp4vc6z6dtxx4nz6dryxqez6wpsxumz6cejvcmnzc3nxs6nwdehcqzzsxqzz6rzjqvk2judrj9wvqukxqpqdy3vrfdx4dueytnx4hpf70uf0r7ewlhmjuqqzpcqqqqgqqqqqqqlgqqqqqqgq2qsp5aynr4rr94ytesyx7pep2024ssdqjx7dj6m6ncckt0vt6nkcydp6q9qyyssqxx0r3nxy84ym9t5d4nrj2h90elhmmt5q7av3vq0tdcdxzpvu6fwpp96ejfkdg2fm8kuzkfp72qwxw24g4k73dalcn2gqzvmp3q369mqpydqr3r"
}