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 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;",
  "TransactionTimeout": 60
}

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.

TransactionTimeout

Integer

Yes

Timeout on the terminal side for presenting a card.
Has to be greater than 0.

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:

FieldTypeDescription
SparkTransactionIdStringEchoes the transaction ID from the request
StatusObjectContains the resulting verdict and an optional error description
Status.VerdictStringResult of the request (Approved, Rejected, etc.)
Status.ErrorDescriptionStringProvides a human-readable description of any errors that occurred, or indicates No Errors for a successful request.
Status.ErrorCodeNumberA numeric code indicating a specific type of error that occurred during the transaction. This field is present only in error responses.