Merchants Function
Some of the queries available via the Partners Reporting API allow the requestor to limit the responses to a specific merchant. This is achieved via the supply of the DNA Payments merchantId. The two different GET Merchants requests allows the requestor to locate this value for any merchant.
GET Merchants Version 1 (deprecated)
Request
The Merchant 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.
| HTTP Header | |||
|---|---|---|---|
| Field Name | State | Data Type | Description |
| Content-Type | Mandatory | String | application/json |
| Authorization | Mandatory | String | Bearer access_token |
Response
If the request is successful, the method will return a 200 response code. All your merchants will be returned as an array containing the following fields:
| GET Merchant Response | ||
|---|---|---|
| Field Name | Data Type | Description |
| id | String | Unique ID for the merchant, allocated by DNA Payments. |
| name | Integer | Name of the merchant. |
GET Merchants Version 2
Request
The Merchant 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.
| HTTP Header | |||
|---|---|---|---|
| Field Name | State | Data Type | Description |
| Content-Type | Mandatory | String | application/json |
| Authorization | Mandatory | String | Bearer access_token |
In Version 2, you are able to query with the following parameters:
| Query Parameters | |||||||
|---|---|---|---|---|---|---|---|
| Field Name | State | Data Type | Description | ||||
| processor | Optional | String | Processor of transactions. Supported values are:
| ||||
| page | Optional | Integer | Specifies which set of records to retrieve. Default = 1 | ||||
| size | Optional | Integer | Specifies how many records per page will be returned. Default = 1000. Max = 5000 | ||||
Response
If the request is successful, the method will return a 200 response code. All your merchants will be returned as an array of objects, each containing the following fields:
| GET Merchant Response | ||||||
|---|---|---|---|---|---|---|
| Field Name | Data Type | Description | ||||
| descriptor | String | Merchant Descriptor i.e. What will appear on consumers Bank Statement when using DNA Acquiring. | ||||
| id | String | Unique ID for the merchant, allocated by DNA Payments. | ||||
| name | Integer | Name of the merchant. | ||||
| isActive | Boolean | Confirms whether the merchant is active.
| ||||
| reconcilitationId | Integer | Unique Id allocated by DNA Payments to the merchant account. This reference appears on the merchant bank statement when payment/settlements are made. | ||||
| terminals | Array | List of all Terminal ID's configured for the merchant along with some other details. | ||||
Response - terminals Array
| terminals Array | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|
| Field Name | Data Type | Description | ||||||||
| id | String | Unique Terminal ID for the merchant, allocated by DNA Payments. | ||||||||
| mid | String | MID allocated by DNA Payments. Available only for pos terminal type | ||||||||
| dailySettlement | Boolean | If set to true, you will receive a separate payment on each day. The default is to receive a single payment on Monday for the entire weekend i.e. Friday, Saturday & Sunday combined. | ||||||||
| settlementPeriod | Integer | Number of days after which Settlement is processed for this Merchant. | ||||||||
| storeName | String | Name of the merchant store which was provided during the onboarding process. | ||||||||
| type | String | Type of terminal
| ||||||||
| status | String | Terminal status
| ||||||||
Example Requests and Response
- V1 Request
- V1 Response
- V2 Request
- V2 Response
GET https://test-api.dnapayments.com/v1/partners/merchants
HTTP/1.1
Content-Type: application/json
Authorization: Bearer 6945595921271780
User-Agent: PostmanRuntime/7.26.8
Accept: */*
Host: 192.168.0.75:8080
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
{
"id": "53f2e71f-4399-493f-8acf-14d362425ax1",
"name": "Merchant Number One",
}
GET https://test-api.dnapayments.com/v2/partners/merchants?processor=dna&page=1
HTTP/1.1
Content-Type: application/json
Authorization: Bearer 6945595921271780
User-Agent: PostmanRuntime/7.26.8
Accept: */*
Host: 192.168.0.75:8080
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
{
"data": [
{
"descriptor": "MELCHESTER UNITED",
"id": "711db2d-f055-4d2b-ab5c-728772aa0887",
"isActive": true,
"name": "MELCHESTER UNITED FC",
"terminals": [
{
"id": "7a2e086d-32c3-4917-5bf9-3a7d1a211126",
"dailySettlement": false,
"settlementPeriod": 1,
"storeName": "MELCHESTER UNITED FC",
"type": "ecom",
"status": "open"
}
]
},
{
"descriptor": "TPFC POS",
"id": "79112a4e-558e-4b7e-89cd-67e0e1e4v59b",
"isActive": true,
"name": "TOWN POOLE FC - POS",
"reconciliationId": "443318",
"terminals": [
{
"id": "03001235",
"dailySettlement": true,
"mid": "1602034564",
"settlementPeriod": 1,
"storeName": "TOWN POOLE FC",
"type": "pos",
"status": "open"
}
]
},
{
"descriptor": "ABC - YCCC",
"id": "3d2a6951-6e52-4be1-97db-b8cd7c12c93f",
"isActive": true,
"name": "ABC - Yeovil City Cricket Club - ECOM",
"reconciliationId": "493764",
"terminals": [
{
"id": "ffa7423a-5f18-423b-9c35-35e05d446213",
"dailySettlement": false,
"settlementPeriod": 1,
"storeName": "ABC - YCCC",
"type": "ecom",
"status": "closed"
}
]
}
],
"totalCount": 3
}
GET Merchant StorageYou can store the id and name locally as these values will not change, but it is best practice to re-query this each time you need to make a merchant specific request.