GET Transactions
The Partners Reporting API allows for the querying of Ecommerce 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 | The Transaction status. See Transaction Statuses 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. | ||||
processor | Optional | String | Allows filtering of transactions by the platform responsible for processing the transaction.
| ||||
searchBy | Optional | String | Allows filtering of transactions by the platform responsible for processing the transaction.
|
GET
Request Examples
- Example 1
- Example 2
- Example 3
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
The Request is for all 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/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 transactions in the specific 24-hour period, for all merchants where the status is “refunded” or “rejected”. Page 1 containing 100 records has been requested.
https://test-api.dnapayments.com/v1/partners/transactions?from=2021-01-24T15:29:56Z&to2021-01-25T15:29:56Z&page=1&size=100status=refunded,rejected
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 |
totalCount | Integer | Total count of records for the requested time period. |
data.id | String | Unique transaction Id. |
data.merchantId | String | Unique ID for the merchant, allocated by DNA Payments. |
data.merchantName | String | Name of the merchant. |
data.merchantReference | String | Unique order number allocated by the merchant. |
data.amount | Decimal | Original requested transaction amount. |
data.currency | String | Transaction currency code. ISO 4271 Format [e.g. “GBP”] |
data.createdDate | String | Date/time when the transaction was created on the DNA Platform. |
data.authDate | String | Date/time when the transaction authorisation was attempted with the acquirer. |
data.confirmDate | String | Date/time when the transaction confirmed on the DNA Platform. |
data.processedDate | String | Date/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.processedAmount | String | Charged/Settled/Refunded amount. |
data.type | String | Transaction type. See Transaction Types for all a full list of types. |
data.status | String | Status of the transaction. See Transaction Statuses for a full list of statuses. |
data.paymentMethod | String | Payment method used on the transaction. See Payment Methods for a full list of payment methods. |
data.cardType | 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.issuer | String | Issuer of the payment card used in the transaction. |
data.issuerCountry | String | Country in which the payment card was issued. Format: ISO 3166-1 alpha-3 |
data.responseCode | String | The response code which was returned by the acquirer during the authorisation process. |
data.authCode | String | When applicable, the authorisation code issued by the acquirer/issuer for the transaction. |
data.avsResult | String | Result of the Address Verification System (AVS) check. |
data.avsHouseNumberResult | String | Result of the Address Verification System (AVS) “House Number” check. |
data.avsPostcodeResult | String | Result of the Address Verification System (AVS) “Post Code” check. |
data.cscResult | String | Result of the Cardholder Security Code (CSC) check. |
payerAuthenticationResult | String | Result of the Payer Authentication (PA) enrollment and authentication checks. Format: (Enrollment/Authentication) – e.g. Y/A |
data.payerIp | String | IP address of the consumer. Waiting GDPR confirmation, may be removed. |
data.payerName | String | Consumer name. Waiting GDPR confirmation, may be removed. |
data.payerEmail | String | Email address of the consumer. Waiting GDPR confirmation, may be removed. |
data.payerPhone | String | Phone number of the consumer. Waiting GDPR confirmation, may be removed. |
data.ipCountry | String | Country where the purchase was made. Waiting GDPR confirmation, may be removed. |
data.ipCity | String | City where the purchase was made. Waiting GDPR confirmation, may be removed. |
data.ipLatitude | Decimal | Locational data – Latitude. Waiting GDPR confirmation, may be removed. |
data.ipLongitude | Decimal | Locational data – Longitude. Waiting GDPR confirmation, may be removed. |
data.merchantCustomData | String 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.description | String | Descriptive text passed in the Payment Request for the transaction. |
data.parentTransactionId | String | If 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
}
]
}