Get Events Response

  • success
    Type: boolean
    required

    Indicates whether this Events API request was processed without error.

  • error
    Type: object

    Only present when 'success' is false. A JSON object containing the error details. See Error Codes List

    • code
      Type: integer

      The numeric code for the error.

    • message
      Type: string

      A human readable expression of the error code.

  • events
    Type: array object[]

    Present when 'success' is true

    • metadata
      Type: object
      required
    • payload
      required

      This payload is used in two cases:

      1. in the Events API when the event.metadata.payload_format is "mobile-money"
      2. in the Create Transaction Callback when callbacks are enabled
      • amount
        Type: string
        max length:  
        16
        required

        The value of the transaction in cents. For example 1 KES would be 100

      • amounttype
        enum
        const:  
        centile
        required

        Tola only uses centile values

        values
        • centile
      • campaignid
        Type: string
        max length:  
        32
        required

        Identifies a particular stream of traffic, eg. Lodgements on Paybill 00001, or Transactions created by a given Relay Endpoint

      • channel
        Type: string
        max length:  
        32
        required

        The API identifier in the format '<COUNTRY>.<OPERATOR>'

      • currency
        Type: string
        min length:  
        3
        max length:  
        3
        required

        The ISO 4217 currency code for this Transaction

      • customerreference
        Type: string
        max length:  
        32
        required

        For type = notification, this will contain the reference you provided when calling POST /transaction.

        For type = lodgement, this will contain the text entered by the consumer on their handset when performing the lodgement.

      • date
        Type: string Format: date-time
        required

        The Date that the transaction was created (ISO 8601 UTC)

      • msisdn
        Type: string
        max length:  
        16
        required

        The MSISDN for the Transaction, in full international format

      • operatorreference
        Type: string
        max length:  
        32
        required

        The unique reference provided by the Operator for this transaction

      • reference
        Type: string
        max length:  
        32
        required

        The Tola.wallet platform reference of this notification

      • sourcereference
        Type: string
        max length:  
        32
        required

        For type=notification, the unique Tola reference of the originating Merchant request to Tola's POST /transaction.

      • success
        Type: string enum
        required

        The outcome of the funds-transfer where true indicates that funds were transferred.

        values
        • true
        • false
      • target
        Type: string
        max length:  
        16
        required

        The account identifier (or paybill number)

      • type
        Type: string enum
        required

        the type of notification. For a callback to a Charge or Disbursement this will always be 'notification'. See Lodgements for more informaton on the 'lodgement' type

        values
        • notification
        • lodgement
      • errorcode
        Type: integer

        an error code, only supplied when success is equal to "false". See Error Codes List

      • errormessage
        Type: string
        max length:  
        32

        an error message, only supplied when success is equal to "false". See Error Codes List

  • last_event
    Type: string

    Present when 'success' is true. The last event reference in this response. Will be set to the value of your supplied last_event query string argument if no newer events are found. Should be used as a pointer to fetch the next set as follows ?last_event=1.106.1692874379.2

  • last_event_time
    Type: string

    Present when 'success' is true. The time of the last event in the returned set of events.

  • num_rows
    Type: integer

    Present when 'success' is true. The number of events returned in this response.

Examples
{
  "events": [
    {
      "metadata": {
        "event_id": "1.106.1692926344.8",
        "webhook_delivered": true,
        "payload_format": "mobile-money"
      },
      "payload": {
        "reference": "1.106.1692926344.9",
        "accountname": "string",
        "amount": "10000",
        "amounttype": "centile",
        "channel": "KENYA.SAFARICOM",
        "currency": "KES",
        "customerreference": "ref101",
        "date": "2023-08-25T01:19:04Z",
        "mac": "string",
        "msisdn": "254000000001",
        "operatorreference": "string",
        "sourcereference": "1.106.1692926344.8",
        "success": "true",
        "target": "000001",
        "type": "notification"
      }
    }
  ],
  "last_event": "1.106.1692926344.8",
  "last_event_time": "2023-08-25T01:19:04Z",
  "num_rows": 1,
  "success": true
}