GET Transactions
The Partners Reporting API allows for the querying of all POS transactions processed by your merchants.
GET
Transactions - Request
The Transaction request is completed via a GET
request to the test URL shown above, and should contain the below header data. The access_token
will be the one received in the Authentication Response. The URL contains several filters which can be applied to narrow the results returned.
HTTP Header | |||
---|---|---|---|
Field Name | State | Data Type | Description |
Content-Type | Mandatory | String | application/json |
Authorization | Mandatory | String | Bearer access_token |
GET Transactions Request | |||||||
---|---|---|---|---|---|---|---|
Field Name | State | Data Type | Description | ||||
from | Mandatory | String | Start date for transactions. Transactions are available for 365 days and a maximum of 30 days can be specified. ISO 8601 Format [e.g. 2021-01-25T15:29:56Z] | ||||
to | Mandatory | String | End date for transactions. Transactions are available for 365 days and a maximum of 30 days can be specified. ISO 8601 Format [e.g. 2021-01-25T15:29:56Z] | ||||
page | Optional | String | Page number required. Default=1 | ||||
size | Optional | String | Number of records to return. Default=50, Maximum=5000 | ||||
merchantId | Optional | String | Unique id for the merchant, allocated by DNA Payments and returned in GET Merchants. This field allows for a maximum of 10 ids to be submitted, each separated by a comma. Specifying the id will only return transactions for this merchant | ||||
status | Optional | String | Allows filtering of results by the transaction status.
|
GET
Request Examples
- Example 1
- Example 2
- Example 3
The Request is for all POS transactions in the specific 24-hour period, for one merchant where the transaction status is “refunded”. The request is also asking for the first page of results comprising of 10 records.
https://test-api.dnapayments.com/v1/partners/pos/transactions?from=2021-01-24T15:29:56Z&to2021-01-25T15:29:56Z&page=1&size=10&merchantId=2864dd92-343a-4ce7-b1f9-9742e3c7f07d&status=failed
The Request is for all POS transactions in the specific 24-hour period, for two merchants regardless of the status. No pagination was requested.
https://test-api.dnapayments.com/v1/partners/pos/transactions?from=2021-01-24T15:29:56Z&to2021-01-25T15:29:56Z&merchantId=2864dd92-343a-4ce7-b1f9-9742e3c7f07d,9a8a7d6e-5011-4976-b6fa-37dd96de56c0
The Request is for all POS transactions in the specific 24-hour period, for all merchants where the status is “failed”. Page 1 containing 100 records has been requested.
https://test-api.dnapayments.com/v1/partners/pos/transactions?from=2021-01-24T15:29:56Z&to2021-01-25T15:29:56Z&page=1&size=100status=failed
GET
Transactions - Response
If the request is successful, the method will return a 200
response code, and the body will contain the following fields:
GET Transactions Response | ||||||
---|---|---|---|---|---|---|
Field Name | Data Type | Description | ||||
totalAmount | Decimal | Total amount for the requested time period. | ||||
totalCount | Integer | Total count of records for the requested time period. | ||||
data.merchantId | String | Unique ID for the merchant, allocated by DNA Payments. | ||||
data.merchantName | String | Name of the merchant. | ||||
data.transactionDate | String | Date/time when the transaction was created on the DNA Platform. | ||||
data.amount | Decimal | Transaction amount. | ||||
data.currency | String | Transaction currency code. ISO 4271 Format [e.g. “GBP”] | ||||
data.status | String |
| ||||
data.returnCode | String | The response code which was returned by the Acquirer during the authorisation process. | ||||
data.returnCodeDescription | String | Description of the Response Code returned by the Acquirer. | ||||
data.transactionId | String | Unique ID allocated to the transaction. | ||||
data.terminalId | String | Unique Terminal ID for the merchant, allocated by DNA Payments. | ||||
data.operation | String | Confirmation of the operation performed. See operation for all operations. | ||||
data.transactionType | String | Type of transaction completed. See transactionType for all transaction types. | ||||
data.transactionCountry | String | Country where the transaction was processed. | ||||
data.transactionCity | String | City where the transaction was processed. | ||||
data.cardScheme | String | Type of card used in the transaction. | ||||
data.cardMask | String | Masked PAN for the payment card used in the transaction, contains the first six and last four digits. | ||||
data.cardType | Nullable String | Type of card used in the transaction. | ||||
data.isEuropeanCard | Nullable Boolean | Confirmation of whether the card used in the transaction was issued in Europe (including the UK).
| ||||
data.isCorporateCard | Nullable Boolean | Confirmation of whether the card used in the transaction is a Corporate card.
| ||||
data.captureMethod | String | Capture method for the transaction. See captureMethod for all capture methods. |
GET
Example Response
{
"totalAmount": 39.87,
"totalCount": 2,
"data": [
{
"merchantId": "fd9991e8-802a-46f7-9d23-7981a852de17",
"merchantName": "TEST LIMITED",
"transactionDate": "2021-03-13T23:10:21Z",
"amount": 29,
"currency": "GBP",
"status": "success",
"returnCode": "0",
"returnCodeDescription": "Successfully completed",
"transactionId": "M139811RG4CN",
"terminalId": "03100423",
"operation": "advice",
"transactionType": "retail",
"transactionCountry": "GBR",
"transactionCity": "Maidstone",
"cardScheme": "mastercard",
"cardMask": "522499...9909",
"cardType": "credit",
"isEuropeanCard": true,
"isCorporateCard": false,
"captureMethod": "pos-contactless"
},
{
"merchantId": "fd9991e8-802a-46f7-9d23-7981a852de17",
"merchantName": "TEST LIMITED",
"transactionDate": "2021-03-13T22:39:12Z",
"amount": 10.87,
"currency": "GBP",
"status": "success",
"returnCode": "0",
"returnCodeDescription": "Successfully completed",
"transactionId": "M138811RG1PK",
"terminalId": "03000024",
"operation": "advice",
"transactionType": "retail",
"transactionCountry": "GBR",
"transactionCity": "Maidstone",
"cardScheme": "visa",
"cardMask": "420000...0000",
"cardType": "credit",
"isEuropeanCard": true,
"isCorporateCard": false,
"captureMethod": "pos-contactless"
}
]
}
Errors
HTTP Status Code | Description | Notes |
---|---|---|
400 | Bad Request | Request format is invalid. |
401 | Unauthorized | Invalid authentication credentials have been supplied. |
403 | Forbidden | Authorisation has failed due to insufficient permissions. |
404 | Not Found | The requested resource does not exist. |
422 | Unprocessable Entity | API cannot complete the requested action. |
500 | Internal Server Error | Internal error has occurred, please try again later. |
503 | Service Unavailable | API is temporarily offline for maintenance, please try again later. |
{ "code": 86, "message": "Unauthorized" }
If any of these errors are seen on a regular basis or they cannot be overcome, please contact us for assistance.