Events

Set up event handlers and workflows to process system events, including balance updates, transfers, account creation, and completed operations

On this page, you can configure event handlers to monitor specific system events and define the workflows that automatically run when they occur.

General information

The following information is provided about each event handler:

ID

The identifier of the event handler.


Short description

A brief description of the event handler.


Event

The event type. The following event types are supported:


Event handler workflow

The workflow or action that will be executed when the event is triggered, such as sending an email notification or sending data to an external endpoint.


Enabled

If Enabled, the event handler is active and will process events that meet the configured conditions.

To view or edit event handler details, select a handler and click the Edit button.

Details

On the details page, you can enable or disable the selected event handler and adjust its parameters.

The following is the list of supported event handlers for which you can adjust their specific parameters:

Account balance received

This event handler is triggered when B2CORE receives an updated balance from an external service provider connected to the Back Office (for example, Twilio). If the received balance meets the configured threshold, a notification is sent to the specified email addresses.

Send notification if account balance less or equals

The balance threshold that triggers the notification.


Available workflows

SendNotificationWorkflow — sends an email notification to the specified email addresses when the external service balance falls below or equals the configured threshold.


Emails

One or more email addresses to which the notification will be sent.


Template

The email template used for sending notifications, such as balanceWarning. The template can be selected from the list of available email templates in System > Templates > Email > Templates.

Transfer event

The event handler is triggered when a transfer occurs that matches the selected platforms and amount criteria. When this event occurs, an email notification is sent to the specified email addresses.

Available handlers

Filter by platforms and amount — filters transfer events based on the selected source and destination platforms and the minimum transfer amount. The handler triggers only when a transfer meets the specified conditions.


Destination Platform Id

The identifier of the destination platform to which a transfer is made. This is the required parameter.


Source Platform Id

The identifier of the source platform to which a transfer is made. This is the optional parameter.


Minimum Amount

The minimum transfer amount required to trigger the event. This parameter is optional.


Available workflows

SendNotificationWorkflow — sends an email notification to the specified email addresses when a transfer matching the configured criteria occurs.


Emails

One or more email addresses to which the notification will be sent.


Template

The email template used for sending notifications, such as TransferEvent. The template can be selected from the list of available email templates in System > Templates > Email > Templates.

Account created

The event handler is triggered when an account or wallet is created for a client. When this event occurs, a POST request is sent to the specified external URL. The request body includes account details formatted as either JSON or URL-encoded form data, depending on the selected content type.

The examples below show how the POST request body is formatted for each supported content type:

JSON
{
  "client": {
    "id": 3651,
    "email": "[email protected]"
  },
  "product": {
    "name": "ewallet",
    "group_type": "Default",
    "platform": {
      "id": 1,
      "name": "eWallet",
      "caption": "eWallet"
    }
  },
  "account_number": "80759"
}
URL-encoded form data
client%5Bid%5D=3650&client%5Bemail%5D=client%40example.com&product%5Bname%5D=ewallet&product%5Bgroup_type%5D=Default&product%5Bplatform%5D%5Bid%5D=1&product%5Bplatform%5D%5Bname%5D=eWallet&product%5Bplatform%5D%5Bcaption%5D=eWallet&account_number=80735

Available workflows

SendToEndpoint — sends a POST request with the details about the created account or wallet to the specified external endpoint. The request is sent immediately when the event is triggered.


External endpoint

The external URL to which the POST request will be sent. This parameter is required.


Content type

The format of the request body. The following values are supported:

  • application/x-www-form-urlencoded

  • application/json

Successful operation

The event handler is triggered when a deposit, withdrawal, transfer, or exchange is successfully completed. When this event occurs, a POST request is sent to the specified external URL. The request body includes transaction details formatted as either JSON or URL-encoded form data, depending on the selected content type.

Operations

One or more transaction types. This parameter is required.

The following transaction types can be selected:

  • payment — deposits

  • payout — withdrawals

  • transfer — transfers

  • exchange — exchanges


Available workflows

SendToEndpoint — sends a POST request with the details about a successful transaction to the specified external endpoint. The request is sent immediately when the event is triggered.


External endpoint

The external URL to which the POST request will be sent. This parameter is required.


Content type

The format of the request body. The following values are supported:

  • application/x-www-form-urlencoded

  • application/json

Last updated

Was this helpful?