> ## Documentation Index
> Fetch the complete documentation index at: https://docs.business.blaaiz.com/llms.txt
> Use this file to discover all available pages before exploring further.

# CAD

> Webhook payload for CAD collection transactions

<Warning>
  You must have added an interac email (e.g [payments@company.com](mailto:payments@company.com)) via the Blaaiz dashboard. Without this, funds won't reflect in your wallet.
</Warning>

When your CAD wallet is funded via Interac's auto-deposit, details about the transaction are sent in a payload that provides essential information for record-keeping and reconciliation.

These are sent to your `collection_url` when your business receives funds.

## Parameters overview

| Parameters                            | Description                                                                                                                                 |
| :------------------------------------ | :------------------------------------------------------------------------------------------------------------------------------------------ |
| `message`                             | A message indicating the status of the transaction.                                                                                         |
| `transaction_id`                      | A unique identifier for the transaction used for tracking and reference.                                                                    |
| `transaction_reference`               | A unique identifier for the transaction used for tracking and reference.                                                                    |
| `transaction_status`                  | The status of the transaction (e.g., SUCCESSFUL, FAILED).                                                                                   |
| `transaction_fee`                     | The fee charged for the transaction.                                                                                                        |
| `transaction_amount_without_fee`      | The amount that was transferred, excluding any fees.                                                                                        |
| `transaction_amount`                  | The total amount of the transaction, including fees.                                                                                        |
| `transaction_currency`                | The currency in which the transaction was conducted (e.g., CAD for Canadian Dollars).                                                       |
| `payee_collection_email`              | The Email of the recipient                                                                                                                  |
| `source_information`                  | An object containing details about the source of the funds.                                                                                 |
| `source_information.collection_email` | The email address of the sender who initiated the collection.                                                                               |
| `source_information.collection_name`  | The name of the sender who initiated the collection. May be `null` if unavailable.                                                          |
| `failure_reason`                      | The reason a collection failed, as reported by the payment provider. Blaaiz includes this field only when `transaction_status` is `FAILED`. |
| `event_id`                            | A unique identifier for the event associated with the transaction.                                                                          |
| `type`                                | The type of transaction, indicating it as a collection (e.g., "collection").                                                                |

## Example payload

```json theme={null}
{
  "message": "Transaction Completed",
  "transaction_id": "20580e50-1b32-40a6-aa46-ac8e795b3zas",
  "transaction_reference": "CA1MR6ahQBCJ",
  "transaction_status": "SUCCESSFUL",
  "transaction_fee": 0.0,
  "transaction_amount_without_fee": 20.0,
  "transaction_amount": 20.0,
  "transaction_currency": "CAD",
  "payee_collection_email":"yourbusinss@example.com",
  "source_information": {
    "collection_email": "test@test.com",
    "collection_name": "John Doe"
  },
  "event_id": "9d46a6c7-fbb4-48f0-912c-4f9611fe5844",
  "type": "collection"
}
```

## Failed transactions

Blaaiz also sends a collection webhook when a CAD collection fails. The webhook goes to the same `collection_url`, with `transaction_status` set to `FAILED` and `message` set to `Transaction Failed`.

A failed webhook adds a `failure_reason` field. This field gives the reason the collection did not complete, as reported by the payment provider. Use this reason to tell the payer what to correct, or to open a support case.

<Note>
  Blaaiz sends `failure_reason` one time, on the failure webhook only. A later webhook replay does not include the `failure_reason` field.
</Note>

<Warning>
  Do not release goods or value for a `FAILED` collection. No funds move, and Blaaiz does not credit your CAD wallet.
</Warning>

On a failed collection, the amount fields are `0.00` and the `source_information` fields can be `null`.

### Failed example payload

```json theme={null}
{
  "message": "Transaction Failed",
  "transaction_id": "20580e50-1b32-40a6-aa46-ac8e795b3zas",
  "transaction_reference": "CA1MR6ahQBCJ",
  "transaction_status": "FAILED",
  "transaction_fee": 0.0,
  "transaction_amount_without_fee": 0.0,
  "transaction_amount": 0.0,
  "transaction_currency": "CAD",
  "payee_collection_email": "yourbusiness@example.com",
  "source_information": {
    "collection_email": null,
    "collection_name": null
  },
  "failure_reason": "GetIncomingTransfers Error : Interac Response Description : 320 - Operation cannot be performed due to current transfer status",
  "event_id": "9d46a6c7-fbb4-48f0-912c-4f9611fe5844",
  "type": "collection"
}
```
