Settlement

The Settlement endpoint is used to finalize an approved transaction. After the session ends and the total amount is known, the integrator sends the final amount along with optional e-receipt information.

🚧

Pre-Authorization Only

This method is only relevenat for transactions with Pre-Authorization.

Request

Send a POST request to Spark/spark/Settlement endpoint with the following body:

{
  "NayaxTransactionId": 2004545072,
  "SparkTransactionId": "12c7cec2-c690-4425-9a1f-db0db60e2d8c",
  "SiteId": 2,
  "TerminalId": "0434334921100366",
  "TerminalIdType": 1,
  "Amount": 12.25,
  "EReceiptData": "{\"General\":[{\"Company\":\"Your Payments - Our Solutions\",\"Station Name\":\"B12\"}],\"Service\":[{\"Product\":\"Something Yummy\",\"Price Per Unit\":\"$2.45\",\"Number of Units\":2}]}"
}

Request Parameters

The table below describes the parameters of the request:

FieldTypeRequiredDescription
NayaxTransactionIdIntegerYesUnique transaction ID assigned by Nayax.
SparkTransactionIdStringYesThe session ID from the initial StartAuthentication.
SiteIdIntegerYesIdentifier of the site where the transaction occurred.
TerminalIdStringYesSerial or external ID of the terminal used.
TerminalIdTypeIntegerYesDefines the ID type used. 1 for HW Serial, 2 for Nayax Machine ID
AmountFloatYesFinal transaction amount in major currency units (e.g., dollars or euros).
EReceiptDataStringNoJSON-formatted string representing e-receipt details. For machine operators who wish to provide digital receipts to their consumers via the Nayax eReceipt platform. It can hold additional information to be presented in the digital receipt, which cannot be obtained from Nayax Core. See EReceiptData Format for more details on how to format this parameter.

Response

A successful response will return the following body:

{
  "SparkTransactionId": "12c7cec2-c690-4425-9a1f-db0db60e2d8c",
  "Status": {
    "Verdict": "Approved",
    "ErrorDescription": "No Errors"
  },
  "CardBrand": "Visa",
  "CardLast4Digits": "1234",
  "AuthCode": "333333",
  "MachineAuTime": "20240205194122328",
  "AuTime": "20240205174122328",
  "SeTime": "20240205192215572",
  "CurrencyCode": "EUR",
  "CurrencyNumeric": "978",
  "FiscalRrn": "1A2b3C4d5E6f7g8H9i",
  "NayaxRRN": "111111"
}

Response Parameters

The table below describes the parameters of the response:

FieldTypeDescription
SparkTransactionIdStringUnique ID used for this transaction session.
StatusObjectResult of the settlement process.
Status.VerdictString"Approved" or "Declined".
Status.ErrorDescriptionStringDescribes error if Declined, or "No Errors" if success.
Status.ErrorCodeNumberA numeric code indicating a specific type of error that occurred during the transaction. This field is present only in error responses.
CardBrandStringCard brand used (e.g., Visa, MasterCard).
CardLast4DigitsStringThe last four digits of the card.
AuthCodeStringAuthorisation code returned by the payment provider.
MachineAuTimeStringDevice timestamp at the moment of authorization.
AuTimeStringAuthorization server timestamp.
SeTimeStringSettlement server timestamp.
CurrencyCodeStringISO currency code (e.g., "EUR").
CurrencyNumericStringISO 4217 numeric code (e.g., "978").
FiscalRrnStringFiscal reference number for accounting/reporting.
NayaxRRNStringInternal Nayax settlement reference number.