Webhook URL:
You will provide the URL to receive the webhooks during the onboarding phase.
Webhook Request
There are two types of merchant notifications, depending on theRequestType.
Type 1 — Sale or Auth (RequestType: 0)
The full notification structure contains card data, 3DS information, retry attempts, and all transaction fields. The following JSON example illustrates a typical successful Sale notification:JSON
Type 2 — All other request types (RequestType: 1, 2, 3…)
This is a minimal notification containing only core fields. Field presence varies by request type. Refer to the sample below for the payload structure:JSON
Webhook Request Parameters
The following parameters define the structure of the incoming webhook notification:| Field Name | Type | Description |
|---|---|---|
NayaxTransactionId | String | Unique transaction ID generated by Nayax. |
MerchantRequestId | String | The actor’s transaction reference ID. |
MachineId | String | The unique ID of the virtual terminal/machine. |
RequestType | Integer | The transaction type identifier (e.g., 0 for Sale, 1 for Auth). Note: When calculating the HMAC, use the corresponding Enum Name (e.g., “Sale” or “Auth”) instead of the integer. |
IsApproved | Boolean | Indicates if the transaction was approved. |
CardInfo | Object | Root object containing payment card details. |
IsCardCommercial | String | Values: “true”, “false”, “unknown”. Note: additional values may exist. |
PaymentMethodVariant | String | Payment method variant (e.g. “amex_googlepay”). |
RetryAttempts | Array | List of objects containing Acquirer, AcquirerAccount, and ResponseCode. |
FollowUpRequestOptions | Array[Int] | Available follow-up request types (e.g. [2, 4] means Settlement and Refund are available). |
Hmac | String | Optional. HMAC-SHA256 signature for validating authenticity. See HMAC Validation. |
Conditional Fields
The following fields are conditional and are not always present:- NayaxToken: Present when the actor uses Charge Token.
- AdditionalInfo: Present if the actor includes it in the original request. Appears in both
MerchantNotificationandMerchantTransactionNotification. - EReceiptUrl: Present when the eReceipt feature is enabled.
Webhook Delivery & Retries
Nayax sends webhook notifications to the URL you provided during onboarding. The system reacts to your server’s HTTP response codes as follows:| Response Code | Behavior |
|---|---|
| 200 OK | Notification received successfully. Nayax stops. |
| 500 | Server-side error. Nayax will retry up to 3 times at varying intervals. |
| Any other | (e.g., 401, 404) Nayax stops; no retries. |
If HMAC validation fails on your end, do not return 500. A broken HMAC implementation will not be fixed by retrying. Fix the implementation and test with the examples on the HMAC Validation page.