GET Banks
In this section, we cover:
- GET Banks - use the API to return a list of banks available at this time.
- Offer Bank List - provide the bank list to the Payer and allow them to choose their bank.
GET
Banks
Request
Test URL: https://test-api.dnapayments.com/v1/ecospend/banks
Production URL: https://api.dnapayments.com/v1/ecospend/banks
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 Name | State | Data Type | Description |
Content-Type | Mandatory | String | application/json |
Authorization | Mandatory | String | Bearer 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 Name | Data Type | Description |
data | Array | An array of objects for each bank available. See the data array for more information. |
meta | Object | Meta data for the entire response. See the meta Object for more details. |
data
Array
data Array | |||||
---|---|---|---|---|---|
Field Name | Data Type | Description | |||
bank_id | String | The unique bank ID, derived from the EcoSpend system. | |||
name | String | The name of the bank. | |||
friendly_name | String | The friendly name of the bank. | |||
is_sandbox | String | Indicates if the record returned is in a sandbox (test) bank environment. | |||
logo | String | The logo URL of the bank. | |||
icon | String | The icon url of the bank. | |||
standard | String | Which open banking standard is implemented by the bank. Available options are:
| |||
country_iso_code | String | The country code that the bank operates in. | |||
division | String | The division of the bank e.g. Available options are:
| |||
group | String | The group where applicable of the bank e.g Barclays. | |||
order | String | The preference of the bank. Can be amended to show a given bank before another. | |||
service_status | Boolean | Indicates if the bank's services are online currently. | |||
refund_supported | Boolean | Indicates if the bank's services are online currently. | |||
abilities | Object | The operations supported by the specific bank. See the abilities Object for more information |
abilities
Object
meta Object | ||
---|---|---|
Field Name | Data Type | Description |
domestic_payment | Boolean | true if the bank supports Domestic Payments. |
domestic_scheduled_payment | Boolean | true if the bank supports Domestic Scheduked Payments. |
domestic_standing_order | Boolean | true if the bank supports Domestic Standing Orders. |
domestic_standing_order_installment | Boolean | true if the bank supports Domestic Standing Order Installments. |
domestic_standing_order_yearly_period | Boolean | true if the bank supports yearly intervals for Domestic Standing Order Payments. |
international_payment | Boolean | true if the bank supports International Payments. |
international_scheduled_payment | Boolean | true if the bank supports International Scheduled Payments. |
international_standing_order | Boolean | true if the bank supports International Standing Orders. |
bulk_payments | Boolean | true if the bank supports Bulk Payments. |
meta
Object
meta Object | ||
---|---|---|
Field Name | Data Type | Description |
total_count | Integer | The total number of Banks returned. |
total_pages | Integer | The total number of pages. |
current_page | Integer | Current 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
}
}
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.