Manually resend the latest webhook for an invoice
Triggers an immediate delivery attempt for the latest webhook event of this invoice (regardless of its current status: pending, success, or dead). A new WebhookEventAttempt row with trigger=manual is recorded; the auto-retry schedule is not modified.
If the latest event is in the worker queue and currently being processed, the request is rejected with WEBHOOK_RESEND_CONFLICT (409) — try again in a few seconds.
A short cooldown is enforced between manual resends per event (default: 15s). On cooldown violation the response is WEBHOOK_RESEND_COOLDOWN (429) with retry_after_sec and next_allowed_at in the error meta.
invoice_ref accepts either our order_id (UUID) or the merchant's external_id. The response always echoes back our internal order_id and the new attempt's outcome (ok, http_status, duration_ms, attempt_id).
curl -X POST "https://api.example.com/v1/api/v1/invoices/example_string/webhooks/resend" \
-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/resend"
headers = {
"Content-Type": "application/json",
"X-Api-Key": "YOUR_API_KEY"
}
response = requests.post(url, headers=headers)
print(response.json())
const response = await fetch("https://api.example.com/v1/api/v1/invoices/example_string/webhooks/resend", {
method: "POST",
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("POST", "https://api.example.com/v1/api/v1/invoices/example_string/webhooks/resend", 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/resend')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Post.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",
"event_id": 123,
"resend": {
"ok": true,
"http_status": 42,
"duration_ms": 42,
"attempt_id": 123
}
}
{
"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"
}
}
{
"successful": false,
"request_id": "a1b2c3d4-...",
"error": {
"code": "WEBHOOK_NOT_FOUND",
"message": "No webhook events have been generated for this invoice yet"
}
}
{
"successful": false,
"request_id": "a1b2c3d4-...",
"error": {
"code": "WEBHOOK_RESEND_CONFLICT",
"message": "The webhook event is currently being processed by another worker"
}
}
{
"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"
}
]
}
{
"successful": false,
"request_id": "a1b2c3d4-...",
"error": {
"code": "WEBHOOK_RESEND_COOLDOWN",
"message": "Manual webhook resend is rate-limited. Please wait and try again"
}
}
/api/v1/invoices/{invoice_ref}/webhooks/resendInvoice 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)
The webhook event that was resent
Whether the manual delivery attempt succeeded
HTTP status returned by your callback URL
Round-trip time in milliseconds
Internal id of the new WebhookEventAttempt row
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)
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