Webhook Endpoints
Create webhook endpoints to receive real-time notifications of the user's settled invoices.
Scope needed:
invoices:read
Creates a new webhook endpoint to receive notifications of settled invoices. Settled invoices are sent to the provided
url
as a POST request. Requests are sent with SVIX.The
endpoint_secret
in the response body should be saved by the client in order to verify webhook posts to url
. See the SVIX documentation on how to verify requests.post
https://api.regtest.getalby.com/webhook_endpoints
{
"amount": 1,
"boostagram": null,
"comment": "",
"created_at": "2023-05-02T07:44:12.539Z",
"creation_date": null,
"currency": "btc",
"custom_records": null,
"description_hash": "98e84064556c24bd178604f1afcf6bc0f54a71aeb31b339f376d8800624beb07",
"expires_at": null,
"expiry": 900,
"fiat_currency": "USD",
"fiat_in_cents": 1,
"identifier": "L3mxEsddibFB8cxJkcGktw3s",
"keysend_message": null,
"memo": null,
"metadata": {},
"payer_name": null,
"payer_pubkey": null,
"payment_hash": "eacccf1b84158802623db7dbcb1141eae614e4682bdd15d3b561f744659fceb6",
"payment_request": "lntb10n1pj9p06vpp5atxv7xuyzkyqyc3aklduky2patnpferg90w3t5a4v8m5gevle6mqhp5nr5yqez4dsjt69uxqnc6lnmtcr655udwkvdn88ehdkyqqcjtavrscqzzsxqyz5vqsp5r4d5e0afskjhjn7fga9yd7rsvg29pyvkrd4efwswwm8sg0hyhyds9qyyssq6u3ex7es4pez2q8hkl0md3vv65w6ma4ushnwzt3gup5vnfd7kfx5lvcsc88hxgq567knlmzjcrfak5jh03kxx50x3dpnjm09gl6ksagq4rumf7",
"r_hash_str": "eacccf1b84158802623db7dbcb1141eae614e4682bdd15d3b561f744659fceb6",
"settled": true,
"settled_at": "2023-05-02T07:44:13.000Z",
"state": "SETTLED",
"type": "incoming",
"value": 1
}
{
"amount": 21,
"boostagram": {
"action": "boost",
"app_name": "webln demo",
"message": "hello from webln",
"name": "satoshi",
"sender_name": "bumi",
"value_msat_total": 21000
},
"comment": "hello from webln",
"created_at": "2023-05-03T08:22:23.030Z",
"creation_date": 1683102142,
"currency": "btc",
"custom_records": {
"696969": "cWQ5VVgxYVNKUTVMcmkxRWx6U3o=",
"7629169": "eyJhY3Rpb24iOiJib29zdCIsInZhbHVlX21zYXRfdG90YWwiOjIxMDAwLCJhcHBfbmFtZSI6IndlYmxuIGRlbW8iLCJzZW5kZXJfbmFtZSI6ImJ1bWkiLCJuYW1lIjoic2F0b3NoaSIsIm1lc3NhZ2UiOiJoZWxsbyBmcm9tIHdlYmxuIn0="
},
"description_hash": null,
"expires_at": "2023-05-03T08:37:22.000Z",
"expiry": 900,
"fiat_currency": "USD",
"fiat_in_cents": 1,
"identifier": "QMYTg3PKDskease4svYJbM28",
"keysend_message": null,
"memo": "",
"metadata": null,
"payer_name": "bumi",
"payer_pubkey": null,
"payment_hash": "0f2e034d7bcd321ae7e0382f4bd29e4562802b41f9f2b301aa2b055a1c638c84",
"payment_request": "",
"r_hash_str": "0f2e034d7bcd321ae7e0382f4bd29e4562802b41f9f2b301aa2b055a1c638c84",
"settled": true,
"settled_at": "2023-05-03T08:22:22.000Z",
"state": "SETTLED",
"type": "incoming",
"value": 21
}
Scope needed:
invoices:read
Get details about a created webhook endpoint.
get
https://api.regtest.getalby.com/webhook_endpoints
/{id}
Scope needed:
invoices:read
Delete a webhook endpoint to stop receiving notifications of settled invoices.
delete
https://api.regtest.getalby.com/webhook_endpoints
/{id}
Last modified 19d ago