# Available Events

| Event Name                          | Trigger                                                   | Content                                                   | Sample Payload                                                                  |
|-------------------------------------|-----------------------------------------------------------|-----------------------------------------------------------|----------------------------------------------------------------------------------|
| transactionmessage.created           | Whenever a new Transaction Message is registered in the Astrada system | A complete understanding of the created Transaction Message object | [See here](https://docs.astrada.co/reference/event-types#transactionmessagecreated) |
| transaction.created                  | Whenever a new Transaction is created in the Astrada system | References to the transaction object and its related entities | [See here](https://docs.astrada.co/reference/event-types#transactioncreated) |
| transaction.updated                  | Whenever a Transaction is updated in the Astrada system | References to the updated transaction object and its related entities | [See here](https://docs.astrada.co/reference/event-types#transactionupdated) |
| banklink.completed                   | Whenever a bank-link enrollment completes                 | The completed bank link and the bank accounts discovered under it | [See here](https://docs.astrada.co/reference/event-types#banklinkcompleted) |
| bankaccount.state_changed            | Whenever a linked bank account's connection state changes | The bank account with its new and previous state, and any re-auth reason | [See here](https://docs.astrada.co/reference/event-types#bankaccountstate_changed) |
| banktransaction.created              | Whenever a bank transaction is synced from a linked bank account | The created bank transaction                               | [See here](https://docs.astrada.co/reference/event-types#banktransactioncreated) |
| banktransaction.deleted              | Whenever a previously announced bank transaction is removed | The removed bank transaction's id and the reason          | [See here](https://docs.astrada.co/reference/event-types#banktransactiondeleted) |
| transaction.match.created            | Whenever a bank transaction is matched to a card transaction | The match with its confidence, scoring reasons, and both matched sides | [See here](https://docs.astrada.co/reference/event-types#transactionmatchcreated) |
| transaction.match.deleted            | Whenever a previously announced match is retracted         | The retracted match and its bank and card transaction ids | [See here](https://docs.astrada.co/reference/event-types#transactionmatchdeleted) |
| cardsubscription.created             | Whenever a Card Subscription is created in the Astrada system | Reference to the created card subscription                | [See here](https://docs.astrada.co/reference/event-types#cardsubscriptioncreated) |
| cardsubscription.updated             | Whenever a Card Subscription is updated in the Astrada system | Reference to the updated card subscription                | [See here](https://docs.astrada.co/reference/event-types#cardsubscriptionupdated) |
| networkbulkfeed.statechanged         | Whenever a Network Bulk Feed changes state               | Reference to the network bulk feed and the new and old states | [See here](https://docs.astrada.co/reference/event-types#networkbulkfeedstatechanged) |
| enrichment.merchant.created          | Whenever a Transaction Message is enriched with Merchant data | A complete understanding of the created Merchant Enrichment | [See here](https://docs.astrada.co/reference/event-types#enrichmentmerchantcreated) |

# Sample Payloads

## transactionmessage.created

Payload is identical to the [GET Transaction Message](https://docs.astrada.co/reference/gettransactionmessagebyid) endpoint

## transaction.created

Payload consists of links to the created transaction and its related entities.

```json
{
  "_links": {
    "self": {
      "href": "/transactions/884820d4-1b11-4dfd-ab83-988f754712da"
    },
    "subaccount": {
      "href": "/subaccounts/c6d5e036-361e-4773-a514-b9496cf2d2b5"
    },
    "card": {
      "href": "/cards/4d1ff59f-4286-4209-9662-92e174193562"
    },
    "messages": [
      {
        "href": "/transaction-messages/f4b24a0a-6a37-4ce3-8845-ddf0b604a9b4"
      }
    ]
  },
  "acceptor": {
    "city": "LONDON",
    "country": "GBR",
    "mcc": "5734",
    "state": "LND"
  },
  "cardId": "4d1ff59f-4286-4209-9662-92e174193562",
  "cardholderBillingCurrency": "GBP",
  "cardholderBillingHoldAmount": 0,
  "cardholderBillingSettledAmount": 0.81,
  "createdAt": "2024-05-01T06:41:43.810Z",
  "descriptor": "Uber",
  "id": "884820d4-1b11-4dfd-ab83-988f754712da",
  "network": "MASTERCARD",
  "status": "SETTLED",
  "subaccountId": "c6d5e036-361e-4773-a514-b9496cf2d2b5",
  "supersededMessageIds": [],
  "transactionCurrency": "USD",
  "transactionHoldAmount": 0,
  "transactionSettledAmount": 1,
  "transactionType": "DEBIT_01",
  "updatedAt": "2024-05-02T08:41:43.810Z"
}
```

### Augmenting transaction.created with a projection of transaction messages data

Transaction message data is included as part of the `transaction.created` webhook **by default**. An array containing all correlated messages is added to the transaction aggregate payload inside the `_embedded` field. Example:

```json
{
  "_embedded": {
    "messages": [
      {
        "_links": {
          "self": {
            "href": "/transaction-messages/f4b24a0a-6a37-4ce3-8845-ddf0b604a9b4"
          }
        },
        "approvalCode": "537254",
        "cardholderBillingAmount": 1.18,
        "cardholderBillingCurrency": "GBP",
        "dateTime": "2024-04-24T13:39:45",
        "id": "f4b24a0a-6a37-4ce3-8845-ddf0b604a9b4",
        "messageType": "FINL_ADVC",
        "network": "MASTERCARD",
        "result": "APPROVED",
        "superseded": false,
        "transactionAmount": 1.45,
        "transactionCurrency": "USD",
        "transactionReference": "IWVQ22_2024-04-24"
      }
    ]
  }
}
```

### transaction.updated

Payload consists of links to the updated transaction and its related entities.

```json
{
  "_links": {
    "self": {
      "href": "/transactions/884820d4-1b11-4dfd-ab83-988f754712da"
    },
    "subaccount": {
      "href": "/subaccounts/c6d5e036-361e-4773-a514-b9496cf2d2b5"
    },
    "card": {
      "href": "/cards/4d1ff59f-4286-4209-9662-92e174193562"
    },
    "messages": [
      {
        "href": "/transaction-messages/f4b24a0a-6a37-4ce3-8845-ddf0b604a9b4"
      },
      {
        "href": "/transaction-messages/934f8701-53e3-4a2b-a000-6bb52195d2ea"
      }
    ]
  },
  "acceptor": {
    "city": "LONDON",
    "country": "GBR",
    "mcc": "5734",
    "state": "LND"
  },
  "cardId": "4d1ff59f-4286-4209-9662-92e174193562",
  "cardholderBillingCurrency": "GBP",
  "cardholderBillingHoldAmount": 0,
  "cardholderBillingSettledAmount": 0.81,
  "createdAt": "2024-05-01T06:41:43.810Z",
  "descriptor": "Uber",
  "id": "884820d4-1b11-4dfd-ab83-988f754712da",
  "network": "MASTERCARD",
  "status": "SETTLED",
  "subaccountId": "c6d5e036-361e-4773-a514-b9496cf2d2b5",
  "supersededMessageIds": [],
  "transactionCurrency": "USD",
  "transactionHoldAmount": 0,
  "transactionSettledAmount": 1,
  "transactionType": "DEBIT_01",
  "updatedAt": "2024-05-02T08:41:43.810Z"
}
```

### banklink.completed

Sent when a bank-link enrollment finishes, via the manual `PATCH /bank-links/{bankLinkId}` completion or the hosted-link flow. A completion emits **exactly one**`banklink.completed`, carrying the completed `bankLinkId` and **all** the bank accounts discovered under it in that single delivery.

```json
{
  "bankLinkId": "enrollment_amex_7f2c",
  "bankAccounts": [
    {
      "id": "059d5e6a-cfb1-46e6-ab84-6586582b6b58",
      "name": "Platinum Card",
      "mask": "1005",
      "type": "credit",
      "cardIds": ["9e107d9d-372b-4d1a-9f4a-654321abcdef"],
      "cards": [
        {
          "id": "9e107d9d-372b-4d1a-9f4a-654321abcdef",
          "subscriptionId": "1b671a64-40d5-491e-99b0-da01ff1f3341",
          "last4digits": "1005",
          "network": "amex",
          "enrollmentType": "bank-feed"
        }
      ]
    }
  ]
}
```

### banktransaction.created

Sent when a bank transaction is synced from a linked account (via Plaid sync).

```json
{
  "id": "7f2a9c4e-3b1d-4e8f-a5c7-6d0e2f9b8a3c",
  "bankAccountId": "3a8f2c1d-5e7b-4d9a-b6c8-9f0e1d2a3b4c",
  "bankAccountName": "Checking",
  "date": "2025-10-15",
  "amount": 42.5,
  "currency": "USD",
  "description": "UBER TRIP",
  "merchantName": "Uber",
  "category": "Travel",
  "pending": false,
  "transactionType": "debit"
}
```

### enrichment.merchant.created

```json
{
  "_links": {
    "message": {
      "href": "/transaction-messages/884820d4-1b11-4dfd-ab83-988f754712da"
    },
    "merchant": {
      "href": "https://www.amazon.com",
      "title": "Amazon"
    },
    "merchant-logo": {
      "href": "https://static.v2.spadeapi.com/logos/5f35110e8de74f9cadc6b28bf87dd5b6/light.png",
      "type": "image/png",
      "title": "Amazon logo"
    }
  },
  "id": "6fb8303a-3a91-41d1-a56d-5056cc7e84a9",
  "createdAt": "2025-10-20T17:38:317Z",
  "merchant": {
    "name": "Amazon",
    "category": "Online Marketplace"
  },
  "location": {
    "address": "1234 W 5th Ave Suite 100",
    "city": "New York",
    "state": "NY",
    "country": "USA",
    "postalCode": "10001",
    "phoneNumber": "+18664862360"
  }
}
```
