Use this transaction to process a standard sale.
Endpoint : /sale
- The transaction will be automatically settled at end of day.
- For DCC, the PED will process in the card currency if requested.
Sale Request
{
"amount":"20.00",
"refid":"12345678987654321",
"siteid":"123456",
"terminalserialnumber":"6789654678",
"txndate":"2023-02-01:16:13:20",
"type":"sale",
"wait":"y"
}
Request field specification
Field | Format | Description | |
Required | amount | String e.g. 20.00 |
The full amount for the transaction in main units (e.g. £20 would be submitted as 20.00). The value submitted must be greater than 0. |
Required | refid | String (min length: 1) e.g. 1234567890 |
The unique identifier of the transaction being submitted. (The value submitted must be unique within the scope of your own transactions) |
Required | siteid | String (min length: 1) e.g. 1234 |
Unique identification code supplied by Trust Payments. |
Required | terminalserialnumber | String (min length: 1) e.g. 1234567890 |
The unique terminal identifier for the PIN Entry Device (PED) supplying the card details. This is the serial number of the PED. |
Required | txndate | String e.g. 2020-03-01:10:20:05 |
Unique timestamp for the transaction. |
Required | type | String |
You must submit "sale", as shown in the request example. |
Required | wait | String |
The following two values can be submitted:
The status of the transaction can be checked at a later time by submitting a Status request via TRU Link. |
Sale Response
{
"amount":"20.00",
"authcode":"abc1234",
"cardtype":"Visa",
"finalamount":"20.00",
"last4":"0026",
"merchantreceipt":"Sample output",
"receipt":"Sample output",
"refid":"12345678987654321",
"resultcode":"Approved",
"siteid":"123456",
"terminalserialnumber":"6789654678"
}
Response field specification
Field | Format | Description | |
Returned | amount | String e.g. 20.00 |
The original full amount authorised for the transaction in main units (e.g. £20 would be returned as 20.00). Note: The amount may differ from that submitted in the request due to changes made by the customer during checkout (e.g. addition of a tip). |
Returned | refid | String e.g. 1234567890 |
The unique identifier assigned to the transaction submitted. |
Returned | resultcode | String e.g. Approved |
The result of the transaction from the acquirer. Possible values are:
|
Returned | siteid | String e.g. 1234 |
Unique code to identify the Trust Payments site used to process the request. |
Returned | terminalserialnumber | String e.g. 1234567890 |
The unique terminal identifier for the PIN Entry Device (PED) supplying the card details. |
Conditional | authcode | String e.g. 1234567890 |
The authorisation code of the transaction. Only returned if transaction is authorised. |
Conditional | cardtype | String e.g. Visa |
Contains the card type used for this transaction (e.g. "VISA"). Returned if available. |
Conditional | error | Integer e.g. 1006 |
The field returns details of an error if a request was not processed successfully. Info on error handling. Only returned if an error has occurred. |
Conditional | errorcode | String e.g. Invalid amount |
This code helps you identify the error if a request was not processed successfully. Info on error handling. Only returned if an error has occurred. |
Conditional | finalamount | String e.g. 20.00 |
The final amount authorised for the transaction in main units (e.g. £20 would be returned as 20.00). Note: The finalamount will include any changes made by the customer during checkout (e.g. addition of a tip). Returned if the finalamount differs from the original amount. |
Conditional | last4 | String e.g. 6789 |
The last four digits of the customer's payment card. Returned if available. |
Conditional | merchantreceipt | String e.g. Merchant Receipt |
Contains merchant receipt data that can be used for printing on the ePOS. Returned if available. |
Conditional | message | String e.g. Message |
Response message from issuer when card is declined. Only returned in a decline response. |
Conditional | receipt | String e.g. Customer Receipt |
Contains cardholder receipt data that can be used for printing on the ePOS. Returned if available. |