Get Bank Accounts

This page will guide you on how to get bank accounts.

Request for getting all bank accounts (for example, with currency EUR):

curl --location --request GET 'https://sandbox.openpayd.com/api/bank-accounts?currency=EUR' \
--header 'content-type: application/json' \
--header 'X-ACCOUNT-HOLDER-ID: 71a32bf6-f190-4c19-8afa-6a1b79829cb7' \
--header 'Authorization: Bearer <access_token>'

Response on getting bank accounts:

[
    {
        "currency": "EUR",
        "status": "ACTIVE",
        "internalAccountId": "EUR10172739387826",
        "bankCountry": "DE",
        "bankAddress": "SÜDLICHE MÜNCHNER STR. 2, 82031 GRÜNWALD",
        "swiftCode": "DEKTDE7G",
        "iban": "DUMMY12341234143412356",
        "accountNumber": null,
        "bankName": "DEUTSCHE KONTOR PRIVATBANK AG",
        "bankAccountHolderName": "Company Name",
        "routingCodeEntries": []
    }
]
  • internalAccountId: same internal reference as the internalAccountId from create bank account response
  • status: shows ACTIVE, since IBAN is generated
  • routingCodeEntries: can have multiple sub-elements with two key-value settings, for example:
  • routingCodeKey: "SORT_CODE"
  • routingCodeValue: "040510"

Bank account balance

Get all accounts

curl --location --request GET 'https://sandbox.openpayd.com/api/accounts' \
--header 'X-ACCOUNT-HOLDER-ID: <account_holder_id>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <access_token>' \
--data-raw ''

Response on get accounts

{
  "content": [
    {
      "id": "MmJxY1cyeGJmc0hTV08wOTFad01yUT09",
      "createdOn": "2020-03-04T12:41:30.147Z",
      "status": "PENDING",
      "actualBalance": {
        "value": 0.00,
        "currency": "EUR"
      },
      "availableBalance": {
        "value": 0.00,
        "currency": "EUR"
      },
      "transactionCategory": "OTHER",
      "accountType": "USER",
      "friendlyName": "euro",
      "internalAccountId": "EUR16485263566470"
    }
  ],
  "pageable": {
    "sort": {
      "sorted": false,
      "unsorted": true,
      "empty": true
    },
    "pageSize": 1,
    "pageNumber": 0,
    "offset": 0,
    "paged": true,
    "unpaged": false
  },
  "totalPages": 1,
  "last": true,
  "totalElements": 1,
  "first": true,
  "sort": {
    "sorted": false,
    "unsorted": true,
    "empty": true
  },
  "numberOfElements": 1,
  "size": 1,
  "number": 0,
  "empty": false
}

Get account detail by id

curl --location --request GET 'https://sandbox.openpayd.com/api/accounts/MmJxY1cyeGJmc0hTV08wOTFad01yUT09' \
--header 'X-ACCOUNT-HOLDER-ID: <account_holder_id>' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <access_token>'

Response on get account detail by id

{
  "id": "Y2V4YndseHQybldDWFRCQnplZzUvdz09",
  "createdOn": "2020-03-04T12:41:30.147Z",
  "status": "PENDING",
  "actualBalance": {
    "value": 0.00,
    "currency": "EUR"
  },
  "availableBalance": {
    "value": 0.00,
    "currency": "EUR"
  },
  "transactionCategory": "OTHER",
  "accountType": "USER",
  "friendlyName": "euro",
  "internalAccountId": "EUR16485263566470"
}