Overview
Webhooks provide real-time notifications to your system when events take place, or new data is added, updated, or deleted.Example scenarios:
- A new payroll connection is attempted.
- Data retrieval from a recently connected account has completed.
- New data is available for a connected account.
- A deposit switch is successful.
Webhooks are not specific to individual users or accounts.
For example, if you are subscribed to the
identities.added webhook, new identity information added to any account of any user will cause the webhook to be delivered.Additional resources:
Webhooks are not designed to be a primary source of analytics information. For detailed metrics on step-by-step conversion success rates, visit the Conversion area of Console’s Dashboard or contact your customer success manager.
Subscribing to webhooks
Send a POST request to the/v2/webhooks API endpoint. In the request body, include a JSON object in the format:
-
events— List all webhooks to include in the subscription.To subscribe to all webhooks at once, use"*".- This method will not subscribe you to any Items webhooks.
- This method does not allow you to specify the number of days synced for the
paystubs.partially_syncedandgigs.partially_syncedwebhooks. - For webhooks that have an optional
configparameter (used to return an account object in the webhook’s payload), you must subscribe to these webhooks individually to receive this optional account object.
-
name— Your name for the set of webhooks in the subscription. -
url— 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. Argyle delivers webhooks from four static IP addresses:34.27.251.22634.122.50.25335.188.163.11535.226.53.251
-
secret— (Optional) A secret word or phrase that can be used to authenticate webhooks you receive. See below for more information on verifying webhooks. -
config— (Optional) Some webhooks will return a payload wheninclude_resourceis set totrue.
Verifying webhooks
When you receive webhooks that were subscribed to using an optionalsecret, an Argyle signature will be included in the header. The secret can be any string of characters.
Steps
To verify the authenticity of a webhook:- Use
HMAC-SHA512to directly encode the received payload body without any added adjustments. Use the webhook’ssecretas the secret key for encoding. - The webhook is genuine if the encoded payload matches the Argyle signature in the header.
Example signature
If yoursecret was my little secret
…the following webhook body:
Example validation
using Node:
Webhook management
List all webhooks
Send a GET request to the/v2/webhooks API endpoint.
Optional query parameters:
Optional query parameters:
from_created_at— Filter for webhooks created on or after this timestamp (ISO 8601).to_created_at— Filter for webhooks created on or before this timestamp (ISO 8601).ordering— Useidto order the list results by webhook ID. Usecreated_atto order the list results by when the webhooks were created.limit— Limit the number of results returned per page. Default: 10. Maximum: 200.
When you list all webhooks, the last time a particular webhook was sent by Argyle is returned in a
last_sent_at field. This field can be used for troubleshooting purposes to determine if a webhook was either not sent by Argyle, or sent by Argyle but not received by your webhook system.Retrieve a webhook
Send a GET request to the/v2/webhooks/{id} API endpoint, and replace the {id} with the webhook’s ID.
Delete a webhook
Send a DELETE request to the/v2/webhooks/{id} API endpoint, and replace the {id} with the webhook’s ID.
Webhook ID’s are returned in the API response when subscribing to webhooks, or can be found by listing webhooks.