Enter at least two characters to search. Searching documentation… No matching sections. Try an endpoint, field or event name.
Retries and failures
View as MarkdownAnswer with any 2xx status within 15 seconds, the connection itself within 5. Anything else, including timeouts and redirects, is retried for about three days: after 1, 5 and 30 minutes, then 1, 2, 4 and 8 hours, then every 10 hours, 14 attempts in total. The endpoint's delivery log shows every delivery with its status and number of attempts, and the response code, the start of the response body and any error of its latest attempt; you can also resend a delivery by hand, under the same delivery id. The log keeps 30 days.
On this page
When a delivery runs out of attempts, the owners and admins of the account are emailed (at most once a day per endpoint). An endpoint that fails 15 deliveries in a row is switched off; switch it back on from the dashboard once your receiver works again. Test deliveries never count towards that, nor set off the email.
While an endpoint is switched off, new events are not queued for it, and deliveries still waiting for an attempt are marked failed, which you can resend from its delivery log once it is back on. Switching it back on does not send what it missed in the meantime. Test events you send from the dashboard are still delivered, so you can check your receiver before switching it back on.
Inspect failed deliveries
Replace the endpoint ID below with yours. The response includes each delivery ID, attempt count, response status and latest error; request bodies remain available only in the dashboard log. This request needs webhook_endpoints:read.
Copy failed. Select the code and copy it manually.
curl 'https://api.velirapay.com/v1/webhook-endpoints/9d2e0b8a-0000-4000-8000-000000000001/deliveries?status=failed' \
--fail-with-body --silent --show-error --max-time 30 \
-H "Authorization: Bearer ${VELIRAPAY_API_KEY:?Set VELIRAPAY_API_KEY}" \
-H 'Accept: application/json'
<?php
use VeliraPay\VeliraPayClient;
require __DIR__.'/vendor/autoload.php';
$apiKey = getenv('VELIRAPAY_API_KEY') ?: throw new RuntimeException('Set VELIRAPAY_API_KEY.');
$velirapay = new VeliraPayClient($apiKey, baseUrl: 'https://api.velirapay.com');
$deliveries = $velirapay->webhookEndpoints->deliveries('9d2e0b8a-0000-4000-8000-000000000001', ['status' => 'failed']);
echo json_encode($deliveries, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES | JSON_THROW_ON_ERROR), PHP_EOL;
use VeliraPay\Laravel\Facades\VeliraPay;
$deliveries = VeliraPay::webhookEndpoints()->deliveries('9d2e0b8a-0000-4000-8000-000000000001', ['status' => 'failed']);
const secretKey = process.env.VELIRAPAY_API_KEY;
if (!secretKey) throw new Error('Set VELIRAPAY_API_KEY.');
const response = await fetch('https://api.velirapay.com/v1/webhook-endpoints/9d2e0b8a-0000-4000-8000-000000000001/deliveries?status=failed', {
headers: {
Authorization: `Bearer ${secretKey}`,
Accept: 'application/json',
},
redirect: 'error',
signal: AbortSignal.timeout(30_000),
});
if (!response.ok) {
throw new Error(`VeliraPay ${response.status}: ${await response.text()}`);
}
const deliveries = response.status === 204 ? null : (await response.json()).data;
console.log(JSON.stringify(deliveries, null, 2));
import json
import os
import requests
api_key = os.environ["VELIRAPAY_API_KEY"]
response = requests.get(
"https://api.velirapay.com/v1/webhook-endpoints/9d2e0b8a-0000-4000-8000-000000000001/deliveries",
headers={
"Authorization": f"Bearer {api_key}",
"Accept": "application/json",
},
params={"status": "failed"},
timeout=(5, 30),
allow_redirects=False,
)
if not 200 <= response.status_code < 300:
raise RuntimeError(f"VeliraPay {response.status_code}: {response.text}")
deliveries = None if response.status_code == 204 else response.json()["data"]
print(json.dumps(deliveries, indent=2))
using System;
using System.Net;
using System.Net.Http;
using System.Net.Http.Headers;
using System.Text.Json;
var secretKey = Environment.GetEnvironmentVariable("VELIRAPAY_API_KEY")
?? throw new InvalidOperationException("Set VELIRAPAY_API_KEY.");
using var client = new HttpClient(new HttpClientHandler { AllowAutoRedirect = false })
{
Timeout = TimeSpan.FromSeconds(30),
};
using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.velirapay.com/v1/webhook-endpoints/9d2e0b8a-0000-4000-8000-000000000001/deliveries?status=failed");
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", secretKey);
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
using var response = await client.SendAsync(request);
var responseBody = await response.Content.ReadAsStringAsync();
if (!response.IsSuccessStatusCode)
{
throw new HttpRequestException($"VeliraPay {(int)response.StatusCode}: {responseBody}");
}
JsonElement? deliveries = null;
if (response.StatusCode != HttpStatusCode.NoContent)
{
using var document = JsonDocument.Parse(responseBody);
deliveries = document.RootElement.GetProperty("data").Clone();
}
Console.WriteLine(deliveries?.GetRawText() ?? "null");
Missed a delivery altogether? Every webhook is also an event: read them back with the events endpoint