TriggerTransaction
The TriggerTransaction
endpoint is used to initiate user interaction with the physical terminal. It sends a wake-up signal to the specified device. The request should contain a value that Nayax will use to authorize (Pre-Authorization) or charge (Pre-Selection) the consumer’s payment card.
- If the Pre-Authorization flow is implemented, the authorization value can be managed and retrieved from Nayax Core.
- In case the Pre-Selection flow is implemented, a request with a missing amount will return an error.
Request
The integrator sends a POST request to the /spark/TriggerTransaction
endpoint. The body parameters need to be as the ones in the example below:
{
"SparkTransactionId": "12c7cec2-c690-4425-9a1f-db0db60e2d8c",
"TerminalId": "0434334921100366",
"TerminalIdType": 1,
"Amount": 15.00,
"PosDisplay": ";Charging Station:3;Day:30.52p;Night:9p;Standing charge:52.18p/day; Off-peak:12:30-04:30;",
"TransactionId": "external-session-id-001"
}
Request Parameters
The table below describes the parameters of the request:
Field | Type | Required | Description |
---|---|---|---|
SparkTransactionId | String | Yes | Unique session ID received from Spark during authentication |
TerminalId | String | Yes | ID of the target terminal |
TerminalIdType | Integer | Yes | Defines the ID type used. 1 for HW Serial, 2 for Nayax Machine ID |
Amount | Number | Yes | The amount to be pre-authorized (e.g., 15.00) |
PosDisplay | String | No | Custom message to show on the terminal display (semicolon-delimited format). See PosDisplay Format to learn how to format your message. |
TransactionId | String | Yes | A unique external transaction/session ID used by the integrator |
Response
A successful response will return the following body:
{
"SparkTransactionId": "12c7cec2-c690-4425-9a1f-db0db60e2d8c",
"Status": {
"Verdict": "Approved",
"ErrorDescription": " No Errors "
}
}
Response Parameters
The table below describes the parameters of the response:
Field | Type | Description |
---|---|---|
SparkTransactionId | String | Echoes the transaction ID from the request |
Status | Object | Contains the resulting verdict and an optional error description |
Status.Verdict | String | Result of the request (Approved , Rejected , etc.) |
Status.ErrorDescription | String | Provides a human-readable description of any errors that occurred, or indicates No Errors for a successful request. |
Updated 9 days ago