Skip to content

Commit debcea2

Browse files
committed
feat: added documentation about registration verified event.
Registration.verified the the new event we have. This event is tied to an user while the other events are tied to an integration.
1 parent e1512dc commit debcea2

File tree

2 files changed

+24
-10
lines changed

2 files changed

+24
-10
lines changed

source/includes/_webhooks.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@ description of these notifications, see [Events](#events).
55

66
In the case where the receiving server is unavailable, we will retry the webhook notification up to 10 times with an exponential backoff.
77

8+
9+
810
### The Webhook object
911

1012
> An example Webhook object
@@ -94,7 +96,7 @@ This endpoint retrieves all webhooks.
9496
Parameter | Required | Description
9597
--------- | ------- | -----------
9698
`Authorization` | True | Your Authorization Token.
97-
`Integration-ID` | True | Integration id.
99+
`Integration-ID` | True for integration-scoped webhooks | Having integration id in the header will list integration-scoped webhook along with user-scoped webhooks. If it ommited then only user-scoped webhooks will be listed.
98100

99101
### Query Parameters
100102

@@ -163,14 +165,14 @@ This endpoint creates a webhook.
163165
Parameter | Required | Description
164166
--------- | ------- | -----------
165167
`Authorization` | True | Your Authorization Token.
166-
`Integration-ID` | True | Integration id.
168+
`Integration-ID` | True for integration-scoped events | The integration id is requied if any of the events that is being registered is integration-scoped event.
167169
`Idempotency-key` | False | Idempotency key.
168170

169171
### Body Parameters
170172

171173
Parameter | Type | Required | Default | Notes
172174
--------- | ---- | -------- | ------- |------------
173-
`id` | String | False | uuid4() | Unique per [Integration](#integrations).
175+
`id` | String | False | uuid4() | Unique per user account or integration.
174176
`url` | URL | True | |
175177
`events` | String[] | True | |
176178
`secret_key` | String | False | 32 char random string |
@@ -230,7 +232,7 @@ This endpoint retrieves a webhook.
230232
Parameter | Required | Description
231233
--------- | ------- | -----------
232234
`Authorization` | True | Your Authorization Token.
233-
`Integration-ID` | True | Integration id.
235+
`Integration-ID` | True for integration-scoped events | The integration id is requied if the webhook that's being retrieved contains one or more integration-scoped events.
234236

235237
### URL Parameters
236238

@@ -299,7 +301,7 @@ This endpoint updates a webhook.
299301
Parameter | Required | Description
300302
--------- | ------- | -----------
301303
`Authorization` | True | Your Authorization Token.
302-
`Integration-ID` | True | Integration id.
304+
`Integration-ID` | True for integration-scoped events | The integration id is requied if any of the events that is being updated is integration-scoped event.
303305

304306
### URL Parameters
305307

@@ -311,7 +313,7 @@ Parameter | Required | Description
311313

312314
Parameter | Type | Required | Default | Notes
313315
--------- | ---- | -------- | ------- |------------
314-
`id` | String | False | Previous value | Unique per [Integration](#integrations).
316+
`id` | String | False | Previous value | Unique per user account or integration.
315317
`url` | URL | False | Previous value |
316318
`events` | String[] | False | Previous value |
317319
`secret_key` | String | False |Previous value |
@@ -387,7 +389,7 @@ This endpoint replaces a webhook.
387389
Parameter | Required | Description
388390
--------- | ------- | -----------
389391
`Authorization` | True | Your Authorization Token.
390-
`Integration-ID` | True | Integration id.
392+
`Integration-ID` | True for integration-scoped events | The integration id is requied if any of the events that is being replaced is integration-scoped event.
391393

392394
### URL Parameters
393395

@@ -439,7 +441,6 @@ fetch("https://api.gigapay.se/v2/webhooks/481272/", {
439441

440442
> The above command returns an empty response.
441443
442-
443444
This endpoint deletes a webhook.
444445

445446
### HTTP Request
@@ -451,8 +452,7 @@ This endpoint deletes a webhook.
451452
Parameter | Required | Description
452453
--------- | ------- | -----------
453454
`Authorization` | True | Your Authorization Token.
454-
`Integration-ID` | True | Integration id.
455-
455+
`Integration-ID` | True for integration-scoped events | The integration id is requied if the webhook that is being deleted contains one or more integration-scoped events.
456456

457457
### URL Parameters
458458

source/index.html.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,23 @@ on the following events:
241241
- `Payout.accepted`
242242
- `Payrun.created`
243243
- `Payrun.paid`
244+
- `Registration.verified`
244245

245246
The notifications simply contain the object that triggered the event, as represented in the API.
246247

248+
### Webhook Types
249+
250+
**Integration-Scoped Webhooks**
251+
<br>
252+
These webhooks are tied to a specific integration and require an `Integration-ID` header for all operations.
253+
This includes events that start with `Employee`, `Payout`, or `Payrun`.
254+
255+
**User-Scoped Webhooks**
256+
<br>
257+
These webhooks are tied to your user account and do **not** require an `Integration-ID` header for any operations.
258+
This includes events that start with `Registration`.
259+
260+
247261
### Gigapay Signature
248262

249263
> Example code to verify a Gigapay Signature:

0 commit comments

Comments
 (0)