ExternalSettlement
/ExternalSettlement method is called by the 3rd-party server to finalize a transaction after the payment provider has authorized the initial amount and the service or products have been provided to the consumer. This request must contain the final amount to be charged.
To successfully settle a transaction, you must provide three mandatory identifiers that match the original authorization data exactly:
- NayaxTransactionID: The unique identifier for the transaction in the Nayax system.
- SiteID: The ID of the site where the machine is located.
- MachineAUTime: The authorization timestamp from the terminal. Optional field but recommended.
- MachineAUTime is not available for Marshall machines. However, as this field is optional, you can still use ExternalSettlement without it.
Where to Find this Information
Depending on your hardware, these identifiers are retrieved through different channels:- OTI Devices: Information is sent via the CommerceAPI.
- Marshall Devices: Information is sent via Transfer Data
- Alternative: All integrators can retrieve this data via Amazon SQS.
Adding Digital Receipts (EReceiptData)
If you use the Nayax eReceipt platform, you can use the EReceiptData field to add custom information to the digital receipt that isn’t stored in the Nayax Backoffice.
- Section Naming: To display fields without a section header, use a blank space for the section name:
{" ":[...]}. - Order: Fields appear on the receipt in the exact order they are listed in the string.
- Characters: Use escape characters (e.g.,
\") for internal quotes within the JSON string.
Reporting Products (ProductInfo)
For operators who manage a Products Map in Nayax Core, the ProductInfo object allows you to report exactly which items were sold.
This is an array of objects where each item requires:
| Field | Type | Description |
|---|---|---|
| Value | Decimal | The price of a single unit of the product. * The value is taken as is (Decimal place of 0), meaning if you send value of 6.50 the value that the consumer would be charged for is 6.50, and if you send 65 the value would be 65.00) |
| Code | Integer | The Product Code as defined in your Nayax Products Map. * The value is taken as is (Decimal place of 0) |
| Quantity | Integer | The number of units of this product provided. * The value is taken as is (Decimal place of 0) |
[{"Value": 6.50, "Code": 12, "Quantity": 3}]
Troubleshooting Declined Settlements
If a settlement request is declined, the response will include an ErrorCode 50: “External Settlement Failed”. Common reasons for failure include:- Missing Identifiers: Mandatory fields like
SiteIdwere missing from the request. - Data Mismatch: The IDs provided do not match the original authorization record.
- Time Limit: The request was sent more than 48 hours after the transaction started.
Body
Settlement request details for an external transaction.
Nayax Internal Unique identifier for the transaction.
1234567890
Unique identifier for this transaction, used by Spark.
36"a1b2c3d4-e5f6-7890-1234-567890abcdef"
The date time string of when the /Authorization took place, in local (machine) time.
"20251212104530123"
Optional. Echo value from Authorization Callback. Represents the Site ID.
2
Unique Identifier for the Nayax Terminal.
"0434334921100366"
Indicates the type of TerminalId. 1 - Nayax HW serial, 2 - Nayax Machine ID
1, 2 1
The value to be provided to the Terminal for transaction initiation. Decimal (max 2 digits for cents)
15.75
Optional. Transaction's 3rd party data for receipt generation.
Array of products associated with the settlement.
Response
Success
Response details for an external settlement request.
The Spark unique identifier for this transaction.
"a1b2c3d4-e5f6-7890-1234-567890abcdef"
The status of the settlement request.
For Credit card implementation, when the transaction is approved, this is the External (usually Card issuer's) Authorization Code.
"A1B2C3"
The date time string of when the /Authorization or /Sale took place, in local (machine) time.
"20251212104530123"
The value Settled by the card issuer during the Settlement phase.
15.75