Transaction Retrieval and Cancellation
You can use the same GET
/transaction request as before to query multiple transactions at a time. This is useful if you want to maintain a CRM or database of transactions for POS systems to query.
GET
/transaction Request
It is the same endpoint, but when querying multiple transactions you include different parameters into the URL.
These requests support filtering the results by specifying the required filter in the query string in the format:
<fieldName>=<value>
Values need to be correctly URL encoded if they contain characters that are reserved in URL notations, for example forward slashes must be encoded as %2F
.
Example Filters
https://optomany-axeptconnectcloudmerchant-ppe.azurewebsites.net/Transaction?MerchantStoreId=1
More than one field can be specified by specifying an ampersand (&) between the fields e.g.
https://optomany-axeptconnectcloudmerchant-ppe.azurewebsites.net/Transaction?MerchantStoreId=1&ClientStoreId=5
Pagination
These requests support pagination to minimise the amount of data returned in one go. In this situation, the pagination information is returned as part the response header in the X-Pagination header in JSON format.
FIELD | JSON NAME | DATA TYPE | DESCRIPTION |
---|---|---|---|
Total Count | totalCount | Integer | The total number of pages |
Page Size | pageSize | Integer | The number of items per page |
Current Page | currentPage | Integer | The current page number |
Total Pages | totalPages | Integer | The total number of pages |
Example:
{"totalCount":3,"pageSize":10,"currentPage":1,"totalPages":1}
This provides details of the total number of records, the defined page size, what the current page is and the total number of pages. The page number and page size can be specified in the query string allowing you to move through the records as appropriate.
If the page size exceeds the axept Connect Cloud service’s configured page size, the requested page size will be limited to the configured page size.
https://optomany-axeptconnectcloudmerchant-ppe.azurewebsites.net/Transaction?Size=10
https://optomany-axeptconnectcloudmerchant-ppe.azurewebsites.net/Transaction?Page=1
https://optomany-axeptconnectcloudmerchant-ppe.azurewebsites.net/Transaction?Size=10&Page=1
Response Fields
GET /transaction Response | ||||||||
---|---|---|---|---|---|---|---|---|
Field Name | Data Type | Description | ||||||
uti | GUID | Unique client initiate GUID to represent the transaction. | ||||||
reference | String | Client reference assigned to the transaction and echoed back in subsequent operations. | ||||||
status | String | The status of the transaction. This will be either:
| ||||||
transType | String | Indicates how the transaction should be processed. | ||||||
amountTrans | Integer | Amount of the transaction in minor units not including cashback/tips etc. | ||||||
amountGratuity | Integer | Amount of the gratuity in minor units. | ||||||
amountCashback | Integer | Amount of the Cashback in minor units. | ||||||
expirationDate | DateTime | UTC Date/Time the transaction will expire in ISO 8601-1:2019 format | ||||||
createdDateTime | DateTime | UTC Date/Time the transaction was initiated by the merchant in ISO 8601-1:2019 format |
Example Responses
Multiple transactions are returned as a JSON Array of Objects.
[
{
"uti": "604f2540-5af9-4f60-a889-449bd5dd17d5",
"reference": "SBTest2",
"status": "Open",
"transType": "SALE",
"amountTrans": 150,
"amountGratuity": 0,
"amountCashback": 0,
"expirationDate": "2023-04-11T13:16:19.162Z",
"createdDateTime": "2023-04-10T13:16:19.2866549Z"
},
{
"uti": "1d027a88-5821-4442-bb4a-14123fc3fac9",
"reference": "SBTest2",
"status": "Complete",
"transType": "SALE",
"amountTrans": 150,
"amountGratuity": 0,
"amountCashback": 0,
"expirationDate": "2023-04-11T15:30:14.824Z",
"createdDateTime": "2023-04-10T15:30:15.0462675Z"
},
{
"uti": "e9665b4b-150e-45b6-96a1-1b2c0c28c067",
"reference": "Test3",
"status": "Complete",
"transType": "SALE",
"amountTrans": 150,
"amountGratuity": 0,
"amountCashback": 0,
"expirationDate": "2023-04-12T08:10:27.73Z",
"createdDateTime": "2023-04-11T08:10:25.5168273Z"
},
{
"uti": "8975de1d-ddc2-4b57-b934-bfee43b85777",
"reference": "Test3",
"status": "Complete",
"transType": "SALE",
"amountTrans": 155,
"amountGratuity": 0,
"amountCashback": 0,
"expirationDate": "2023-04-12T08:16:17.948Z",
"createdDateTime": "2023-04-11T08:16:15.4406236Z"
},
{
"uti": "66cb0575-5684-40d5-819a-f22173ea1c1f",
"reference": "A4567FGTR230328",
"status": "Open",
"transType": "SALE",
"amountTrans": 1300,
"amountGratuity": 0,
"amountCashback": 0,
"expirationDate": "2023-04-12T09:06:01.601Z",
"createdDateTime": "2023-04-11T09:05:59.1547689Z"
}
]
DELETE
/transaction
Should you need to, you can Delete any transaction that is at the Open
or Complete
status by using the DELETE HTTP Method. You need to include the uti
for the specific transaction for each request.
DELETE
/transaction Example
https://optomany-axeptconnectcloudmerchant-ppe.azurewebsites.net/Transaction/66cb0575-5684-40d5-819a-f22173ea1c1f
Transactions which are InProgress
are locked and cannot be deleted.