Skip to content

Commit

Permalink
docs: add missing status property to Webhook docs (#647)
Browse files Browse the repository at this point in the history
  • Loading branch information
michael1011 authored Aug 16, 2024
1 parent d0a6847 commit 54ba6b7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions docs/webhooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,16 @@ description: >-
To get the latest status of your swaps, you can poll the status endpoints of the
REST API, subscribe to the WebSocket, or set a webhook when creating the swap.

To register a webhook add the following object to the request that creates the
To register a webhook, add the following object to the request that creates the
swap:

```json
{
...
"webhook": {
"url": "<URL that should called>",
"hashSwapId": false
"hashSwapId": false,
"status": ["invoice.pending", "transaction.claim.pending"]
}
}
```
Expand All @@ -39,3 +40,6 @@ to false. When it is explicitly set to `true`, the swap id is hashed with SHA256
and encoded as HEX in the webhook call. That is useful when the webhook is
processed by a third party to which you do not want to leak information about
your swaps.

`status` is optional and is a list of swap status update events for which the
webhook should be called. If not set, the webhook will be called for all events.

0 comments on commit 54ba6b7

Please sign in to comment.