Webhooks
Event Destinations send account events to external systems. FiscalRail currently supports webhook destinations; later destination types can use the same resource.
Read Receiving events with webhooks for an end-to-end setup, signature verification and processing workflow.
Destinations belong to exactly one Live or Test account. Each account can create up to 20 destinations. A destination can subscribe to up to 20 exact event types, or use "*" to receive every event type.
Webhook bodies are thin Events: they contain the event ID, type, occurrence time and related resource, but omit the immutable data snapshot. Retrieve the Event or related resource through the API when processing requires more data.
Verify signatures
Each destination has a readable signing secret beginning with whsec_. FiscalRail sends a signature header with every attempt:
FiscalRail-Signature: t=1786451696,v1=4f32...
Compute an HMAC-SHA256 using the destination's signing secret over the timestamp, a period, and the exact raw request body:
HMAC-SHA256(secret, timestamp + "." + raw_body)
Compare the hexadecimal result with v1 using a constant-time comparison and reject timestamps more than five minutes from the current time. Verify the raw bytes before parsing JSON. Every retry receives a new timestamp and signature.
Return any HTTP 2xx response quickly to acknowledge delivery. FiscalRail attempts each event up to five times. Deliveries are at least once and are not ordered, so use the Event ID for deduplication.
If every attempted delivery fails for 24 hours, FiscalRail disables the destination. Fix the endpoint and enable it again through the API or dashboard.
The Event Destination object
id
string
object
string
event_destination.live
boolean
account
string
name
string
type
string
webhook.status
enum
enabled
disabled
enabled_events
array of strings
webhook
object
Show child propertiesHide child properties
url
string
signing_secret
string or null
disabled_reason
enum or null
user
delivery_failures
created_at
string
updated_at
string
{
"id": null,
"object": "event_destination",
"live": null,
"account": "acct_14Vxtqg2nwvPR75TpsGH8N",
"name": null,
"type": "webhook",
"status": null,
"enabled_events": [],
"webhook": {
"url": null,
"signing_secret": null
},
"disabled_reason": null,
"created_at": null,
"updated_at": null
}
Create an event destination
/v1/event-destinationsCreates a webhook endpoint. An account can have at most 20 event destinations.
name
string
required
url
string
required
enabled_events
array of strings
required
201
The created Event Destination, including its signing secret.
JSON
curl --request POST \
'https://api.fiscalrail.com/v1/event-destinations' \
--header "Authorization: Bearer ak_test_..."
{
"id": null,
"object": "event_destination",
"live": null,
"account": "acct_14Vxtqg2nwvPR75TpsGH8N",
"name": null,
"type": "webhook",
"status": null,
"enabled_events": [],
"webhook": {
"url": null,
"signing_secret": null
},
"disabled_reason": null,
"created_at": null,
"updated_at": null
}
Retrieve an event destination
/v1/event-destinations/{id}Returns the destination and its readable signing secret.
id
string
required
200
An Event Destination object.
JSON
curl --request GET \
'https://api.fiscalrail.com/v1/event-destinations/example' \
--header "Authorization: Bearer ak_test_..."
{
"id": null,
"object": "event_destination",
"live": null,
"account": "acct_14Vxtqg2nwvPR75TpsGH8N",
"name": null,
"type": "webhook",
"status": null,
"enabled_events": [],
"webhook": {
"url": null,
"signing_secret": null
},
"disabled_reason": null,
"created_at": null,
"updated_at": null
}
Update an event destination
/v1/event-destinations/{id}id
string
required
name
string
url
string
enabled_events
array of strings
200
The updated Event Destination.
JSON
curl --request PATCH \
'https://api.fiscalrail.com/v1/event-destinations/example' \
--header "Authorization: Bearer ak_test_..."
{
"id": null,
"object": "event_destination",
"live": null,
"account": "acct_14Vxtqg2nwvPR75TpsGH8N",
"name": null,
"type": "webhook",
"status": null,
"enabled_events": [],
"webhook": {
"url": null,
"signing_secret": null
},
"disabled_reason": null,
"created_at": null,
"updated_at": null
}
Enable an event destination
/v1/event-destinations/{id}/enableid
string
required
200
The enabled Event Destination.
JSON
curl --request POST \
'https://api.fiscalrail.com/v1/event-destinations/example/enable' \
--header "Authorization: Bearer ak_test_..."
{
"id": null,
"object": "event_destination",
"live": null,
"account": "acct_14Vxtqg2nwvPR75TpsGH8N",
"name": null,
"type": "webhook",
"status": null,
"enabled_events": [],
"webhook": {
"url": null,
"signing_secret": null
},
"disabled_reason": null,
"created_at": null,
"updated_at": null
}
Disable an event destination
/v1/event-destinations/{id}/disableid
string
required
200
The disabled Event Destination.
JSON
curl --request POST \
'https://api.fiscalrail.com/v1/event-destinations/example/disable' \
--header "Authorization: Bearer ak_test_..."
{
"id": null,
"object": "event_destination",
"live": null,
"account": "acct_14Vxtqg2nwvPR75TpsGH8N",
"name": null,
"type": "webhook",
"status": null,
"enabled_events": [],
"webhook": {
"url": null,
"signing_secret": null
},
"disabled_reason": null,
"created_at": null,
"updated_at": null
}
Delete an event destination
/v1/event-destinations/{id}id
string
required
204
The destination was deleted.
curl --request DELETE \
'https://api.fiscalrail.com/v1/event-destinations/example' \
--header "Authorization: Bearer ak_test_..."
List event destinations
/v1/event-destinationsReturns destinations for the authenticated Live or Test account. Signing secrets are null in list responses.
limit
integer
25.starting_after
string
ending_before
string
200
A list of Event Destination objects.
JSON
curl --request GET \
'https://api.fiscalrail.com/v1/event-destinations?limit=25' \
--header "Authorization: Bearer ak_test_..."
{
"object": "list",
"has_more": null,
"data": [
{
"id": null,
"object": "event_destination",
"live": null,
"account": "acct_14Vxtqg2nwvPR75TpsGH8N",
"name": null,
"type": "webhook",
"status": null,
"enabled_events": [],
"webhook": {
"url": null,
"signing_secret": null
},
"disabled_reason": null,
"created_at": null,
"updated_at": null
}
]
}