Accounts

1. Version Control

Version

Date

Description of Changes

Bahrain OBF v1.0.0

28th Oct 2020

Initial Release

2. Overview

The accounts resource is used by an AISP to retrieve full list of accounts and account information that the user/customer has authorised to access.

This resource description should be read in conjunction with a compatible Account Information Services API Profile.

3.  Endpoints

Endpoints for the resource - and available methods.

S. No.

Resource

HTTP Operation

Endpoint

Mandatory

Scope

Grant Type

Idempotency Key

Parameters

Request Object

Response Object

3.1

accounts

GET

GET /accounts

Mandatory

accounts

Authorisation Code

No

Pagination

 

OBReadAccount

3.2

accounts

GET

GET/accounts/{AccountId}

Mandatory

accounts

Authorisation Code

No

 

 

OBReadAccount

3.1 GET/accounts

The first step for an AISP after an account-request is authorised - is to call the GET /accounts endpoint.

An AISP will be given the full list of accounts (the AccountId(s)) that the user/customer has authorised the AISP to access. The AccountId(s) returned may then be used to retrieve other resources for a specific AccountId. The selection of authorised accounts happens only at the ASPSP’s interface.

3.2 GET /accounts/{AccountId}

An AISP may retrieve the account information resources for the AccountId (which is retrieved in the call to GET /accounts).

4.  Data Models

 The OBReadAccount object will be used for the call to:

  • GET /accounts/{AccountId}

  • GET /accounts

4.1 Resource Definition

This resource represents the account to which credit and debit entries are made. Each account resource will have a unique and immutable AccountId.

4.2 UML Diagram

 

 

4.3 Notes

  • The Account and Servicer structure has been designed to:

    • Reflect the DebtorAccount, CreditorAccount and CreditorAgent structures in the PISP use case

    • Having a SchemeName for the Account and Servicer blocks can accommodate multiple types of accounts

  • For common Domestic Bahrain identification schemes:

    • Account/Account

      • Where "BH.OBF. IBAN" is specified as the SchemeName, the Identification field must be populated with the full IBAN

      • Where "BH.OBF.PAN" is specified as the SchemeName, the Identification field must be populated with the primary PAN linked to the account. An ASPSP may choose to mask digits returned in the Identification field

    • Account/Servicer

      • Where "BH.OBF. BICFI" is populated as the SchemeName, the Identification field must be populated with the BIC

4.4  Permission Codes

The resource differs depending on the permissions (ReadAccountsBasic and ReadAccountsDetail) used to access the resource. In the event that the resource is accessed with both ReadAccountsBasic and ReadAccountsDetail, the most detailed level (ReadAccountsDetail) must be used.

  • These objects must not be returned without the ReadAccountsDetail permission:

    • OBReadAccount/Data/Account/Account

    • OBReadAccount/Data/Account/Servicer

  • If the ReadAccountsDetail is granted by the user/customer:

    • OBReadAccount/Data/Account/Account must be returned (1..n)

    • OBReadAccount/Data/Account/Servicer may be returned if applicable to the account and ASPSP (0..1)

If the ReadPAN permission is granted by the user/customer, the ASPSP may choose to populate the OBReadAccount/Data/Account/Account/Identification with the unmasked PAN (if the PAN is being populated in the response).

4.5 Data Dictionary

Name

Occurrence

XPath

Enhanced Definition

Class/ Datatype

Codes

Pattern

OBReadAccount

 

OBReadAccount

 

OBReadAccount

 

 

Data

1..1

OBReadAccount/Data

 

OBReadAccount/Data

 

 

Account

0..n

OBReadAccount/Data/Account

Unambiguous identification of the account to which credit and debit entries are made

OBReadAccount/Data/Account

 

 

AccountId

1..1

OBReadAccount/Data/Account/AccountId

A unique and immutable identifier used to identify the account resource. This identifier has no meaning to the account owner

String

 

 

Status

0..1

OBReadAccount/Data/Account/Status

Specifies the status of account resource in code form

String

 Enum:

  • Enabled

  • Disabled

  • Deleted

  • ProForma

  • Pending

 

StatusUpdateDateTime

0..1

OBReadAccount/Data/Account/StatusUpdateDateTime

Date and time at which the resource status was updated

DateTime

 

 

Currency

1..1

OBReadAccount/Data/Account/Currency

Identification of the currency in which the account is held. Usage: In case one and the same account number covers several currencies and the initiating party needs to identify which currency needs to be used for settlement on the account. In case of single currency account, the default currency will be used

String

 

^[A-Z]{3,3}$

AccountType

1..1

OBReadAccount/Data/Account/AccountType

Specifies the type of account (personal or business)

String

 Enum:

  • Business

  • Personal

 

AccountSubType

1..1

OBReadAccount/Data/Account/AccountSubType

Specifies the sub type of account (product family group). The following fields are to be captured:

  • ChargeCard

  • CreditCard

  • CurrentAccount

  • EWallet

  • Loan- In Islamic banking, this field is referred to as ‘Financing’

  • Mortgage

  • PrePaidCard

  • Savings- In Islamic banking, this field is referred to as ‘Investment Accounts including Modharaba/ Wakala or Reverse Murabaha’

  • Deposit- In Islamic banking, this field is referred to as ‘Current Account’

String

Enum:

  • ChargeCard

  • CreditCard

  • CurrentAccount

  • EWallet

  • Loan

  • Mortgage

  • PrePaidCard

  • Savings

  • Deposit

 

Description

0..1

OBReadAccount/Data/Account/Description

Specifies the description of the account type

String

 

 

Nickname

0..1

OBReadAccount/Data/Account/Nickname

