Get webhook events history for an invoice
Returns the full webhook delivery history for a specific invoice — every event that was generated (e.g. invoice.success, invoice.fail, invoice.expired, invoice.adjusted) along with all delivery attempts the worker has performed (and any manual resends triggered via POST /invoices/{invoice_ref}/webhooks/resend).
invoice_ref accepts either:
- our internal
order_id(UUID assigned by the platform), or - the merchant's own
external_idsupplied at invoice creation.
Lookup is scoped to the authenticated merchant. Events are ordered by creation time, newest first; attempts within an event are ordered by try_number ascending. Returns events: [] (with events_count=0) if no webhooks have been generated for this invoice yet — this is a valid 200 response, not a 404.
curl -X GET "https://api.example.com/v1/api/v1/invoices/example_string/webhooks" \
-H "Content-Type: application/json" \
-H "X-Api-Key: YOUR_API_KEY"
import requests
import json
url = "https://api.example.com/v1/api/v1/invoices/example_string/webhooks"
headers = {
"Content-Type": "application/json",
"X-Api-Key": "YOUR_API_KEY"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://api.example.com/v1/api/v1/invoices/example_string/webhooks", {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-Api-Key": "YOUR_API_KEY"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.example.com/v1/api/v1/invoices/example_string/webhooks", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-Api-Key", "YOUR_API_KEY")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.example.com/v1/api/v1/invoices/example_string/webhooks')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['X-Api-Key'] = 'YOUR_API_KEY'
response = http.request(request)
puts response.body
{
"successful": true,
"invoice_id": "example_string",
"external_id": "example_string",
"events_count": 10,
"events": [
{
"event_id": 123,
"event_type": "example_string",
"status": "example_string",
"callback_url": "example_string",
"auto_attempts": 42,
"manual_attempts": 42,
"total_attempts": 42,
"next_retry_at": "2024-12-25T10:00:00Z",
"locked_at": "2024-12-25T10:00:00Z",
"locked_by": "example_string",
"request_payload": "null",
"created_at": "2024-12-25T10:00:00Z",
"updated_at": "2024-12-25T10:00:00Z",
"attempts": [
{
"try_number": 42,
"trigger": "example_string",
"attempt_status": "example_string",
"http_status": 42,
"response_headers": {},
"response_body": "example_string",
"error_message": "example_string",
"duration_ms": 42,
"created_at": "2024-12-25T10:00:00Z"
}
]
}
]
}
{
"successful": false,
"request_id": "a1b2c3d4-...",
"error": {
"code": "API_KEY_MISSING",
"message": "Missing X-Api-Key header"
}
}
{
"successful": false,
"request_id": "a1b2c3d4-...",
"error": {
"code": "API_KEY_INVALID",
"message": "Invalid or inactive API key"
}
}
{
"successful": false,
"request_id": "a1b2c3d4-...",
"error": {
"code": "OWNER_BLOCKED",
"message": "Merchant owner is blocked"
}
}
{
"successful": false,
"request_id": "a1b2c3d4-...",
"error": {
"code": "MERCHANT_BLOCKED",
"message": "Merchant is banned"
}
}
{
"successful": false,
"request_id": "a1b2c3d4-...",
"error": {
"code": "MERCHANT_NOT_ACTIVE",
"message": "Merchant is inactive"
}
}
{
"successful": false,
"request_id": "a1b2c3d4-...",
"error": {
"code": "INVOICE_NOT_FOUND",
"message": "Invoice not found"
}
}
{
"error": "Unprocessable Entity",
"message": "The request was well-formed but contains semantic errors",
"code": 422,
"details": [
{
"field": "password",
"message": "Password must be at least 8 characters long"
}
]
}
/api/v1/invoices/{invoice_ref}/webhooksInvoice identifier — either our order_id (UUID) or the merchant's external_id
Request Preview
Response
Response will appear here after sending the request
Authentication
API Key for authentication. Merchant API Key.
Path Parameters
Invoice identifier — either our order_id (UUID) or the merchant's external_id
Responses
Internal invoice order_id (UUID)
Merchant's external_id for this invoice
Total number of webhook events generated for this invoice
Webhook events for this invoice, newest first
Internal webhook event id
Event type code (e.g. invoice.success, invoice.fail, invoice.expired, invoice.adjusted)
pending, success, or dead
URL the webhook is/was being delivered to
Number of automatic retries the worker has performed
Number of manual resends triggered via API
Total number of delivery attempts
When the worker will attempt the next auto-retry (UTC). Null if the event is already in a terminal state.
If non-null, the event is currently being processed
Identifier of the worker/process that holds the lock
The exact JSON payload that is being sent to your callback URL
When the event was created (UTC)
Last state change of the event (UTC)
Full delivery attempt log, ordered by try_number ascending
Sequential attempt number across all triggers
auto (worker retry) or manual (resend endpoint)
success or failure
HTTP status returned by your callback URL (null on network error)
Response headers as received from your endpoint
Response body (only kept on successful attempts)
Error description (only on failed attempts)
Round-trip time of this attempt in milliseconds
Timestamp of this attempt (UTC)
Unique request ID for debugging
Machine-readable error code
Human-readable description
Extra context (varies by error)
Unique request ID for debugging
Machine-readable error code
Human-readable description
Extra context (varies by error)
Unique request ID for debugging
Machine-readable error code
Human-readable description
Extra context (varies by error)
Last updated today
Built with Documentation.AI