Events
Events are a log of changes in API object state. Use them to handle asynchronous updates from Bias in your application code.
The Event object
- Name
object
- Type
- "event",
- Description
- Literal representing the object’s type.
- Name
id
- Type
- string,
- Description
- Unique identifier for the object.
- Name
live
- Type
- boolean,
- Description
- Has the value
trueif the object exists in a production environment or the valuefalseif the object exists in a sandbox environment.
- Name
created_at
- Type
- integer,
- Description
- Time at which the object was created. Measured in milliseconds since the Unix epoch.
- Name
previous_state
- Type
- CheckoutSession, Customer, Dispute, File, Payment, PaymentMethod, or Refund or null,
- Description
- The full object state before the event occurred.
- Name
request
- Type
- string or object or null,
- Description
- Expandable. The request, if any, that triggered the event.
- Name
state
- Type
- CheckoutSession, Customer, Dispute, File, Payment, PaymentMethod, or Refund or null,
- Description
- The full object state after the event occurred.
- Name
type
- Type
- enum,
- Description
- The type of event that occurred. Follows the format of
object.action. - Array item properties
The Event object
Get a event
Retrieve a event by its ID.
Optional parameters
- Name
expand
- Type
- object,
- Description
- Optional object that allows you to expand certain ID fields to include related resources.
- Child properties
Returns
Returns the event object.
Retrieve a event
Response example
List all events
Retrieve a paginated list of events or stream them as they come in.
Optional parameters
- Name
expand
- Type
- object,
- Child properties
- Name
ending_before
- Type
- string,
- Name
starting_after
- Type
- string,
- Name
limit
- Type
- number, at least 1, at most 1000,
- Description
- Maximum number of objects to return. When streaming, if a limit is provided, the response will end when the limit is reached.
- Name
stream
- Type
- boolean,
- Description
- Stream events matching the provided parameters as they are created. If true, the response will be a stream of events, separated by a newline. Space characters are sent periodically to keep the stream alive.
- Name
filters
- Type
- ,
- Description
- Filters to apply to the list. Combine multiple conditions with
andandor. - Child properties
Returns
Returns a list of event objects.