Events
FiscalRail creates an immutable Event whenever a supported account resource changes. Live and Test accounts have separate event streams.
Every Event contains a related_object reference and a data.object snapshot captured when the event occurred. The snapshot never changes, including after the resource is updated or deleted. Retrieve the related resource by its ID when you need its current state.
The actor identifies what caused the event. API requests expose the API key and request ID, dashboard actions expose the user and request ID, and automated actions use the system type with null IDs.
Webhook deliveries use the same top-level envelope but omit data. Retrieve the Event by ID when a webhook handler needs its historical snapshot.
Balance transactions
billing.balance_transaction.created is emitted whenever money moves in a Live
account balance. Its related_object is the immutable Balance Transaction and
data.object contains its complete snapshot.
Usage transactions have a negative amount_cents and identify the successful
domain Event that caused the debit in source_event. Top-ups have a positive
amount and a null source. Test accounts do not hold balances, so they emit their
normal domain Events but no balance transaction Event.
The Balance Transaction object
id
string
object
string
balance_transaction.live
boolean
account
string
kind
enum
usage
top_up
amount_cents
integer
currency
enum
EUR
source_event
string or null
created_at
string
{
"id": null,
"object": "balance_transaction",
"live": null,
"account": "acct_14Vxtqg2nwvPR75TpsGH8N",
"kind": null,
"amount_cents": null,
"currency": null,
"source_event": null,
"created_at": null
}
The Event object
id
string
object
string
event.live
boolean
account
string
type
string
occurred_at
string
actor
object
Show child propertiesHide child properties
type
enum
api_key
user
system
id
string or null
request_id
string or null
related_object
object or null
Show child propertiesHide child properties
id
string
object
string
data
object
Show child propertiesHide child properties
object
object
previous_attributes
object
{
"id": null,
"object": "event",
"live": null,
"account": "acct_14Vxtqg2nwvPR75TpsGH8N",
"type": null,
"occurred_at": null,
"actor": {
"type": null,
"id": null,
"request_id": null
},
"related_object": {
"id": null,
"object": null
},
"data": {
"object": {},
"previous_attributes": {}
}
}
Event types
billing.balance_transaction.created
Emitted when billing balance transaction created.
customer.created
Emitted when customer created.
customer.updated
Emitted when customer updated.
customer.deleted
Emitted when customer deleted.
tax_id.verification.completed
Emitted when tax id verification completed.
tax_id.verification.failed
Emitted when tax id verification failed.
invoice.issued
Emitted when invoice issued.
invoice.amended
Emitted when invoice amended.
invoice.pdf_rendered
Emitted when invoice pdf rendered.
invoice.verifactu_registration.accepted
Emitted when invoice verifactu registration accepted.
invoice.verifactu_registration.accepted_with_errors
Emitted when invoice verifactu registration accepted with errors.
invoice.verifactu_registration.rejected
Emitted when invoice verifactu registration rejected.
New event types can be added over time. Code that listens to all events must ignore types it does not handle.
Retrieve an event
/v1/events/{id}id
string
required
curl --request GET \
'https://api.fiscalrail.com/v1/events/example' \
--header "Authorization: Bearer ak_test_..."
{
"id": null,
"object": "event",
"live": null,
"account": "acct_14Vxtqg2nwvPR75TpsGH8N",
"type": null,
"occurred_at": null,
"actor": {
"type": null,
"id": null,
"request_id": null
},
"related_object": {
"id": null,
"object": null
},
"data": {
"object": {},
"previous_attributes": {}
}
}
List events
/v1/eventsReturns immutable events in reverse chronological ID order.
limit
integer
25.starting_after
string
ending_before
string
types
array of strings
200
A list of Event objects.
JSON
curl --request GET \
'https://api.fiscalrail.com/v1/events?limit=25' \
--header "Authorization: Bearer ak_test_..."
{
"object": "list",
"has_more": null,
"data": [
{
"id": null,
"object": "event",
"live": null,
"account": "acct_14Vxtqg2nwvPR75TpsGH8N",
"type": null,
"occurred_at": null,
"actor": {
"type": null,
"id": null,
"request_id": null
},
"related_object": {
"id": null,
"object": null
},
"data": {
"object": {},
"previous_attributes": {}
}
}
]
}