Skip to main content

GET Banks

In this section, we cover:

  1. GET Banks - use the API to return a list of banks available at this time.
  2. Offer Bank List - provide the bank list to the Payer and allow them to choose their bank.

GET Banks

Request

The 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

Example

GET https://test-api.dnapayments.com/v1/ecospend/banks
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

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 Banks
Field NameData TypeDescription
dataArrayAn array of objects for each bank available. See the data array for more information.
metaObjectMeta data for the entire response. See the meta Object for more details.

data Array

data Array
Field NameData TypeDescription
bank_idStringThe unique bank ID, derived from the EcoSpend system.
nameStringThe name of the bank.
friendly_nameStringThe friendly name of the bank.
is_sandboxStringIndicates if the record returned is in a sandbox (test) bank environment.
logoStringThe logo URL of the bank.
iconStringThe icon url of the bank.
standardStringWhich open banking standard is implemented by the bank.
Available options are:
obiestetberlingroup
country_iso_codeStringThe country code that the bank operates in.
divisionStringThe division of the bank e.g.
Available options are:
personalbusinesscorporate
groupStringThe group where applicable of the bank e.g Barclays.
orderStringThe preference of the bank. Can be amended to show a given bank before another.
service_statusBooleanIndicates if the bank's services are online currently.
refund_supportedBooleanIndicates if the bank's services are online currently.
abilitiesObjectThe operations supported by the specific bank. See the abilities Object for more information

abilities Object

meta Object
Field NameData TypeDescription
domestic_paymentBooleantrue if the bank supports Domestic Payments.
domestic_scheduled_paymentBooleantrue if the bank supports Domestic Scheduked Payments.
domestic_standing_orderBooleantrue if the bank supports Domestic Standing Orders.
domestic_standing_order_installmentBooleantrue if the bank supports Domestic Standing Order Installments.
domestic_standing_order_yearly_periodBooleantrue if the bank supports yearly intervals for Domestic Standing Order Payments.
international_paymentBooleantrue if the bank supports International Payments.
international_scheduled_paymentBooleantrue if the bank supports International Scheduled Payments.
international_standing_orderBooleantrue if the bank supports International Standing Orders.
bulk_paymentsBooleantrue if the bank supports Bulk Payments.

meta Object

meta Object
Field NameData TypeDescription
total_countIntegerThe total number of Banks returned.
total_pagesIntegerThe total number of pages.
current_pageIntegerCurrent page.

Example


{
"data": [
{
"bank_id": "obie-coutts-sandbox",
"name": "Barclays Personal",
"friendly_name": "Coutts Online Banking Test",
"is_sandbox": true,
"logo": "https://{uri}",
"icon": "https://{uri}",
"standard": "obie",
"country_iso_code": "GB",
"division": "Personal",
"group": "CMA9",
"order": 0,
"service_status": true,
"refund_supported": false,
"abilities": {
"domestic_payment": true,
"domestic_scheduled_payment": true,
"domestic_standing_order": true,
"domestic_standing_order_installment": true,
"domestic_standing_order_yearly_period": true,
"international_payment": true,
"international_scheduled_payment": true,
"international_standing_order": true,
"bulk_payments": true
}
}
],
"meta": {
"total_count": 0,
"total_pages": 0,
"current_page": 0
}
}
tip

Regardless of the various abilities offered by the Banks, the DNA Open Banking API supports domestic_payment only.

Offer Bank List

Having identified the banks, you should present these to the Payer within your own solution. We recommend using the supplied icon and logo URL's to provide payer confidence.

As an option, you can include the consent page requirement at this stage. Alternatively, once the bank has been selected by the Payer, you are ready to send the createOrder request.