Skip to main content

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 NameStateData TypeDescription
Content-TypeMandatoryStringapplication/json
AuthorizationMandatoryStringBearer access_token
GET Transactions Request
Field NameStateData TypeDescription
fromMandatoryStringStart 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]
toMandatoryStringEnd 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]
pageOptionalStringPage number required.

Default=1
sizeOptionalStringNumber of records to return.

Default=50, Maximum=5000
merchantIdOptionalStringUnique 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
statusOptionalStringAllows filtering of results by the transaction status.
successOnly view of successful transactions.
failedOnly view failed transactions.

GET Request Examples

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

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 NameData TypeDescription
totalAmountDecimalTotal amount for the requested time period.
totalCountIntegerTotal count of records for the requested time period.
data.merchantIdStringUnique ID for the merchant, allocated by DNA Payments.
data.merchantNameStringName of the merchant.
data.transactionDateStringDate/time when the transaction was created on the DNA Platform.
data.amountDecimalTransaction amount.
data.currencyStringTransaction currency code.
ISO 4271 Format [e.g. “GBP”]
data.statusString
successSuccessful transaction.
failedFailed transaction.
data.returnCodeStringThe response code which was returned by the Acquirer during the authorisation process.
data.returnCodeDescriptionStringDescription of the Response Code returned by the Acquirer.
data.transactionIdStringUnique ID allocated to the transaction.
data.terminalIdStringUnique Terminal ID for the merchant, allocated by DNA Payments.
data.operationStringConfirmation of the operation performed.

See operation for all operations.
data.transactionTypeStringType of transaction completed.

See transactionType for all transaction types.
data.transactionCountryStringCountry where the transaction was processed.
data.transactionCityStringCity where the transaction was processed.
data.cardSchemeStringType of card used in the transaction.
data.cardMaskStringMasked PAN for the payment card used in the transaction, contains the first six and last four digits.
data.cardTypeNullable StringType of card used in the transaction.
data.isEuropeanCardNullable BooleanConfirmation of whether the card used in the transaction was issued in Europe (including the UK).
trueCard was issued in Europe.
falseCard was issued outside of Europe.
data.isCorporateCardNullable BooleanConfirmation of whether the card used in the transaction is a Corporate card.
trueCard is a corporate card.
falseCard is a personal card.
data.captureMethodStringCapture 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 CodeDescriptionNotes
400Bad RequestRequest format is invalid.
401UnauthorizedInvalid authentication credentials have been supplied.
403ForbiddenAuthorisation has failed due to insufficient permissions.
404Not FoundThe requested resource does not exist.
422Unprocessable EntityAPI cannot complete the requested action.
500Internal Server ErrorInternal error has occurred, please try again later.
503Service UnavailableAPI is temporarily offline for maintenance, please try again later.
For some failed requests, the API can return JSON response bodies that include information about an error. For example:
{ "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.