Skip to main content
Webhooks let you receive real-time HTTP POST notifications when events happen in your AnySpend account. Configure endpoints, choose which events to subscribe to, and monitor delivery history.
All webhook management endpoints require admin permission unless noted. Read-only endpoints (list, get, deliveries) require read permission.

Authentication

Base URL: https://platform-api.anyspend.com/api/v1

Endpoints

List Webhooks

read
Returns all webhook endpoints configured for your account.
Response

Create Webhook

admin
Create a new webhook endpoint. The response includes a secret field used to verify webhook signatures. Store this securely — it is only returned once at creation time.
string
required
The HTTPS URL that will receive webhook POST requests.
string[]
required
Array of event types to subscribe to. See Supported Events below.
Response
The secret field is only included in the create response. Copy it immediately and store it in your environment variables or secrets manager.

Get Webhook

read
Retrieve a single webhook endpoint by ID.

Update Webhook

admin
Update an existing webhook endpoint. All fields are optional.
string
Updated HTTPS endpoint URL.
string[]
Updated list of subscribed event types. Replaces the existing list entirely.
boolean
Set to false to pause delivery without deleting the endpoint.

Delete Webhook

admin
Permanently remove a webhook endpoint. Pending deliveries will be cancelled.

Send Test Webhook

admin
Sends a test event to the webhook URL so you can verify your endpoint is receiving and processing events correctly. The test payload uses a test.ping event type.
Response

List Delivery History

read
View the delivery log for a webhook endpoint. Returns recent delivery attempts with status codes and response times.
Response

Retry a Failed Delivery

admin
Manually retry a failed webhook delivery. The delivery must have a failed status.
Response

Webhook Object

Supported Events

Verifying Webhook Signatures

Each webhook request includes a signature in the X-AnySpend-Signature header. Verify it using your webhook secret to ensure the request is authentic.
Always return a 2xx status code within 30 seconds. Failed deliveries are retried up to 3 times with exponential backoff.