# Event: blik:alias_status_changed

The `blik:alias_status_changed` event informs your system about every BLIK alias status change.

## When Is This Event Sent?

Sent when handling BLIK-based saved payment methods (e.g., BLIK Recurrent Payments):

* Customer approves subscription in banking app (`alias_active`)
* Alias expires or customer deregisters your store (`alias_expired` or `alias_unregistered`)


## `data` Object Structure

| Field | Type | Description | Example Value |
|  --- | --- | --- | --- |
| `id` | `UUID` | Alias ID in SimPay | `019972b1-e4c0-714f-a10b-f88a158bee50` |
| `service_id` | `char(8)` | Service identifier (in SimPay Flow - parent service ID) | `e65c7519` |
| `type` | `string` | Alias type | `PAYID` |
| `value` | `string` | Alias value | `AABBCCDD` |
| `label` | `string` | Label in the payer's mobile banking app | `testy` |
| `status` | `BlikAliasStatusEnum` | Current [alias status](/payment/statuses#statusGroup=BLIK+Alias+Statuses) | `alias_active` |
| `created_at` | `ISO 8601` | Alias creation date | `2025-09-22T20:31:25+02:00` |
| `updated_at` | `ISO 8601` | Last alias update date | `2025-09-22T20:31:32+02:00` |
| `flow` | `object` or absent | Only for [SimPay Flow](/simpay-flow/webhooks#payment-webhooks-ipn-in-simpay-flow) submerchants |  |
| `flow.submerchant_id` | `string` | Submerchant ID | `flsm_aaaabbbb` |
| `flow.submerchant_custom_id` | `string` | Submerchant `customId` | `user-123` |
| `flow.flow_service_id` | `string` | Flow service ID | `flow_aaaabbbb` |


Tip
Always check the `status` field. Before initiating a recurrent payment, ensure the alias has status **`alias_active`**.

## Example JSON Payload (alias type PAYID)

*(IPN key: **`UwSkKiIwlxIeOMF8MIq9iDkQWBTtjoJQ`**)*

```json
{
  "type": "blik:alias_status_changed",
  "notification_id": "019972b2-0233-73d7-ad91-c114b62d56e3",
  "date": "2025-09-22T20:31:32+02:00",
  "data": {
    "id": "019972b1-e4c0-714f-a10b-f88a158bee50",
    "service_id": "e65c7519",
    "type": "PAYID",
    "value": "AABBCCDD",
    "label": "testy",
    "status": "alias_active",
    "created_at": "2025-09-22T20:31:25+02:00",
    "updated_at": "2025-09-22T20:31:32+02:00"
  },
  "signature": "8f1a0f6de3eb5c050e70ca0d7407588e380e8e607e131e289afb0a3a2996d4a1"
}
```

## Example JSON Payload (alias UID)

Below is a complete snapshot (payload) of a notification sent for the `blik:alias_status_changed` event (in this case,
a successful registration and activation of an alias).

*(The example signature was generated using the IPN key: **`UwSkKiIwlxIeOMF8MIq9iDkQWBTtjoJQ`**. You can use
this key and the data below to test your validation algorithm.)*

```json
{
  "type": "blik:alias_status_changed",
  "notification_id": "019e41ce-92d8-7193-a466-ae753719545f",
  "date": "2026-05-19T21:55:17+02:00",
  "data": {
    "id": "019e41ce-65f6-71ac-a9b8-dcc7134591bf",
    "service_id": "e65c7519",
    "type": "UID",
    "value": "aaaaaa",
    "label": "SuperStore",
    "blik_identifier": 953832,
    "status": "alias_active",
    "expires_at": "2028-05-19T21:55:11+02:00",
    "created_at": "2026-05-19T21:55:06+02:00",
    "updated_at": "2026-05-19T21:55:17+02:00"
  },
  "signature": "6f551ef38eef4c352f92656c17cb43bc75fe32a5250238d64a4f4f25cf8eaec7"
}
```

View signature calculation
1. Flatten all elements in order + separate using `|`:


The resulting string will look like this:

```
  blik:alias_status_changed|019e41ce-92d8-7193-a466-ae753719545f|2026-05-19T21:55:17+02:00|019e41ce-65f6-71ac-a9b8-dcc7134591bf|e65c7519|UID|aaaaaa|SuperStore|953832|alias_active|2026-05-19T21:55:06+02:00|2026-05-19T21:55:17+02:00
```

1. Append the IPN key at the end of the string:
`...|UwSkKiIwlxIeOMF8MIq9iDkQWBTtjoJQ`
2. Compute SHA256 from the above string and encode it in hex:


```php
<?php

$signature = hash('sha256', 'blik:alias_status_changed|019e41ce-92d8-7193-a466-ae753719545f|2026-05-19T21:55:17+02:00|019e41ce-65f6-71ac-a9b8-dcc7134591bf|e65c7519|UID|aaaaaa|SuperStore|953832|alias_active|2026-05-19T21:55:06+02:00|2026-05-19T21:55:17+02:00|UwSkKiIwlxIeOMF8MIq9iDkQWBTtjoJQ');
```

1. Compare using a secure comparison function (e.g., `hash_equals` in PHP) the calculated signature with the one
provided in the `signature` field of the notification. In this case, the resulting hash will be:
`6f551ef38eef4c352f92656c17cb43bc75fe32a5250238d64a4f4f25cf8eaec7`.