Events

Examples of transaction events.

The TransactionResponse data type may contain one or more Event objects when it is provided in a response from the API.

Below we've provided (in order) examples of events that can occur with some example data.

TransactionCreated

This event records the data that was passed to the API and is always the first in the list of events.

{
  "EventType": "TransactionCreated",
  "TimestampUTC": "2015-09-28T11:25:39.269568Z"
}

TransactionValidated

This event will be emitted if the data sent to the API is valid.

{
  "EventType": "TransactionValidated",
  "TimestampUTC": "2015-09-28T11:25:39.269568Z"
}

TransactionRouteCalculated

Recorded when a payout route has been determined for this transaction. The data contains details of the route together with the charges made for the transfer.

{
  "EventType": "TransactionRouteCreated",
  "TimestampUTC": "2015-09-28T11:25:39.269568Z",
  "Route": {
    "DestinationCurrency": {
      "Currency": "USD",
      "Value": 194.07
    },
    "ExchangeRate": 1.29386,
    "SourceCurrency": {
      "Currency": "GBP",
      "Value": 150
    }
  }
}

MerchantBalanceVerified

Recorded once the system has verified that you have an account in the SendCurrency, and that the balance of the account is positive at the time the API is called.

{
  "EventType": "MerchantBalanceVerified",
  "TimestampUTC": "2015-09-28T11:25:39.269568Z",
  "Currency": "USD",
  "CurrentBalance": 1024.78
}
📘

Asynchronous Processing

Please note that since items are processed asynchronously, it’s possible to receive a success here but a failure in the next phase.

TransactionBatched

Transactions are batched by our system for processing by banks. A transaction will reside in this state until the batch has been sent to the bank.

{
  "EventType": "TransactionBatched",
  "TimestampUTC": "2015-09-28T11:25:39.269568Z"
}

TransactionSucceeded

When the transaction has completed successfully, this event will be written to the event list.

{
  "EventType": "TransactionSucceeded",
  "TimestampUTC": "2015-09-28T11:25:39.269568Z"
}

TransactionFailed

If a transaction fails during processed then a TransactionFailed event will be recorded that includes details of the reason for the failure instead of the TransactionSucceeded event.

{
  "Succeeded": false,
  "FailureReason": "Incomplete Recipient Address",
  "EventType": "TransactionCompleted",
  "TimestampUTC": "2017-05-08T13:28:46.6251175Z"
}

TransactionCompleted

This signals the final state of the transaction. At this point we will notify you with a callback if you have callbacks set up.

{
  "EventType": "TransactionCompleted",
  "TimestampUTC": "2015-09-28T11:25:39.269568Z",
  "Succeeded": true
}

TransactionReturned

Transactions are sometimes returned from the bank for one reason or another, if this occurs then the transaction will transition to a status of 'Returned' along with the below event being recorded against the transaction.

{
	"EventType": "TransactionReturned",
	"ReturnAmount": 10.0,
	"ReturnReason": "Return reason",
	"TimestampUTC": "2019-06-20T13:21:21.6265218Z"
}