Paystubs Webhooks

Sent when paystubs are added or updated.

If you need to access to paystubs as soon as they are available:

  • The paystubs.partially_synced webhook is sent when paystubs going back a specified number of days (starting from the date of the most recent paystub) have been retrieved during initial data retrieval for a newly connected account.
  • The paystubs.fully_synced webhook is sent when all paystubs have been retrieved during initial data retrieval for a newly connected account.

#Added

post/v2/webhooks

The paystubs.added webhook is sent only when an account's data is refreshed (does not include initial data retrieval) and a new paystub is retrieved.

Request body
  • #
    eventsarray of strings
    required

    paystubs.added

  • #
    namestring
    required

    Your name for the webhook subscription.

  • #
    urlstring
    required

    Where you want to receive webhook delivery. This can be either a backend URL that you manage, or a URL provided by a webhook management service.

  • #
    secretstring
    optional

    Optional secret used to verify webhooks.

Webhook message
  • #
    eventstring

    paystubs.added

  • #
    namestring

    Name used for the webhook subscription.

  • #
    dataobject

  • #
    accountstring (uuid)

    ID of the account.

  • #
    userstring (uuid)

    ID of the user.

  • #
    available_fromstring

    Timestamp (ISO 8601) of the earliest available paystub.

  • #
    available_tostring

    Timestamp (ISO 8601) of the most recent paystub.

  • #
    available_countstring

    Number of paystubs currently available for this account.

  • #
    added_countstring

    Number of paystubs retrieved during a data refresh.

  • #
    added_fromstring

    Timestamp (ISO 8601) of the earliest paystub retrieved during a data refresh.

  • #
    added_tostring

    Timestamp (ISO 8601) of the most recent paystub retrieved during a data refresh.

Example Subscription
1curl --request POST \
2     --url https://api.argyle.com/v2/webhooks \
3     --header 'accept: application/json' \
4     --header 'content-type: application/json' \
5     --data '{
6        "events": ["paystubs.added"],
7        "name": "name-for-the-webhook-subscription",
8        "url": "https://your-webhook-backend.com",
9        "secret": "optional-secret"
10     }'
Example Webhook
1{
2  "event": "paystubs.added",
3  "name": "name-for-the-webhook-subscription",
4  "data": {
5    "account": "0187c66e-e7e5-811c-b006-2232f00f426a",
6    "user": "018051aa-f7a9-a0db-2f38-6cfa325e9d69",
7    "available_from": "2020-04-16T05:32:41Z",
8    "available_to": "2023-03-03T00:00:00Z",
9    "available_count": 80,
10    "added_count": 3,
11    "added_from": "2023-02-03T00:00:00Z",
12    "added_to": "2023-03-03T00:00:00Z"
13  }
14}

#Updated

post/v2/webhooks

The paystubs.updated webhook is sent when there is any change to a property value of the paystub object.

For example, after a payment is sent the paystub object's status value changes from scheduled to completed.

Request body
  • #
    eventsarray of strings
    required

    paystubs.updated

  • #
    namestring
    required

    Your name for the webhook subscription.

  • #
    urlstring
    required

    Where you want to receive webhook delivery. This can be either a backend URL that you manage, or a URL provided by a webhook management service.

  • #
    secretstring
    optional

    Optional secret used to verify webhooks.

Webhook message
  • #
    eventstring

    paystubs.updated

  • #
    namestring

    Name used for the webhook subscription.

  • #
    dataobject

  • #
    accountstring (uuid)

    ID of the account.

  • #
    userstring (uuid)

    ID of the user.

  • #
    available_fromstring

    Timestamp (ISO 8601) of the account's earliest available paystub.

  • #
    available_tostring

    Timestamp (ISO 8601) of the account's most recent paystub.

  • #
    available_countstring

    Number of paystubs currently available for this account.

  • #
    updated_countstring

    Number of paystubs updated.

  • #
    updated_paystubsarray of strings (uuid's)

    ID's of the updated paystubs.

  • #
    updated_fromstring

    Timestamp (ISO 8601) of the earliest updated paystub.

  • #
    updated_tostring

    Timestamp (ISO 8601) of the most recent updated paystub.

Example Subscription
1curl --request POST \
2     --url https://api.argyle.com/v2/webhooks \
3     --header 'accept: application/json' \
4     --header 'content-type: application/json' \
5     --data '{
6        "events": ["paystubs.updated"],
7        "name": "name-for-the-webhook-subscription",
8        "url": "https://your-webhook-backend.com",
9        "secret": "optional-secret"
10     }'
Example Webhook
1{
2  "event": "paystubs.updated",
3  "name": "name-for-the-webhook-subscription",
4  "data": {
5    "account": "0187c66e-e7e5-811c-b006-2232f00f426a",
6    "user": "018051aa-f7a9-a0db-2f38-6cfa325e9d69",
7    "available_from": "2020-04-16T05:32:41Z",
8    "available_to": "2023-03-03T00:00:00Z",
9    "available_count": 80,
10    "updated_count": 2,
11    "updated_paystubs": [
12      "0187dc99-63be-bc96-51bf-af6b51d43687",
13      "0199db32-22cd-cc87-12fa-ae2b21e43334"
14    ],
15    "updated_from": "2023-01-01T00:00:00Z",
16    "updated_to": "2023-03-03T00:00:00Z"
17  }
18}

