Virtual Account Allocation Webhooks

The payload sent to your webhook URL would have an event property that identifies what the event is about, a resource property identifying the transaction type and the data attribute which would contain the event data.

Below is a list of Virtual account events broadcasted by TorusMara:

account.allocation_successful : This webhook is sent when a virtual account has been created successfully.
account.allocation_failed : This webhook is sent when a virtual account allocation fails.

Sample JSON body for each event:

{
  "id": "f7cf285f-297f-432e-9320-864ebb8c3836",
  "event": "account.allocation_successful",
  "resource_type": "deposit",
  "data": {
  	"id": "6ba7b810-9dad-11d1-80b4-00c04fd430c8",
  	"customer_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c9",
    "business_id": "6ba7b810-9dad-11d1-80b4-00c04fd430c0",
    "account_id": "ACC123456",
    "account_details": {
      "iban": "GB29 NWBK 6016 1331 9268 19",
      "sort_code": "12-34-56",
      "notes": null,
      "bank_phone": "",
      "reference": "TRANSFER123",
      "swift_code": null,
      "bank_address": "123 Main Street, London, UK",
      "account_name": "John Doe",
      "account_number": "12345678",
      "bank_name": "National Westminster Bank",
      "bank_code": "",
      "routing_number": "",
      "beneficiary_address": "UK"
    },
    "reference": "REF123456",
    "currency": "EUR",
    "created_at": "2024-02-28T12:00:00Z",
    "updated_at": "2024-02-28T13:30:00Z",
    "deleted_at": null
  }
}
{
  "id": "f7cf285f-297f-432e-9320-864ebb8c3836",
  "event": "account.allocation_failed",
  "resource_type": "deposit",
  "data": {
    "request_id": "f7cf285f-297f-432e-9320-864ebb8c3836",
    "business_id": "efc285f-297f-432e-9320-232fcc8c5663",
    "customer_id": "f4bab8b7-7e9b-479d-ab18-237cdd86795e",
    "message": "Invalid address was passed",
    "details": "Invalid address was passed"
  }
}