Every IPN notification (Webhook) sent by the SimPay system has a consistent, base structure. Regardless of which event the notification concerns (e.g., a payment made or a refund), the sent request always consists of the same HTTP headers and main JSON elements – a kind of "envelope".
Every POST request sent by our servers will contain the following headers. Pay attention to User-Agent, which can serve as a first, preliminary (though insufficient for full security) filter rejecting traffic from bots:
| Header | Value |
|---|---|
Content-Type | application/json |
User-Agent | SimPay-IPN/2.0 |
For your system to properly receive notifications from SimPay, it must meet several strict technical conditions:
- Public availability: Your IPN endpoint must be exposed on the public Internet. Notifications will not reach local environments (
localhost), unless you use tools like ngrok. - Fast response: Our server's waiting time for a response is limited. Heavy operations (sending emails, generating PDFs) must absolutely be delegated to background queue systems.
- Correct HTTP response: We expect a specific response confirming receipt of the request. Your server must return one of the following options:
- Status
HTTP 200 OKwith theContent-Type: text/plainheader and a response body containing only the wordOK. - Status
HTTP 202 AcceptedorHTTP 204 No Content(without response body / empty response).
- Status
To ensure maximum security and performance, we recommend handling each incoming notification in exactly this order:
- IP address verification – check if the sender's IP address is on our list of authorized addresses. Reject the request if the IP does not match.
- Signature verification – calculate the hash from the received data and compare it with the
signaturefield. You'll gain 100% certainty that nobody modified the payload in transit. - Type recognition (routing) – read the value from the
typefield and based on it, delegate data (from thedataobject) to an asynchronous queue in your system (Queue/Worker). - Connection termination – immediately after sending the task to the background, return a correct response to us (e.g.,
200 OK text/plain), closing the connection with the SimPay server.
When your endpoint receives the request, its body will contain the following fields:
| Field | Type | Description |
|---|---|---|
type | string (Enum) | Type of the sent event (e.g., transaction:status_changed). Based on this, you know what schema to expect in the data field. |
notification_id | char(36) | Unique identifier (UUID) of the specific notification. Allows preventing processing of the same notification multiple times. |
date | string (ISO 8601) | Date and time of notification generation/sending by our system (e.g., 2025-05-20T16:36:07Z). |
data | object | Object containing detailed business data about the specific event. |
signature | string | Cryptographic signature (SHA-256 hash) generated from field values. Used to verify notification authenticity. |
POST /your-ipn-endpoint HTTP/1.1
Host: your-store.com
Content-Type: application/json
User-Agent: SimPay-IPN/2.0
// the sent body is not formatted (does not contain spaces, new lines, etc.)
{
"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"
}Now that you know the base structure, it's time to implement security measures and learn about the specific data we send:
👉 Signature Verification and Security – learn how to correctly calculate and verify the hash in step 2.
👉 Event: transaction:status_changed – see the data field structure for the most important event regarding transaction payment.