curl --request POST \
--url https://api-sandbox.argyle.com/v2/webhooks \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [
"paystubs.partially_synced"
],
"name": "name-for-the-webhook-subscription",
"url": "https://your-webhook-backend.com",
"secret": "optional-secret",
"config": {
"days_synced": 60
}
}
'import requests
url = "https://api-sandbox.argyle.com/v2/webhooks"
payload = {
"events": ["paystubs.partially_synced"],
"name": "name-for-the-webhook-subscription",
"url": "https://your-webhook-backend.com",
"secret": "optional-secret",
"config": { "days_synced": 60 }
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
events: ['paystubs.partially_synced'],
name: 'name-for-the-webhook-subscription',
url: 'https://your-webhook-backend.com',
secret: 'optional-secret',
config: {days_synced: 60}
})
};
fetch('https://api-sandbox.argyle.com/v2/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.argyle.com/v2/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'events' => [
'paystubs.partially_synced'
],
'name' => 'name-for-the-webhook-subscription',
'url' => 'https://your-webhook-backend.com',
'secret' => 'optional-secret',
'config' => [
'days_synced' => 60
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.argyle.com/v2/webhooks"
payload := strings.NewReader("{\n \"events\": [\n \"paystubs.partially_synced\"\n ],\n \"name\": \"name-for-the-webhook-subscription\",\n \"url\": \"https://your-webhook-backend.com\",\n \"secret\": \"optional-secret\",\n \"config\": {\n \"days_synced\": 60\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.argyle.com/v2/webhooks")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"events\": [\n \"paystubs.partially_synced\"\n ],\n \"name\": \"name-for-the-webhook-subscription\",\n \"url\": \"https://your-webhook-backend.com\",\n \"secret\": \"optional-secret\",\n \"config\": {\n \"days_synced\": 60\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.argyle.com/v2/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"events\": [\n \"paystubs.partially_synced\"\n ],\n \"name\": \"name-for-the-webhook-subscription\",\n \"url\": \"https://your-webhook-backend.com\",\n \"secret\": \"optional-secret\",\n \"config\": {\n \"days_synced\": 60\n }\n}"
response = http.request(request)
puts response.read_body{
"event": "paystubs.partially_synced",
"name": "<string>",
"data": {
"account": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"available_from": "2023-11-07T05:31:56Z",
"available_to": "2023-11-07T05:31:56Z",
"available_count": 123,
"days_synced": 123
}
}{
"error": "<string>"
}Paystubs.partially_synced webhook
The paystubs.partially_synced webhook is sent after the requested range of historical paystub data has been retrieved.
curl --request POST \
--url https://api-sandbox.argyle.com/v2/webhooks \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [
"paystubs.partially_synced"
],
"name": "name-for-the-webhook-subscription",
"url": "https://your-webhook-backend.com",
"secret": "optional-secret",
"config": {
"days_synced": 60
}
}
'import requests
url = "https://api-sandbox.argyle.com/v2/webhooks"
payload = {
"events": ["paystubs.partially_synced"],
"name": "name-for-the-webhook-subscription",
"url": "https://your-webhook-backend.com",
"secret": "optional-secret",
"config": { "days_synced": 60 }
}
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({
events: ['paystubs.partially_synced'],
name: 'name-for-the-webhook-subscription',
url: 'https://your-webhook-backend.com',
secret: 'optional-secret',
config: {days_synced: 60}
})
};
fetch('https://api-sandbox.argyle.com/v2/webhooks', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-sandbox.argyle.com/v2/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'events' => [
'paystubs.partially_synced'
],
'name' => 'name-for-the-webhook-subscription',
'url' => 'https://your-webhook-backend.com',
'secret' => 'optional-secret',
'config' => [
'days_synced' => 60
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-sandbox.argyle.com/v2/webhooks"
payload := strings.NewReader("{\n \"events\": [\n \"paystubs.partially_synced\"\n ],\n \"name\": \"name-for-the-webhook-subscription\",\n \"url\": \"https://your-webhook-backend.com\",\n \"secret\": \"optional-secret\",\n \"config\": {\n \"days_synced\": 60\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-sandbox.argyle.com/v2/webhooks")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"events\": [\n \"paystubs.partially_synced\"\n ],\n \"name\": \"name-for-the-webhook-subscription\",\n \"url\": \"https://your-webhook-backend.com\",\n \"secret\": \"optional-secret\",\n \"config\": {\n \"days_synced\": 60\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-sandbox.argyle.com/v2/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"events\": [\n \"paystubs.partially_synced\"\n ],\n \"name\": \"name-for-the-webhook-subscription\",\n \"url\": \"https://your-webhook-backend.com\",\n \"secret\": \"optional-secret\",\n \"config\": {\n \"days_synced\": 60\n }\n}"
response = http.request(request)
puts response.read_body{
"event": "paystubs.partially_synced",
"name": "<string>",
"data": {
"account": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"available_from": "2023-11-07T05:31:56Z",
"available_to": "2023-11-07T05:31:56Z",
"available_count": 123,
"days_synced": 123
}
}{
"error": "<string>"
}- 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_syncedwebhook will be sent.
Authorizations
Username = api_key_id, Password = api_key_secret
Body
Request body for subscribing to the paystubs.partially_synced webhook.
List of events to subscribe to. Must include paystubs.partially_synced.
Value is paystubs.partially_synced
paystubs.partially_synced Your name for the webhook subscription. Name used for the webhook subscription.
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 handles URL encoding for webhook URLs. Send the URL in its normal, unencoded form. URL where you want to receive webhook delivery.
Optional secret used to verify webhooks. Secret used to verify webhooks.
"days_synced": <Integer> specifies how many days of paystub history must be synced, counted backward from account.created_at, before the webhook is sent.
Show child attributes
Show child attributes