Transactions Function

The Partners Reporting API allows for the querying of all 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
Content-TypeMandatoryStringBearer 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
statusOptionalStringThe Transaction status.

See Status codes for all statuses. Specifying a specific status will only return transactions meeting this criterion.

This field supports multiple statuses to be passed, separated by a comma.
processorOptionalStringAllows filtering of transactions by the platform responsible for processing the transaction.
dnaTransactions processed via the DNA Payments Acquirer
optomanyTransactions processed via other supported UK Acquirers via our Ecommerce Solutions
searchByOptionalStringAllows filtering of transactions by the platform responsible for processing the transaction.
created-dateSearch using the created date field
processed-dateSearch using the processed date field
If this is not supplied, then createdDate is used.

GET Request Examples

The Request is for all 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/transactions?from=2021-01-24T15:29:56Z&to2021-01-25T15:29:56Z&page=1&size=10&merchantId=2864dd92-343a-4ce7-b1f9-9742e3c7f07d&status=refunded

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
totalCountIntegerTotal count of records for the requested time period.
data.idStringUnique transaction Id.
data.merchantIdStringUnique ID for the merchant, allocated by DNA Payments.
data.merchantNameStringName of the merchant.
data.merchantReferenceStringUnique order number allocated by the merchant.
data.amountDecimalOriginal requested transaction amount.
data.currencyStringTransaction currency code.
ISO 4271 Format [e.g. “GBP”]
data.createdDateStringDate/time when the transaction was created on the DNA Platform.
data.authDateStringDate/time when the transaction authorisation was attempted with the acquirer.
data.confirmDateStringDate/time when the transaction confirmed on the DNA Platform.
data.processedDateStringDate/time when transaction was processed.

This date/time will often reflect the last transaction action that was performed. For example, the date/time when the transaction was charged, settled or refunded.
data.processedAmountStringCharged/Settled/Refunded amount.
data.typeStringTransaction type. See Status codes for all a full list of types.
data.statusStringStatus of the transaction. See Status codes for a full list of statuses.
data.paymentMethodStringPayment method used on the transaction. See Status codes for a full list of payment methods.
data.cardTypeStringType 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.issuerStringIssuer of the payment card used in the transaction.
data.issuerCountryStringCountry in which the payment card was issued.
Format: ISO 3166-1 alpha-3
data.responseCodeStringThe response code which was returned by the acquirer during the authorisation process.
data.authCodeStringWhen applicable, the authorisation code issued by the acquirer/issuer for the transaction.
data.avsResultStringResult of the Address Verification System (AVS) check.
data.avsHouseNumberResultStringResult of the Address Verification System (AVS) “House Number” check.
data.avsPostcodeResultStringResult of the Address Verification System (AVS) “Post Code” check.
data.cscResultStringResult of the Cardholder Security Code (CSC) check.
payerAuthenticationResultStringResult of the Payer Authentication (PA) enrollment and authentication checks.
Format: (Enrollment/Authentication) – e.g. Y/A
data.payerIpStringIP address of the consumer.
Waiting GDPR confirmation, may be removed.
data.payerNameStringConsumer name.
Waiting GDPR confirmation, may be removed.
data.payerEmailStringEmail address of the consumer.
Waiting GDPR confirmation, may be removed.
data.payerPhoneStringPhone number of the consumer.
Waiting GDPR confirmation, may be removed.
data.ipCountryStringCountry where the purchase was made.
Waiting GDPR confirmation, may be removed.
data.ipCityStringCity where the purchase was made.
Waiting GDPR confirmation, may be removed.
data.ipLatitudeDecimalLocational data – Latitude.
Waiting GDPR confirmation, may be removed.
data.ipLongitudeDecimalLocational data – Longitude.
Waiting GDPR confirmation, may be removed.
data.merchantCustomDataString
Base 64
Encoded
Custom data provided by the merchant when requesting the transaction.

Maximum size 1024 bytes.

No actions are performed using this data, it is purely recorded against the transaction on the DNA Platform.
data.descriptionStringDescriptive text passed in the Payment Request for the transaction.
data.parentTransactionIdStringIf the transaction is a full/partial refund this field will contain the transactionId of the original/linked sale.

GET Example Response

{
"totalCount": 92,
"data":
[
{
"amount": 0.5,
"authCode": "1602300039",
"authDate": "2021-01-28T10:09:45.485728Z",
"avsHouseNumberResult": "",
"avsPostcodeResult": "",
"avsResult": "",
"cardMask": "535522...7288",
"cardScheme": "mastercard",
"confirmDate": "2021-01-28T10:09:45.485728Z",
"createdDate": "2021-01-28T10:09:16.863868Z",
"cscResult": "",
"currency": "GBP",
"id": "1c0d2a11-911e-4d3a-b9f2-1977d874d7b1",
"ipCity": "",
"ipCountry": "United Kingdom",
"ipLatitude": 50.4921,
"ipLongitude": -0.1321,
"issuer": "Monzo Bank Limited",
"issuerCountry": "GBR",
"merchantCustomData": "YmluYXJ5IGRhdGE=",
"merchantId": "0724dd92-343a-6ce7-b1f9-9742e3c6f08k",
"merchantName": "Test Merchant",
"merchantReference": "1611822317082",
"payerAuthenticationResult": "Y/Y",
"payerEmail": "demo@dnapayments.com",
"payerIp": "84.234.236.108",
"payerName": "John Doe",
"payerPhone": "",
"paymentMethod": "card",
"processedAmount": 0.5,
"processedDate": "2021-01-28T10:09:45.485727Z",
"responseCode": "00",
"status": "charged",
"description": "Test Transaction",
"type": "retail",
"parentTransactionId": null
}
]
}