Payments
Make payments through bolt11 or keysend.
BOLT11 payment
Scope needed: payments:send
Pay a lightning invoice (bolt11)
POST
https://api.getalby.com/payments/bolt11
Pay a bolt11 invoice.
Request Body
invoice*
string
invoice to be paid
{
"amount": 100,
"description": "Alby invoice",
"destination": "025c1d5d1b4c983cc6350fc2d756fbb59b4dc365e45e87f8e3afe07e24013e8220",
"fee": 0,
"payment_hash": "38caadbe0f6112d9b638e9ae24338f7e9bd930a3387100da776644e56965c9c1",
"payment_preimage": "2f84e22556af9919f695d7761f404e98ff98058b7d32074de8c0c83bf63eecd7",
"payment_request": "lnbcrt1u1p3d23dkpp58r92m0s0vyfdnd3caxhzgvu006dajv9r8pcspknhvezw26t9e8qsdq5g9kxy7fqd9h8vmmfvdjscqzpgxqyz5vqsp59efe44rg6cjl3xwh9glgx4ztcgwtg5l8uhry2v9v7s0zn2wpaz2s9qyyssq2z799an4pt4wtfy8yrk5ee0qqj7w5a74prz5tm8rulwez08ttlaz9xx7eqw7fe94y7t0600d03k55fyguyj24nd9tjmx6sf7dsxkk4gpkyenl8"
}
Keysend payment
Scope needed: payments:send
Send a "spontaneous" payment (keysend). Used for push realtime/streaming push payments
Keysend payment
POST
https://api.getalby.com/payments/keysend
Make a spontaneous keysend payment, with optional custom records. See for example: https://github.com/lightning/blips/blob/master/blip-0010.md
Request Body
amount*
int64
Amount in satoshi. Must be a whole number greater than 0. (millisats are not supported)
destination*
string
Destination hex-string pubkey (a string starting with 02 or 03)
memo
string
Internal memo
custom_records
map[string]string
{
"amount": 1000,
"description": "string",
"description_hash": "string",
"destination": "string",
"fee": 0,
"custom_records": {},
"payment_hash": "string",
"payment_preimage": "string"
}
Multi keysend payment
Scope needed: `payments:send` Send multiple spontaneous keysend payments. Useful for doing value4value splits. Request and response are an array of the single keysend payment request and response.
Make multiple keysend payments in 1 request
POST
https://api.getalby.com/payments/keysend/multi
Each of the payments can fail or succeed seperately.
Request Body
keysends*
Array
Array of keysend objects as described in the body parameters of the section above.
{
"keysends": [
{
"error": {
"code": 0,
"error": false,
"message": "string"
},
"keysend": {
"amount": 100,
"description": "test",
"description_hash": "string",
"destination": "0234",
"fee": 1,
"custom_records": {},
"payment_hash": "paymenthash",
"payment_preimage": "preimage"
}
}
]
}
Last updated
Was this helpful?