Events API provides a way to listen for events of interest as they relate to your program. For example, you may want to listen for Account status changes or Transactions as they occur.
There are two approaches to consume events, traditional poll request and event streaming using Server-Sent Events. You might first want to consider the approach that best suits your architecture.
A standard request to
GET /events will trigger the polling mechanism to fetch events based on the filters provided. This
is standard request/response flow. The endpoint will hold the connection until either event(s) are returned or a timeout
has occurred. The timeout is random but is at a maximum 1-minute long.
The response will contain the
last_sequence_number in the event list which can be used in a subsequent request.
Using the event stream endpoint, you can listen for events as they unfold in real-time. The endpoint returns events matching
the criteria provided and sends events using the
Server-Sent Events (SSE)
standard once a connection has been established. This requires setting the
Accept header to
Sample CURL Request
curl -X GET https://api.pay.test.figure.com/events/stream \
-H 'Accept: text/event-stream' \
-H 'Authorization: Bearer <access_token>'
id is treated as the
last_sequence_number. If the connection fails or is complete, you can use this to set your starting point.
Retrieve a single event
Fetch a single event by either its
sequence_number for the authenticated program.
Every event has a
data field with contents related to the specific event type. This is a list of all current event types. Note: This list is subject to be updated as more types may be added
|Account status change|
|A transaction was created between accounts|
|Unique identifier for this account|
|Blockchain address for this account|
|The new status for this account - |
|Unique identifier for this transaction|
|The blockchain address of the sender|
|The blockchain address of the recipient|
|Amount of coin sent in USD Pennies|
|Type of this transaction see below|
|Status of this transaction - |
|The blockchain network fee|
|Contains additional details about the transaction i.e. merchant name, bank name, etc|
|Creation time of this transaction|
|Most recently updated time of this transaction|
|Debit card transaction once cleared|
|Blockchain network fee|
|Inbound ACH transfer from external bank account to account|
|Inter-account/program transaction such as Peer-to-Peer|
|Outbound ACH transfer from account to external bank account|
|Transactions made by the system account|