Transaction Request
Overview and Usage
If you are using the Simplified Flow then this is your first step. You may however have already completed Card Acquisition and want to either start a transaction, or cancel the Card Acquisition.
This section will show you how to initiate a transaction using the /transaction
URI, how to poll for the status of the transaction, and then if required, how to cancel the transaction and return axept® PRO to an idle state.
POST
/transaction
https://(TerminalIP):8080/POSitiveWebLink/1.1.0/rest/transaction
An HTTPS POST
request should be sent to the above URL with the following parameters:
POST /transaction - Query String Parameters | |||
---|---|---|---|
Field Name | State | Data Type | Description |
tid | Mandatory | String | This is the Serial Number of the terminal that should process the transaction. This is printed on a label on the rear of the device. |
disablePrinting | Optional | String | This will prevent the terminal from printing the EFT receipts. This will be useful to POS systems that wish to generate their own receipts. When the device that axept® PRO is running on does not have an integrated printer, such as the PAX IM30, axept® PRO will display the merchant and cardholder receipts on screen. It is also possible to configure the device to email the receipts to the merchant and the cardholder. Further information is available in the Receipts section |
POST /transaction - Header Parameters | |||
Authorization | Mandatory | String | This field should be populated with a value of Bearer 6945595921271780 |
POST /transaction - Body Parameters | |||
transactionRequest | Mandatory | Object | Provides the required information to initiate a transaction session with axept® PRO. |
POST
/transactionRequest Parameters
POST /transaction - /transactionRequest Parameters | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
transType | Mandatory | Enum | Indicates how the transaction should be processed. The following values are allowed:
| ||||||||||
amountTrans | Conditional | Integer | Amount of the transaction in minor units not including cashback/tips etc. For example, £10.00 would be represented as 1000. This is a mandatory field for SALE, REFUND, AUTHORISATION_ONLY and SETTLEMENT_ONLY transactions. This field should be omitted for reversals. | ||||||||||
The next THREE options assume the EPOS or integrated solution is in control of confirming the value of additional amounts such as Gratuity, Cashback or Pennies before the transaction is passed to axept® PRO. | |||||||||||||
amountGratuity | Conditional | Integer | Amount of the gratuity in minor units. For example, £5.00 would be represented as 500. This is an optional field for SALE, AUTHORISATION_ONLY and SETTLEMENT_ONLY transactions. | ||||||||||
amountCashback | Conditional | Integer | Amount of the Cashback in minor units. For example, £15.00 would be represented as 1500. This is an optional field for SALE, AUTHORISATION_ONLY and SETTLEMENT_ONLY transactions. | ||||||||||
amountPennies | Conditional | Integer | Amount of the transaction in minor units not including cashback/tips etc. For example, £10.00 would be represented as 1000. This is a mandatory field for SALE, REFUND, AUTHORISATION_ONLY and SETTLEMENT_ONLY transactions. | ||||||||||
As an alternative approach, you can pass the following TWO Boolean fields as true if you want axept® PRO to prompt for these amounts instead. | |||||||||||||
enableTipPrompt | Conditional | Boolean | Set as true if you want axept® PRO to prompt for a Tip or Gratuity prior to capturing the card. This is an optional field for SALE, AUTHORISATION_ONLY and SETTLEMENT_ONLY transactions. | ||||||||||
enablePenniesPrompt | Conditional | Boolean | Set as true if you want axept® PRO to prompt for a Charitable Donation, prior to capturing the card. This is an optional field for SALE, AUTHORISATION_ONLY and SETTLEMENT_ONLY transactions. | ||||||||||
The following TWO fields are used to modify the default behaviour of axept® PRO when attempting a SETTLEMENT_ONLY where the Settlement Value is greater than the original Authorisation. | |||||||||||||
releasePreAuthFunds | Conditional | Boolean | When set to true, directs axept® PRO to Reverse the entire payment, if the Incremental Authorisation is unsuccessful. This is an optional field for SETTLEMENT_ONLY transactions. This field should be omitted for all other transaction types. | ||||||||||
incrementalFailover | Conditional | Boolean | When a SETTLEMENT_ONLY amount exceeds the original AUTH_ONLY amount, the Incremental additional amount is requested for the difference. This is an optional field for SETTLEMENT_ONLY transactions. This field should be omitted for all other transaction types. | ||||||||||
reference | Mandatory | String | Reference assigned to the transaction by the merchant’s system. You must not pass in any personally identfiable information in this field. See the Warning below for more information. This field is restricted to a maximum of 50 characters and only supports A to Z, a to z, 0 to 9 and _ (an underscore). We recommend a combination of several fields, concatenated to ensure that the result is unique e.g. . | ||||||||||
uti | Conditional | String | This field is Mandatory if transType is REVERSAL or SETTLEMENT_ONLY. Additionally it must be provided if the transType is AUTHORISATION_ONLY in instances where the transaction was initiated using the /cardAcquisition resource. uti can also optionally be passed in as part of a POST for a /transactionRequest however it must be formatted as a GUID/UUID and in UPPERCASE - XXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX. |
uti
UsageIn environments where connectivity might be intermittent, we recommend generating and passing in your own uti
. This allows you to send GET
/transaction requests without being reliant on receiving a response to your POST
/transaction request.
In the reference
field above, you are free to pass a wide variety of data. You must however be careful to not include any Personally Identifiable Information. This can include vehicle registration details, cardholder name, and many other data. Please refer to European General Data Protection Regulations (Article 4) for detailed guidance on what should not be included here.
POST
Example Request
POST https://192.168.10.44:8080/POSitiveWebLink/1.1.0/rest/transaction?tid=1640005298&disablePrinting=true
HTTP/1.1
Content-Type: application/json
disablePrinting: true
Authorization: Bearer 6945595921271780
User-Agent: PostmanRuntime/7.26.8
Accept: */*
Host: 192.168.0.75:8080
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Content-Length: 127
{
"transType": "SALE",
"amountTrans": 100,
"reference": "TEST_CARD"
}
POST
Response Fields
axept® PRO will return one of five response codes:
HTTP Response Code | Description |
---|---|
200 | Reversal initiated. This indicates that axept® PRO is reversing a previously authorised transaction. It is only seen if the POST has transType of SETTLEMENT_ONLY and amountTrans = 0. |
201 | Transaction created. |
206 | Transaction in progress – a new transaction cannot be started until the current one completes. |
400 | Bad input parameter. Details would be returned in a text description |
403 | Not Authorised |
408 | Request timeout. |
POST
Example Responses
- 200
- 201
- 206
HTTP/1.1 200 Reversal initiated
Content-Type: application/json
Date: Mon, 28 Jun 2021 13:14:33 GMT
Allow: POST, GET, OPTIONS, DELETE
Access-Control-Max-Age: 86400
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE
Access-Control-Allow-Headers: *
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Encoding: gzip
Transfer-Encoding: chunked
{
"amountCashback": 0,
"amountGratuity": 0,
"amountTrans": 0,
"transType": "SETTLEMENT_ONLY",
"uti": "48B29805-BCB1-43B1-AC6E-766B161C61A2"
}
HTTP/1.1 201 Transaction Created
Content-Type: application/json
Date: Wed, 20 Jan 2021 12:18:31 GMT
Allow: POST, GET, OPTIONS, DELETE
Access-Control-Max-Age: 86400
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE
Access-Control-Allow-Headers: *
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Encoding: gzip
Transfer-Encoding: chunked
{
"amountTrans": 100,
"transType": "SALE",
"uti": "3986B1FC-AA6F-458F-9187-B66858481F99"
}
HTTP/1.1 206 Transaction in progress
Content-Type: application/json
Date: Mon, 28 Jun 2021 13:10:04 GMT
Allow: POST, GET, OPTIONS, DELETE
Access-Control-Max-Age: 86400
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE
Access-Control-Allow-Headers: *
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Encoding: gzip
Transfer-Encoding: chunked
If the HTTP response code is 201
or 200
, the body of the response will include the Unique Transaction Identifier (UTI) assigned by axept® PRO.
You can now use GET /transaction
to poll the status of axept® PRO while the transaction is processed.
GET
/transaction
https://(TerminalIP):8080/POSitiveWebLink/1.1.0/rest/transaction
An HTTPS GET
request should be sent to the above URL with the following parameters:
GET /transaction - Query String Parameters | |||
---|---|---|---|
Field Name | State | Data Type | Description |
tid | Mandatory | String | This is the serial number of the device that should process the transaction. |
uti | Mandatory | String | This is the Unique Transaction Identifier that axept® PRO provided in the body of a response to a POST on the /transaction resource. |
POST /transaction - Header Parameters | |||
Authorization | Mandatory | String | This field should be populated with a value of Bearer 6945595921271780 |
axept® PRO will cache the days transactions until either a Z report is processed, or a reboot occurs
As such, you are able to query more than the last transaction. You should however query the transaction as soon as possible and not rely on axept® PRO to provide data on historic transactions.
GET
Example Request
GET https://192.168.10.44:8080/POSitiveWebLink/1.1.0/rest/transaction?tid=1640005298&uti=784F7278-7326-4935-B4F2-B46B5E3BBAC5
HTTP/1.1
Content-Type: application/json
Authorization: Bearer 6945595921271780
User-Agent: PostmanRuntime/7.26.8
Accept: */*
Host: 192.168.0.75:8080
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
GET
Response Fields
In response to this, axept® PRO will return one of six response codes:
HTTP Response Code | Description |
---|---|
200 | axept® PRO can find a completed transaction that matches the provided criteria. The body of the response will provide the transaction data. |
206 | Transaction in progress. The body of the response will include the list of status objects to indicate how far the transaction has progressed. |
400 | Bad input parameter. Details would be returned in a text description |
403 | Not Authorised |
404 | Transaction response not found or not available. This indicates that the provided uti value is not found by axept® PRO. |
408 | Request timeout |
You can use the HTTP response code 206
response code to determine that axept® PRO is still busy with the transaction. Once the transaction has finished, axept® PRO will return HTTP response code 200
and the following fields may be returned:
GET
Response 200 Fields
Not all these fields will be provided in every transaction. For example, if the cardType is MSR
(Magnetic Stripe Read) then all fields related to EMV processing will not be provided.
GET /transaction Response Body Parameters | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Field Name | Data Type | Description | ||||||||||||||||||||||||||||||||
transType | Enum | Provides the transaction type that was performed:
| ||||||||||||||||||||||||||||||||
transApproved | Boolean | Indicates if the transaction was approved. | ||||||||||||||||||||||||||||||||
transPartiallyApproved | Boolean | In instances where the EPOS performs an AUTHORISTION_ONLY followed later by a SETTLEMENT_ONLY, there is the possibility for the settlement amount to be greater than the authorised amount. In these instances, axept® PRO will seek a further authorisation with the acquirer as part of processing the SETTLEMENT_ONLY. Should this incremental authorisation fail, axept® PRO will settle for the previously authorised amount (the amountTrans requested in the AUTHORISATION_ONLY). In this particular scenario, axept® PRO will return transPartiallyApproved set to True so that the integrated EPOS knows that this occurred. Additionally, the amountTrans in response to GET /transaction will reflect the amount this is to be settled to the acquirer. | ||||||||||||||||||||||||||||||||
transCancelled | Boolean | Indicates if the transaction was cancelled. | ||||||||||||||||||||||||||||||||
uti | String | Unique Transaction Identifier as generated by axept® PRO. | ||||||||||||||||||||||||||||||||
amountTrans | Integer | Amount of the transaction in minor units not including cashback/tips etc. For example, £10.00 would be represented as 1000. | ||||||||||||||||||||||||||||||||
amountGratuity | Integer | Amount of the gratuity in minor units. For example, £5.00 would be represented as 500. | ||||||||||||||||||||||||||||||||
amountCashback | Integer | Amount of the cashback in minor units. For example, £15.00 would be represented as 1500. | ||||||||||||||||||||||||||||||||
amountDiscount | Integer | Not relevant to axept® PRO processing unattended transactions. | ||||||||||||||||||||||||||||||||
cvmSigRequired | Boolean | Signifies whether the transaction required the cardholder to perform signature verification. | ||||||||||||||||||||||||||||||||
cvmPinVerified | Boolean | Signifies whether the transaction required the cardholder to complete PIN verification. | ||||||||||||||||||||||||||||||||
transCurrencyCode | String | Provides a 3-character currency code for the transaction. The values provided comply with ISO4217 alphabetic code i.e. GBP, EUR etc. | ||||||||||||||||||||||||||||||||
terminalId | String | Reflects the terminal identifier used when processing the transaction. NB: This does differ to tid – the tid reflects the hardware identifier whereas the terminalId reflects a ‘soft’ identifier for the payment channel. | ||||||||||||||||||||||||||||||||
merchantId | String | Reflects the merchant identifier used when processing the transaction. | ||||||||||||||||||||||||||||||||
softwareVersion | String | Provides the software version of axept® PRO. | ||||||||||||||||||||||||||||||||
receiptNumber | Integer | The receipt number for this transaction. | ||||||||||||||||||||||||||||||||
retrievalReferenceNumber | String | The retrieval reference number for this transaction. | ||||||||||||||||||||||||||||||||
paymentId | String | This is an identifier for the transaction from Optomany’s central host (the axept® Platform). | ||||||||||||||||||||||||||||||||
responseCode | String | The 2-digit response code from the acquirer. Common response codes are:
| ||||||||||||||||||||||||||||||||
stan | String | System Trace Audit Number. | ||||||||||||||||||||||||||||||||
authorisationCode | String | The authorisation code returned from the acquirer (e.g. 123ABC). | ||||||||||||||||||||||||||||||||
merchantTokenId | String | The Optomany token for the card used to complete the transaction. | ||||||||||||||||||||||||||||||||
cardPan | String | The masked PAN (Primary Account Number) of the card. The string length reflects the length of the PAN but only the last 4 digits will be provided, the preceding digits are obfuscated with asterisks e.g. ************5454. | ||||||||||||||||||||||||||||||||
cardExpiryDate | String | The expiry date of the card used for the transaction. Format is YYMM e.g. a card expiring in April 2022 will be expressed as 2204. | ||||||||||||||||||||||||||||||||
cardStartDate | String | The start date of the card used (if available). Format is YYMM e.g. a card issued in November 2019 will be expressed as 1911. | ||||||||||||||||||||||||||||||||
cardScheme | String | The name of the scheme used (e.g. Visa\Mastercard). | ||||||||||||||||||||||||||||||||
cardPanSequenceNumber | String | The PAN sequence number if available. | ||||||||||||||||||||||||||||||||
cardType | String | The capture methods of the card. Possible values are:
| ||||||||||||||||||||||||||||||||
emvAid | String | If the card was captured via EMV or Contactless, this field will provide the application identifier of the presented card. | ||||||||||||||||||||||||||||||||
emvTsi | String | If the card was captured via EMV or Contactless, this field will provide the EMV standards Transaction Status Information (e.g. E800) | ||||||||||||||||||||||||||||||||
emvTvr | String | If the card was captured via EMV or Contactless, this field will provide the EMV standards Transaction Verification Results (e.g. 0080000000) | ||||||||||||||||||||||||||||||||
emvCardholderName | String | If the card was captured via EMV or Contactless, this field will provide the cardholder name if it has been obtained during EMV processing. | ||||||||||||||||||||||||||||||||
emvCryptogram | String | As part of EMV processing, a cryptogram will be generated for the transaction. | ||||||||||||||||||||||||||||||||
emvCryptogramType | String | This provides the cryptogram type used during EMV processing for the transaction. | ||||||||||||||||||||||||||||||||
errorCode | String | Reserved for future use | ||||||||||||||||||||||||||||||||
errorText | String | Reserved for future use | ||||||||||||||||||||||||||||||||
merchantReference | String | This echo’s back the reference supplied by the integrated client when the transaction was initiated | ||||||||||||||||||||||||||||||||
merchantLocation | Array of Strings | This provides address line 1 and 2 of the merchant store as set up on Optomany’s systems | ||||||||||||||||||||||||||||||||
merchantName | String | This reflects the merchant store name as set up on Optomany’s systems | ||||||||||||||||||||||||||||||||
transDateTime | String | axept® PRO’s date/time stamp for the transaction. Formatted as YYYY-MM-DD HH:MM:SS | ||||||||||||||||||||||||||||||||
DisplayData | Array of Objects | Provides a list of statuses that axept® PRO progressed through when processing the transaction |
GET
Example Responses
- 200
- 206
HTTP/1.1 200
Content-Type: application/json
Date: Wed, 20 Jan 2021 16:05:33 GMT
Allow: POST, GET, OPTIONS, DELETE
Access-Control-Max-Age: 86400
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE
Access-Control-Allow-Headers: *
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Encoding: gzip
Transfer-Encoding: chunked
{
"amountCashback": 0,
"amountDiscount": 0,
"amountGratuity": 0,
"amountTrans": 100,
"authorisationCode": "123ABC",
"cardExpiryDate": "2512",
"cardPan": "************0102",
"cardPanSequenceNumber": "001",
"cardScheme": "Mastercard",
"cardStartDate": "040101",
"cardType": "EMV",
"cvmPinVerified": true,
"cvmSigRequired": false,
"emvAid": "A0000000041010",
"emvCryptogramType": "TC",
"emvTsi": "E800",
"emvTvr": "0000008000",
"errorCode": "",
"errorText": "",
"merchantId": "52345608311111",
"merchantLocation": [
"10 Fake Street",
"London"
],
"merchantName": "DNA Payments Group",
"merchantReference": "TEST_REF5",
"merchantTokenId": "WwcD4zbBoseyZD4dcSjIzjNSkif2kb0c0GIKuKLY3KcfMQ==",
"paymentId": "34970/18/09022021155300152",
"receiptNumber": 41,
"responseCode": "00",
"retrievalReferenceNumber": "000041970001",
"softwareVersion": "2.00.00.5038",
"stan": "18",
"terminalId": "1640005297",
"transApproved": true,
"transCancelled": false,
"transCurrencyCode": "GBP",
"transDateTime": "2021-02-09 15:52:41",
"transType": "SALE",
"emvCryptogram": "A4E0C33B3922B996",
"uti": "BE00D527-406B-4A19-BD60-DCE8B15330DB",
"DisplayData": [
{
"value": 1,
"description": "Transaction started"
},
{
"value": 13,
"description": "GetCard Screen Displayed"
},
{
"value": 6,
"description": "Card type EMV"
},
{
"value": 15,
"description": "Pin Requested(Offline)"
},
{
"value": 17,
"description": "Host Approved"
},
{
"value": 2,
"description": "Transaction Approved"
},
{
"value": 12,
"description": "Transaction Finished"
}
]
}
HTTP/1.1 206 Transaction in progress
Content-Type: application/json
Date: Mon, 28 Jun 2021 13:10:04 GMT
Allow: POST, GET, OPTIONS, DELETE
Access-Control-Max-Age: 86400
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE
Access-Control-Allow-Headers: *
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Encoding: gzip
Transfer-Encoding: chunked
{
"DisplayData": [{
"value": 1,
"description": "Transaction started"
}, {
"value": 14,
"description": "GetCard Screen Displayed"
}, {
"value": 8,
"description": "Card type CTLS"
}
],
"uti": "3986B1FC-AA6F-458F-9187-B66858481F99"
}
Transaction Complete
At this point, the /transaction is considered complete.
DELETE
/transaction
There are three main use cases for using the DELETE
request.
- Aborting a /cardAcquisition request after the card has been Acquired.
- Aborting a /transaction request during the payment process.
- Cancelling a /transaction or /cardAcquisition request which is in flight but the
uti
is not known.
https://(TerminalIP):8080/POSitiveWebLink/1.1.0/rest/transaction
An HTTPS DELETE
request should be sent to the above URL with the following parameters:
DELETE /transaction - Query String Parameters | |||
---|---|---|---|
Field Name | State | Data Type | Description |
tid | Mandatory | String | This is the serial number of the device that should process the transaction. |
DELETE /transaction - Header Parameters | |||
Authorization | Mandatory | String | This field should be populated with a value of Bearer 6945595921271780 |
DELETE
Example Request
DELETE https://192.168.10.44:8080/POSitiveWebLink/1.1.0/rest/transaction?tid=1640005297
HTTP/1.1
Content-Type: application/json
Authorization: Bearer 6945595921271780
User-Agent: PostmanRuntime/7.26.8
Accept: */*
Host: 192.168.0.75:8080
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
The DELETE
request can be sent at any point after axept® PRO responds to the POST
on /transaction
or /cardAcquisition
with response code 206
.
Transactions using the Simple Flow can only be cancelled up to and including the point where axept® PRO is waiting for a card (a “status Value” of 13 and status Description of "GetCard Screen Displayed"). Once the transaction moves beyond that stage, an integrated cancel is not possible. You should continue to poll the GET
for a ResponseCode 200
.
More detail on status Values can be found in the DisplayData section
DELETE
Response
The below HTTP
response status codes may be returned in response to the DELETE
:
HTTP Response Code | Description |
---|---|
200 | Request successfully posted and transactions has been cancelled |
400 | Bad input parameter. Details would be returned in a text description |
403 | Not Authorised |
DELETE
Example Response
- /transaction
- /cardAcquisition
HTTP/1.1 200
Content-Type: text/plain
Date: Tue, 9 Feb 2021 16:37:23 GMT
Allow: POST, GET, OPTIONS, DELETE
Access-Control-Max-Age: 86400
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE
Access-Control-Allow-Headers: *
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Encoding: gzip
Transfer-Encoding: chunked
HTTP/1.1 200
Content-Type: application/json
Date: Wed, 20 Jan 2021 13:36:22 GMT
Allow: POST, GET, OPTIONS, DELETE
Access-Control-Max-Age: 86400
Access-Control-Allow-Methods: POST, GET, OPTIONS, DELETE
Access-Control-Allow-Headers: *
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Encoding: gzip
Transfer-Encoding: chunked
{
"amountCashback": 0,
"amountDiscount": 0,
"amountGratuity": 0,
"amountTrans": 100,
"cardPan": "****************",
"cardPanSequenceNumber": "-01",
"cardScheme": "",
"cardType": "NONE",
"cvmPinVerified": false,
"cvmSigRequired": false,
"errorCode": "",
"errorText": "",
"merchantId": "520334508311111",
"merchantReference": "TEST_CARD",
"receiptNumber": -1,
"softwareVersion": "1.00.27.4987",
"stan": "0",
"terminalId": "1640005297",
"transApproved": false,
"transCancelled": true,
"transCurrencyCode": "GBP",
"transType": "SALE",
"uti": "65B10A83-1E5F-422F-B7ED-27B6CF7AB055",
"DisplayData":"[
{
"value": 1,
"description": "Transaction started"
},
{
"value": 13,
"description": "GetCard Screen Displayed"
},
{
"value": 10,
"description": "Transaction Cancelled"
}
]”
}