List invoice webhooks
Returns webhook events and delivery attempts for an invoice.
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"
}
]
}
GET
/api/v1/invoices/{invoice_ref}/webhooksGET
Base URLstring
Target server for requests. Edit to use your own host.
path
invoice_refstring
RequiredInvoice identifier — either our order_id (UUID) or the merchant's external_id
Request Preview
Response
Response will appear here after sending the request
Authentication
header
X-Api-Keystring
RequiredAPI Key for authentication. Merchant API Key.
Path Parameters
invoice_refstring
RequiredInvoice identifier — either our order_id (UUID) or the merchant's external_id
Responses
successfulboolean
invoice_idstring
RequiredInternal invoice order_id (UUID)
external_idstring
Merchant's external_id for this invoice
events_countinteger
RequiredTotal number of webhook events generated for this invoice
eventsarray
Webhook events for this invoice, newest first
Was this page helpful?