Implement the payouts.added
webhook to know when a payout object is added.
A new payout object is added after a periodic scan when a user receives a new paystub. If the scan detects more than one paystub, then the added_count
value in the payload reflects this.
Event
payouts.added
Payload
Attribute | Type | Description |
---|---|---|
account | string uuid | ID of the account the payouts were added to. |
user | string uuid | ID of the user associated with the account. |
added_from | string timestamp | Represents the start of the time period the payouts were added for. The added_from timestamp will precede the added_to timestamp.To get the added payouts, you can query the payouts endpoint by specifying the added_from , added_to range in the request parameters. |
added_to | string timestamp | Represents the end of the time period the payouts are added for. |
added_count | integer | The number of payouts added to the account. |
available_from | string timestamp | Represents the start of the time period the payouts are available for. The available_from timestamp will precede the available_to timestamp. |
available_to | string timestamp | Represents the end of the time period the payouts are available for. |
available_count | integer | The total number of payouts associated with the account at the moment the webhook call is made. |
Examples
curl -X POST https://api.argyle.com/v1/webhooks \
-u api_key_id:api_key_secret \
-H "Content-Type: application/json" \
-d '{"events": ["payouts.added"],
"secret": "<secret for signature verification>",
"name": "payouts.added",
"url": "https://webhook.site/url"}'
{
"event": "payouts.added",
"name": "Payouts added",
"data": {
"account": "12db5af4-fd5f-4d1f-bd98-0360df770aa8",
"user": "abdb5af4-fd5f-4d1f-bd10-0360df77012c",
"added_from": "2019-08-07T20:12:09Z",
"added_to": "2019-09-23T23:57:31Z",
"added_count": 10,
"available_from": "2019-03-07T20:12:09Z",
"available_to": "2019-09-23T23:57:31Z",
"available_count": 456
}
}