Get Track Data
Overview
The getTrack command retrieves card data from non-financial cards, like a loyalty or gift card. You, as the merchant, will need to whitelist the gift card bin ranges in order to extract card data.
If track1, track2, or track3 is requested, and there are no corresponding data present in the card, the response will not contain a corresponding track field (response status 5902/Completed).
If modifier: CNP is sent in the request, only track2 data will be returned in the response regardless of track selector.
- track1 is not returned if CNP modifier is used.
- track3 is not returned if CNP modifier is used
Note
This command can only be used for swiped or manually entered cards.
Manual entry is allowed only if the modifier “CNP” is sent in the request.
Request Structure
| Element | Type | Description | Size | Required |
|---|---|---|---|---|
| apiVersion | String | API version number | V20 | Required |
| istConfigCode | String | Moneris provided integration configuration code | V25 | Required |
| dataId | String | Merchant defined unique identifier for the data object | V50 | Required |
| dataTimestamp | String | Date and time of the request (YYYY-MM-DD HH:MM:SS) | F19 | Required |
| data | Object | Object that contains all transaction requests | - | - |
| request | Array | Contains data applicable to transaction request | - | - |
| idempotencyKey | String | Unique transaction identifier to avoid duplicate request | V50 | Required |
| linkId | String | Id used to group related transactions | V50 | Optional |
| terminalId | String | Destination Terminal ID | F8 | Optional |
| userName | String | Unique identifier for clerk / user | V30 | Optional |
| customIdData | String | Custom field | V50 | Optional |
| action | String | "getTrack" | V50 | Required |
| trackSelector | String | Indicates which track data is to be returned from the card: Valid values are: - ‘1’ = Retrieve Track1 data - ‘2’ = Retrieve Track2 data - ‘3’ = Retrieve Track3 data - ‘0’ = Retrieves Track1, Track2 and Track3 data | V50 | Required |
| modifier | String | "CNP" Note: PINPad will prompt user to enter account number | V24 | Optional |
| progressStatus | String | If value is set to "True", terminal will return progress to POS Note: This feature is only available on Direct Integration | V5 | Optional |
{
"apiVersion":"3.0",
"istConfigCode":"example_istConfigCode",
"dataId":"example_dataId",
"dataTimestamp":"1969-12-31 23:59:59",
"data":{
"request":[
{
"idempotencyKey":"example_idempotencyKey",
"action":"getTrack",
"trackSelector":"example_trackSelector"
}
]
}
}Response Structure
| Element | Type | Description | Size | Required |
|---|---|---|---|---|
| apiVersion | String | API version number | V20 | Required |
| statusCode | String | Status code for the overall transaction request | V4 | Required |
| status | String | Description of the statusCode | V4 | Required |
| dataId | String | Merchant defined unique identifier for the data object | V50 | Required |
| dataTimestamp | String | Date and time of the request (YYYY-MM-DD HH:MM:SS) | F19 | Required |
| data | Object | Object that contains all transaction requests | - | - |
| response | Array | Contains data applicable to transaction request | - | - |
| idempotencyKey | String | Unique transaction identifier to avoid duplicate request | V50 | Required |
| action | String | "activate" | V50 | Required |
| statusCode | String | Status code for individual request | V4 | Required |
| status | String | Description of the individual statusCode | V50 | Required |
| completed | String | "true" or "false" | V5 | Required |
| track1 | String | Track 1 details described in ISO 7813 | V520 | Conditional |
| track2 | String | Track 2 details described in ISO 7813 | V520 | Conditional |
| track3 | String | Track 2 data | V520 | Conditional |
| terminalId | String | Destination Terminal ID | F8 | Required |
{
"apiVersion":"3.0",
"statusCode":"example_statusCode",
"status":"example_status",
"dataId":"example_dataId",
"dataTimestamp":"1969-12-31 23:59:59",
"data":{
"response":[
{
"orderId":"example_orderId",
"transactionId":"example_transactionId",
"idempotencyKey":"example_idempotencyKey",
"statusCode":"example_statusCode",
"status":"example_status",
"completed":"true",
"action":"getTrack",
"track1":"example_track1",
"track2":"example_track2",
"track3":"example_track3",
"terminalId":"example_terminalId"
}
]
}
}Errors
If your response contains errors, visit the Errors page for a detailed description of each one.

