The transaction:status_changed event is the most important element of online payment integration. It informs your system about every change in the state (lifecycle) of a specific transaction initiated by the customer.
It is based on this event that your store should make business decisions – e.g., deliver the purchased goods to the customer (when the status changes to paid) or restore products to inventory (when the payment expires or is rejected).
This notification is triggered asynchronously every time a payment transaction moves to a new stage in the SimPay system. You will receive it, among others, when:
- The bank or operator ultimately confirms receipt of funds (change to
transaction_paidstatus). - The payment attempt is rejected by the customer's bank due to insufficient funds (change to
transaction_failure). - The customer does not pay for the order within the designated time and the payment gateway is closed (change to
transaction_expired).
When the type field in the main notification object has the value transaction:status_changed, the data object will contain the following information:
| Field | Type | Description | Example Value |
|---|---|---|---|
id | UUID | Transaction ID sent after generating the transaction | 00554475-7ebb-4f16-b30b-0ce21da1a03b |
payer_transaction_id | char(8) | Transaction ID shown to the payer on the gateway screen | 4878R2PN |
service_id | char(8) | Service identifier (in SimPay Flow - parent service ID) | e65c7519 |
status | TransactionStatusEnum | Current transaction status (e.g., transaction_paid, transaction_failure) | transaction_paid |
amount | object | Amount information object | |
amount.final_currency | ISO 4217 | Currency in which the payer made the payment | PLN |
amount.final_value | string (%.2f) | Final amount paid by the payer (e.g., "0.30", "10.00", "12.37") | 8.47 |
amount.original_currency | ISO 4217 | Currency declared at payment initiation | EUR |
amount.original_value | string (%.2f) | Amount declared at payment initiation (e.g., "0.30", "10.00", "12.37") | 2.00 |
amount.commission_system | string (%.2f) or null | Commission amount charged by SimPay (e.g., "0.30", "10.00", "12.37") | 0.13 |
amount.commission_partner | string (%.2f) or null | Commission amount for the Partner (e.g., "0.30", "10.00", "12.37") | 0.13 |
amount.commission_currency | ISO 4217 or null | Currency in which the commission was charged (PLN/EUR) | PLN |
amount.commission_flow | string (%.2f) or absent | SimPay Flow commission (submerchant transactions only, when greater than zero) | 0.25 |
control | string | Field sent only when it was passed during payment initiation | SHOP_ORDER_1 |
payment | object | Payment method information field | |
payment.channel | string | Payment channel used by the payer (see: Direct Channels) | blik |
payment.type | string | Type/group of payment method | blik |
customer | object | Payer information object | |
customer.country_code | ISO 3166-1 Alpha-2 or null | Buyer's country (e.g., "PL") | PL |
paid_at | ISO 8601 or null | Payment date and time (may not be sent when the transaction is not paid) | 2025-05-26T15:10:24Z |
created_at | ISO 8601 | Transaction creation date and time | 2025-05-26T15:09:59Z |
flow | object or absent | Only for 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 |
To check order payment, always verify the status field. The expected value for a successfully completed process is transaction_paid. You should also absolutely check that amount.original_value and amount.original_currency match the amount stored in your database for the given order.
Below is a complete dump (payload) of the notification sent for the transaction:status_changed event (in this case a rejected transaction – transaction_failure).
(The example signature was generated using the IPN key: UwSkKiIwlxIeOMF8MIq9iDkQWBTtjoJQ. You can use this key and the data below to test your validation algorithm).
{
"type": "transaction:status_changed",
"notification_id": "0196fec6-7a61-7219-9458-bcc45237c252",
"date": "2025-05-23T22:12:22+02:00",
"data": {
"id": "dbc87423-b121-4ad4-977f-b63c3d3831e8",
"payer_transaction_id": "Q68KLAKN",
"service_id": "e65c7519",
"status": "transaction_failure",
"amount": {
"final_currency": "PLN",
"final_value": "8.00",
"original_currency": "PLN",
"original_value": "8.00",
"commission_system": "0.06",
"commission_partner": "7.94",
"commission_currency": "PLN"
},
"control": "3e63e31d-f08d-4942-a223-3bad2dce8096",
"payment": {
"channel": "blik",
"type": "blik"
},
"customer": {
"country_code": null
},
"created_at": "2024-08-10T15:41:50+02:00"
},
"signature": "095a7be5d77c4bab667dbd0f35d9b1cb0c9cec50d8af42842cc37a95b233925e"
}See signature calculation
- Flatten all elements sequentially +
|separation:
Our string will look like this:
transaction:status_changed|0196fec6-7a61-7219-9458-bcc45237c252|2025-05-23T22:12:22+02:00|dbc87423-b121-4ad4-977f-b63c3d3831e8|Q68KLAKN|e65c7519|transaction_failure|PLN|8.00|PLN|8.00|0.06|7.94|PLN|3e63e31d-f08d-4942-a223-3bad2dce8096|blik|blik||2024-08-10T15:41:50+02:00- Append the IPN key at the end of the string:
...|UwSkKiIwlxIeOMF8MIq9iDkQWBTtjoJQ - Calculate SHA256 from the above string and encode it in hex:
<?php
$signature = hash('sha256', 'transaction:status_changed|0196fec6-7a61-7219-9458-bcc45237c252|2025-05-23T22:12:22+02:00|dbc87423-b121-4ad4-977f-b63c3d3831e8|Q68KLAKN|e65c7519|transaction_failure|PLN|8.00|PLN|8.00|0.06|7.94|PLN|3e63e31d-f08d-4942-a223-3bad2dce8096|blik|blik||2024-08-10T15:41:50+02:00|UwSkKiIwlxIeOMF8MIq9iDkQWBTtjoJQ');- Compare using a secure comparison function (e.g.,
hash_equalsin PHP) the calculated signature with the one sent in thesignaturefield of the notification.