The Tyro terminal processes transactions as part of a settlement period — a business day. Funds land in the settlement account once that period is closed on the terminal. Terminals are scheduled to close their settlement period automatically once every 24 hours (by default, at midnight or 5 AM AEST), and that automatic settlement time can be changed on the terminal if needed. Manual settlement lets the POS send the settlement request to the terminal itself instead — typically as part of the POS's own end-of-day process — and the terminal closes off the current settlement period there and then.
Before you begin, check the certification criteria: Certification Criteria Document.
| Function definition | Purpose | Parameters |
|---|---|---|
manualSettlement(responseReceivedCallback, options) | Initiates a manual settlement request on the terminal. | responseReceivedCallback (Function); options (Object) |
| Parameter | Type | Description | Required |
|---|---|---|---|
mid | Integer | Override the configured mid for multi-merchant terminals, or if your browser does not support local storage, or if you have developed headless pairing as a feature. | Optional — required for headless pairing, multi-merchant, or if your browser does not support local storage |
tid | Integer | Override the configured tid for multi-merchant terminals or if your browser does not support local storage or if you have implemented headless pairing as a feature. | Optional — required for headless pairing, multi-merchant, or if your browser does not support local storage |
integrationKey | String | Supply the integration key if your browser does not support local storage or if you have developed headless pairing or multi-merchant as a feature. | Optional — required for headless pairing, multi-merchant, or if your browser does not support local storage |
function doManualSettlement() {
reset();
iclient.manualSettlement(responseReceivedCallback);
}
var responseReceivedCallback = function(response) {
console.log(JSON.stringify(response));
$("#result").html(response.result);
$("#Message").html(response.message);
$("#TerminalBusinessDay").html(response.currentTerminalBusinessDay);
}
Don't click Save if you make changes in the JS Fiddle — click Run instead. Clicking Save may break the fiddle's functionality.
The manual settlement response is returned to the POS using responseReceivedCallback. The result field is either success or failure; message is text to display to the user; currentTerminalBusinessDay gives the reporting day after the settlement request, in format dd/MM/yyyy, and is only returned if result is success.
{
"result":"success",
"message":"Settlement complete",
"currentTerminalBusinessDay":"19/01/2024"
}| Function | Description | Usage required |
|---|---|---|
responseReceivedCallback | Invoked when the request has been completed on the terminal. Called with a single object containing the fields in the table below ? Was just a bit confusing because they're in separate tables. | Required |
| Field | Type | Description | Usage required |
|---|---|---|---|
result | String | The result of the request, either success or failure. | Required |
message | String | The message to display to the merchant. | Required |
currentTerminalBusinessDay | String | Current reporting day after the settlement request. Only returned if result is success. Format dd/MM/yyyy. | Required |
- Program the function that handles
responseReceivedCallbackand the fields it makes available. - On a successful request, display a modal showing the result, the message, and the
currentTerminalBusinessDay. - On an unsuccessful request, display a modal showing the result and the message.
var responseReceivedCallback = function(response) {
console.log(JSON.stringify(response));
$("#result").html(response.result);
$("#Message").html(response.message);
$("#TerminalBusinessDay").html(response.currentTerminalBusinessDay);
}{
"result":"success",
"message":"Settlement complete",
"currentTerminalBusinessDay": "18/12/2021"
}