The nickname of the account, assigned by the account owner in order to provide an additional means of identification of the account

String

 

 

OpeningDate

0..1

OBReadAccount/Data/Account/OpeningDate

Date on which the account and related basic services are effectively operational for the account owner

DateTime

 

 

MaturityDate

0..1

OBReadAccount/Data/Account/MaturityDate

Maturity date for the account

DateTime

 

 

Account

0..n

OBReadAccount/Data/Account/Account

Provides the details to identify an account

OBReadAccount/Data/Account/Account

 

 

SchemeName 

1..1

OBReadAccount/Data/Account/Account/SchemeName

Name of the identification scheme, in a coded form as published in an external list

OBExternalAccountIdentificationCode

 Enum:

  • BH.OBF.IBAN

  • BH.OBF.PAN

 

Identification

1..1

OBReadAccount/Data/Account/Account/Identification

Identification assigned by an institution to identify an account. This identification is known by the account owner

String

 

 

Name

0..1

OBReadAccount/Data/Account/Account/Name

The account name is the name or names of the account owner(s) represented at an account level, as displayed by the ASPSP's online channels. Note, the account name is not the product name or the nickname of the account

String

 

 

Servicer

0..1

OBReadAccount/Data/Account/Servicer

Party that manages the account on behalf of the account owner, that manages the registration and booking of entries on the account, calculates balances on the account and provides information about the account

OBReadAccount/Data/Account/Servicer

 

 

SchemeName

1..1

OBReadAccount/Data/Account/Servicer/SchemeName

Name of the identification scheme, in a coded form as published in an external list

String

Enum:

  • BH.OBF.BICFI 

 

Identification

1..1

OBReadAccount/Data/Account/Servicer/Identification

Unique and unambiguous identification of the servicing institution

String

 

 

 

5.  Usage Examples

5.1 Bulk Accounts

5.1.1 Request

GET /accounts
Authorisation: Bearer 4ZopnFZFKjr5zDsicSQpLL
x-fapi-auth-date: Tue, 18 Mar 2020 19:43:31 GMT+03:00
x-fapi-customer-ip-address: 204.35.213.15
x-fapi-interaction-id: 75bdc714-b2dg-7676-c759-780d6815689f
Accept: application/json

5.1.2 Response

200 OK
x-fapi-interaction-id: 75bdc714-b2dg-7676-c759-780d6815689f
Content-Type: application/json

{
  "Data": {
    "Account": [
      {
        "AccountId": "00348765",
        "Status": "Enabled",
        "StatusUpdateDateTime": "2020-03-23T08:27:44.180+03:00”,
        "Currency": "BHD",
        "AccountType": "Business",
        "AccountSubType": "CurrentAccount",
        "Description": "CurrentAccount",
        "Nickname": "Abdulla",
        "OpeningDate": "2020-03-23T08:27:44.180+03:00”,
        "MaturityDate": "2020-03-23T08:27:44.180+03:00”
      },
      {
        "AccountId": "00345897",
        "Status": "Enabled",
        "StatusUpdateDateTime": "2020-03-23T08:27:44.180+03:00”,
        "Currency": "BHD",
        "AccountType": "Personal",
        "AccountSubType": "SavingsAccount",
        "Description": "SavingsAccount",
        "Nickname": "Household",
        "OpeningDate": "2020-03-23T08:27:44.180+03:00”,
        "MaturityDate": "2020-03-23T08:27:44.180+03:00”,
        "Account": [
          {
            "SchemeName": "BH.OBF.IBAN",
            "Identification": "BH10BBKU00100000008876",
            "Name": "Mohammed Ahmed Abdulla",
          }
        ],
        "Servicer": {
          "SchemeName": "BH.OBF.BICFI",
          "Identification": "BOBFBICFXYZ"
        }
      }
    ]
  },
 "Links": {
    "Self": "www.TBC.com"
  },
  "Meta": {
    "TotalPages": 02,
    "FirstAvailableDateTime": "2020-03-12T09:10:17.596+03:00”,
    "LastAvailableDateTime": "2020-03-12T09:10:17.596+03:00”
  }

}

5.2 Specific Account

An AISP may also retrieve the account resource details specifically for AccountId 00348765. The ReadAccountsDetail permission has been granted.

5.2.1 Request

GET /accounts/00348765
Authorisation: Bearer 4ZopnFZFKjr5zDsicSQpLL
x-fapi-auth-date: Tue, 18 Mar 2020 19:43:31 GMT+03:00
x-fapi-customer-ip-address: 204.35.213.15
x-fapi-interaction-id: 75bdc714-b2dg-7676-c759-780d6815689f
Accept: application/json

5.2.2 Response

200 OK

x-fapi-interaction-id: 75bdc714-b2dg-7676-c759-780d6815689f

Content-Type: application/json

{
  "Data": {
    "Account": [
      {
        "AccountId": "00348765",
        "Status": "Enabled",
        "StatusUpdateDateTime": "2020-03-23T08:27:44.180+03:00”,
        "Currency": "BHD",
        "AccountType": "Business",
        "AccountSubType": "CurrentAccount",
        "Description": "CurrentAccount",
        "Nickname": "Abdulla",
        "OpeningDate": "2020-03-23T08:27:44.180+03:00”,
        "MaturityDate": "2020-03-23T08:27:44.180+03:00”
      },
    ]
  },
 "Links": {
    "Self": "www.TBC.com"
  },
  "Meta": {
    "TotalPages": 02,
    "FirstAvailableDateTime": "2020-03-12T09:10:17.596+03:00”,
    "LastAvailableDateTime": "2020-03-12T09:10:17.596+03:00”
  } 

}

 

 


CENTRAL BANK OF BAHRAIN © 2020