Documentation Index
Fetch the complete documentation index at: https://docs.m4psp.com/llms.txt
Use this file to discover all available pages before exploring further.
Issued invoice notice after payment or refund
After changing the payment status or returning to one of the final ones, the M4 system sends a notification to the shop to the URL specified in the shop settings or in the request body (if specified in the description of the request parameters).Warning: To successfully receive server-side notifications, please make sure that your server receiving HTTP requests from us is configured according to the current security standards described on https://cheatsheetseries.owasp.org/cheatsheets/Transport_Layer_Protection_Cheat_Sheet.htmlPay special attention to the TLS ciphers you support. Notifications for payments and refunds are delivered to one callback URL. You can distinguish notifications by the value of the GET parameter named
type in the URL from which you received the notification.
Possible values of type:
invoice- payment notificationrefund- refund notification
| IP addresses |
|---|
| 35.198.100.222 |
| 35.198.175.25 |
- Method:
POST - Format:
Content-Type: application/json
Success:
If necessary, the support service can enable an alternative notification format: Content-Type: application/x-www-form-urlencoded, in this case, all the transmitted parameters will have a string representation.
Attention: It is necessary to check the values from the notification with the values in the invoice, and to check signature in the notification.The signature is generated using the same algorithm as when issuing the invoice. All the not-null and non-empty parameters present in the notification are involved in the signature validation, including zero values. At the same time,
null values and empty strings are not involved in signature validation and are excluded.
Consider building your system using forward compatibility strategy to be ready to handle new parameters in the server notifications without need to upgrade your own system.
Expected response
If the notice is received and processed correctly, it is necessary to return the status200 and the message body OK (text/plain) to the HTTP response. Otherwise, notices will be sent again, with an increasing interval, including only 25 attempts, the last one at the end of the day.