Skip to main content

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 NameStateData TypeDescription
Content-TypeMandatoryStringapplication/json
AuthorizationMandatoryStringBearer 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 NameData TypeDescription
idStringUnique ID for the merchant, allocated by DNA Payments.
nameIntegerName 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 NameStateData TypeDescription
Content-TypeMandatoryStringapplication/json
AuthorizationMandatoryStringBearer access_token

In Version 2, you are able to query with the following parameters:

Query Parameters
Field NameStateData TypeDescription
processorOptionalStringProcessor of transactions. Supported values are:
dnaMerchant is processing via DNA Payments acquiring.
optomanyMerchant is processing via the Optomany platform to another UK acquirer.
pageOptionalIntegerSpecifies which set of records to retrieve.

Default = 1
sizeOptionalIntegerSpecifies 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 NameData TypeDescription
descriptorStringMerchant Descriptor i.e. What will appear on consumers Bank Statement when using DNA Acquiring.
idStringUnique ID for the merchant, allocated by DNA Payments.
nameIntegerName of the merchant.
isActiveBooleanConfirms whether the merchant is active.
trueMerchant is active.
falseMerchant is not active.
reconcilitationIdInteger

Unique Id allocated by DNA Payments to the merchant account. This reference appears on the merchant bank statement when payment/settlements are made.

terminalsArrayList of all Terminal ID's configured for the merchant along with some other details.

Response - terminals Array

terminals Array
Field NameData TypeDescription
idStringUnique Terminal ID for the merchant, allocated by DNA Payments.
midStringMID allocated by DNA Payments. Available only for pos terminal type
dailySettlementBooleanIf 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.
settlementPeriodIntegerNumber of days after which Settlement is processed for this Merchant.
storeNameStringName of the merchant store which was provided during the onboarding process.
typeStringType of terminal
ecomEcommerce TID
posTID for a physical terminal
statusStringTerminal status
openTerminal is open. All operations are allowed.
suspendedTerminal is suspended. Merchant-initiated operations (sales, refunds, etc.) are prohibited, while settlements, dispute cycles, and other operations are allowed.
pending-closureTerminal is pending closure. Merchant-initiated operations (sales, refunds, etc.) are prohibited, while settlements, dispute cycles, and other operations are allowed.
closedTerminal is closed. No activity is allowed.

Example Requests and Response

Postman GET request
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
GET Merchant Storage

You 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.