Skip to content
On this page

Event Types

This is a list of all the types of events we currently send. We may add more at any time, so you shouldn't rely on only these types existing in your code.

You'll notice that these events follow a pattern: resource.event. Our goal is to design a consistent system that makes things easier to anticipate and code against.

Each event object includes a payload.data property which contains unique values for each type of event. Each event type below describes these unique values.

Auth Events

Events related to authentication using the credentials provided by the user.

Auth Success

When a client has successfully completed the authentication process.

AttributeDescription
typeauth.success
payload.resource.idThe ID of the client who was authenticating.
payload.resource.typeThe type of resource referred to by the resource.id. Value: client.
payload.data.authThe auth object linked to this resource.

Example auth.success Event

json
{
  "event": {
    "_id": "580e3e11dec21e861b5a3719",
    "type": "auth.success",
    "created": "2016-04-20T16:51:12Z",
    "clientId": "579b695decfa110127118752",
    "partnerId": "55942f330cfcfd6c4ed529d9",
    "identifier": "example-id-123",
    "payload": {
      "resource": {
        "type": "client",
        "id": "579b695decfa110127118752"
      },
      "data": {
        "auth" : {
          "_id" : "5b157888cb7e60000bfcaa41",
          "items" : [
            "bill"
          ],
          "company" : {
            "_id" : "55942f330cfcfd6c4ed529d8",
            "name" : "Geico"
          },
          "status" : {
            "type" : "verified"
          }
        }
      }
    }
  }
}

Invalid

When the auth's credentials are no longer valid and need to be reauthenticated.

AttributeDescription
typeauth.invalid
payload.resource.idThe ID of the auth that needs to be reauthenticated.
payload.resource.typeThe type of resource referred to by the resource.id. Value: auth.
payload.data.companyThe company object linked to this resource.

Example auth.invalid Event

json
{
  "event": {
    "_id": "580e3e11dec21e861b5a3719",
    "type": "auth.invalid",
    "created": "2016-04-20T16:51:12Z",
    "clientId": "579b695decfa110127118752",
    "partnerId": "55942f330cfcfd6c4ed529d9",
    "identifier": "example-id-123",
    "payload": {
      "resource": {
        "type": "auth",
        "id": "579b695decfa11012711875d"
      },
      "data": {
        "company" : {
          "_id" : "55942f330cfcfd6c4ed529d8",
          "name" : "Geico"
        }
      }
    }
  }
}

Hold

When an auth receives a hold that prevents access to the account data.

AttributeDescription
typeauth.hold
payload.resource.idThe ID of the auth that was put on hold.
payload.resource.typeThe type of resource referred to by the resource.id. Value: auth.
payload.data.holdThe hold placed on the account.
payload.data.companyThe company object linked to this resource.

Example auth.hold Event

json
{
  "event": {
    "_id": "580e3e11dec21e861b5a3719",
    "type": "auth.hold",
    "created": "2016-04-20T16:51:12Z",
    "clientId": "579b695decfa110127118752",
    "partnerId": "55942f330cfcfd6c4ed529d9",
    "identifier": "example-id-123",
    "payload": {
      "resource": {
        "type": "auth",
        "id": "579b695decfa11012711875d"
      },
      "data": {
        "hold" : {
          "code" : "account_issue_no_service_account",
          "text" : "Please login and add your service account."
        },
        "company" : {
          "_id" : "55942f330cfcfd6c4ed529d8",
          "name" : "Geico"
        }
      }
    }
  }
}

Deleted

When a client deletes an auth.

AttributeDescription
typeauth.deleted
payload.resource.idThe ID of the auth that was deleted.
payload.resource.typeThe type of resource referred to by the resource.id. Value: auth.
payload.data.companyThe company object linked to this resource.

Example auth.deleted Event

json
{
  "event": {
    "_id": "580e3e11dec21e861b5a3719",
    "type": "auth.deleted",
    "created": "2016-04-20T16:51:12Z",
    "clientId": "579b695decfa110127118752",
    "partnerId": "55942f330cfcfd6c4ed529d9",
    "identifier": "example-id-123",
    "payload": {
      "resource": {
        "type": "auth",
        "id": "579b695decfa110127118752"
      },
      "data": {
        "company" : {
          "_id" : "55942f330cfcfd6c4ed529d8",
          "name" : "Geico"
        }
      }
    }
  }
}

Swap Events

Events pertaining to a swap.

Swap Success

When a swap is successful.

AttributeDescription
typeswap.success
payload.resource.idThe ID of the swap that was successful.
payload.resource.typeThe type of resource referred to by the resource.id. Value: swap.
payload.data.clientIdThe clientId linked to the swap.
payload.data.companyThe company object related to the swap.
payload.data.paymentMethodThe payment method object linked to the swap.

Example swap.success Event

json
{
  "event": {
    "_id": "580e3e11dec21e861b5a3719",
    "type": "swap.success",
    "created": "2016-04-20T16:51:12Z",
    "clientId": "579b695decfa110127118752",
    "partnerId": "55942f330cfcfd6c4ed529d9",
    "identifier": "example-id-123",
    "payload": {
      "resource": {
        "type": "swap",
        "id": "5ce443c56013221715960365"
      },
      "data": {
        "clientId": "5c7c01c11f915c41f89de856",
        "company": {
          "_id": "5bd885fccd274b4324a21f57",
          "name": "Test Merchant",
          "status": "operational",
          "logo": {
            "url": "https://s3.amazonaws.com/app-assets.unbill.io-primary/uploads/utility-provider-logos/1a49a63fa87749b3abdf74c2ee9deb36.png",
            "background": false,
            "svg": {
              "url": "https://s3.amazonaws.com/app-assets.unbill.io-primary/uploads/utility-provider-logos/968e40f95dd9a0e85cbae10fb221059b.svg",
              "color": "06C580"
            },
            "symbol": {
              "url": "https://s3.amazonaws.com/app-assets.unbill.io-primary/uploads/utility-provider-logos/2533c1ac55b047c770085cc24e3d1e85.svg",
              "color": "06C580"
            }
          },
          "auth": {
            "urls": {
              "login": "https://biller-direct.q2open.io",
              "signup": "https://www.q2ebanking.com/",
              "forgotUser": "https://www.q2ebanking.com/",
              "forgotPassword": "https://www.q2ebanking.com/"
            },
            "loginFields": [
              {
                "placeholder": "Username",
                "formType": "text",
                "name": "username",
                "label": "Username"
              },
              {
                "placeholder": "Password",
                "formType": "password",
                "name": "password",
                "label": "Password"
              }
            ]
          },
          "userPresenceRequired": false,
          "supportedItems": ["auth", "bill", "swap", "payment"]
        },
        "paymentMethod": {
          "_id": "5c8dc5ea03bb895bc3868a28",
          "type": "card",
          "name": "John Doe",
          "status": "verified",
          "card": {
            "number": "XXXX4444",
            "bin": "11111111",
            "brand": "visa",
            "type": "credit",
            "expDate": "2023-06-01T12:00:00.000Z",
            "cancelled": false
          }
        }
      }
    }
  }
}