#Partially synced

post/v2/webhooks

The paystubs.partially_synced webhook is sent when paystubs going back a specified number of days (starting from the date of the most recent paystub) have been retrieved. The default number of days is 30 days.

You can subscribe to this webhook multiple times with different numbers of specified days.

Of note:

  • This webhook is sent only during initial data retrieval (not ongoing refresh).
  • If the number of paystubs for an account is small and captured completely with only one data pull, this webhook will not be sent. Instead the paystubs.fully_synced webhook will be sent.
Request body
  • #
    eventsarray of strings
    required

    paystubs.partially_synced

  • #
    namestring
    required

    Your name for the webhook subscription.

  • #
    urlstring
    required

    Where you want to receive webhook delivery. This can be either a backend URL that you manage, or a URL provided by a webhook management service.

  • #
    secretstring
    optional

    Optional secret used to verify webhooks.

  • #
    configobject
    optional

    "days_synced": <Integer> specifies how many days of synced paystubs (starting from the date of the most recent paystub) are needed to trigger the webhook.

Webhook message
  • #
    eventstring

    paystubs.partially_synced

  • #
    namestring

    Name used for the webhook subscription.

  • #
    dataobject

  • #
    accountstring (uuid)

    ID of the account.

  • #
    userstring (uuid)

    ID of the user.

  • #
    available_fromstring

    Timestamp (ISO 8601) of the account's earliest available paystub from the synced time period.

  • #
    available_tostring

    Timestamp (ISO 8601) of the account's most recent paystub from the synced time period.

  • #
    available_countstring

    Number of paystubs currently available for this account at the time this webhook is sent.

  • #
    days_syncedstring

    Number of days of synced paystubs.

Example Subscription
1curl --request POST \
2     --url https://api.argyle.com/v2/webhooks \
3     --header 'accept: application/json' \
4     --header 'content-type: application/json' \
5     --data '{
6        "events": ["paystubs.partially_synced"],
7        "name": "name-for-the-webhook-subscription",
8        "url": "https://your-webhook-backend.com",
9        "secret": "optional-secret",
10        "config": { "days_synced": 60 }
11     }'
Example Webhook
1{
2  "event": "paystubs.partially_synced",
3  "name": "name-for-the-webhook-subscription",
4  "data": {
5    "account": "0187c66e-e7e5-811c-b006-2232f00f426a",
6    "user": "018051aa-f7a9-a0db-2f38-6cfa325e9d69",
7    "available_from": "2023-01-01T00:00:00Z",
8    "available_to": "2023-02-02T23:59:59Z",
9    "available_count": 4,
10    "days_synced": 60
11  }
12}

#Fully synced

post/v2/webhooks

The paystubs.fully_synced webhook is sent when all paystubs have been retrieved from a newly connected payroll account.

Request body
  • #
    eventsarray of strings
    required

    paystubs.fully_synced

  • #
    namestring
    required

    Your name for the webhook subscription.

  • #
    urlstring
    required

    Where you want to receive webhook delivery. This can be either a backend URL that you manage, or a URL provided by a webhook management service.

  • #
    secretstring
    optional

    Optional secret used to verify webhooks.

Webhook message
  • #
    eventstring

    paystubs.fully_synced

  • #
    namestring

    Name used for the webhook subscription.

  • #
    dataobject

  • #
    accountstring (uuid)

    ID of the account.

  • #
    userstring (uuid)

    ID of the user.

  • #
    available_fromstring

    Timestamp (ISO 8601) of the account's earliest available paystub.

  • #
    available_tostring

    Timestamp (ISO 8601) of the account's most recent paystub.

  • #
    available_countstring

    Number of paystubs currently available for this account.

Example Subscription
1curl --request POST \
2     --url https://api.argyle.com/v2/webhooks \
3     --header 'accept: application/json' \
4     --header 'content-type: application/json' \
5     --data '{
6        "events": ["paystubs.fully_synced"],
7        "name": "name-for-the-webhook-subscription",
8        "url": "https://your-webhook-backend.com",
9        "secret": "optional-secret"
10     }'
Example Webhook
1{
2  "event": "paystubs.fully_synced",
3  "name": "name-for-the-webhook-subscription",
4  "data": {
5    "account": "0187c66e-e7e5-811c-b006-2232f00f426a",
6    "user": "018051aa-f7a9-a0db-2f38-6cfa325e9d69",
7    "available_from": "2020-04-16T05:32:41Z",
8    "available_to": "2023-02-02T23:59:59Z",
9    "available_count": 77
10  }
11}
Updating Argyle status...
┬ę 2024 Argyle Systems Inc.argyle.com