Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
maxLevel1
stylenone

1

...

. Version Control

Version

Date

Description of Changes

Bahrain OBF v1.0.0

25th Aug 2020

Initial Release

2. Overview

The accounts resource is used by an AISP to retrieve full list of accounts and account information that the PSU 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

23.1

accounts

GET

GET /accounts

Mandatory

accounts

Authorization Authorisation Code

No

Pagination

 

OBReadAccount

23.2

accounts

GET

GET/accounts/{accountsIdAccountId}

Mandatory

accounts

Authorization 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 PSU 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 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 The Account and Servicer structure has been designed to:

    • Reflect the DebtorAccount and DebtorAgent (and similarly for , CreditorAccount and CreditorAgent ) structures in the PISP use case.

    • Having a SchemeName for the Account and Servicer blocks means we can be flexible to accommodate multiple types of accounts.

  • For common Domestic Bahrain identification schemes:

    • Account/Account

    • Account/Servicer

  • The SecondaryIdentification field is used to identify an account in addition to the primary Account/Identification field. SecondaryIdentification may be populated with a roll number for building societies, or a currency code where an account has multiple currency sub-accounts.

3.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 PSU:

    • 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 PSU, 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).

3.5        Data Dictionary

...

Name

...

Occurrence

...

XPath

...

Enhanced Definition

...

Class

...

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: Currency should only be used 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.

...

String

...

 

...

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

      • 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/AccountType

Specifies the type of account (personal or business).

String

 Enum:

  • Business

  • Personal

 

AccountSubType

1AccountId

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/AccountSubTypeStatus

Specifies the sub type status of account (product family group).resource in code form

String

Enum:

  • ChargeCard

  • CreditCard

  • CurrentAccount

  • EMoney

  • Loan

  • Mortgage

  • PrePaidCard

  • Savings

 

Description

0..1

OBReadAccount/Data/Account/Description

Specifies the description of the account type.

String

 

 

Nickname Enum:

  • Enabled

  • Disabled

  • Deleted

  • ProForma

  • Pending

 

StatusUpdateDateTime

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.

StringStatusUpdateDateTime

Date and time at which the resource status was updated

DateTime

 

 

OpeningDateCurrency

01..1

OBReadAccount/Data/Account/OpeningDate

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

DateTime

 

 

MaturityDate

0Currency

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/MaturityDateAccountType

Maturity date for Specifies the account.

DateTime

 type of account (personal or business)

String

 Enum:

  • Business

  • Personal

 

AccountAccountSubType

01..n1

OBReadAccount/Data/Account/AccountAccountSubType

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

  • BH.OBF.IBAN

  • BH.OBF.PAN

 

Identification

1Specifies 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/Account/IdentificationIdentification assigned by an institution to identify an account. This identification is known by the account owner./Account/Description

Specifies the description of the account type

String

 

 

NameNickname

0..1

OBReadAccount/Data/Account/Account/NameNickname

The account name is the name or names of nickname of the account, assigned by 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.Stringin 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

 

 

SecondaryIdentificationMaturityDate

0..1

OBReadAccount/Data/Account/Account/SecondaryIdentification

This is secondary identification of the account, as assigned by the account servicing institution. This can be used by building societies to additionally identify accounts with a roll number (in addition to a sort code and account number combination).

StringMaturityDate

Maturity date for the account

DateTime

 

 

ServicerAccount

0..1n

OBReadAccount/Data/Account/ServicerAccount

Party that manages the account on behalf of the account owner, that is manages the registration and booking of entries on the account, calculates balances on the account and provides information about the account.Provides the details to identify an account

OBReadAccount/Data/Account/ServicerAccount

 

 

SchemeNameSchemeName 

1..1

OBReadAccount/Data/Account/ServicerAccount/SchemeName

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

OBExternalAccountIdentificationCode

String

Enum: Enum:

  • BH.OBF.IBAN

  • BH.OBF.BICFI PAN

 

Identification

1..1

OBReadAccount/Data/Account/ServicerAccount/Identification

Unique and unambiguous identification of the servicing institution.

String

 

 

 

4.      Usage Examples

 

4.1       Bulk Accounts

The call to GET /accounts is the first step after an account-request is authorised. This will allow the AISP to discover which accounts (and AccountId values) are associated with the authorisation of consent. In this scenario, AccountId 00348765 has a building society roll number; and AccountId 00345897 does not.

4.1.1     Request

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

4.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.180Z",
        "Currency": "BHD",
        "AccountType": "Business",
        "AccountSubType": "CurrentAccount",
        "Description": "CurrentAccount",
        "Nickname": "Bills",
        "OpeningDate": "2020-03-23T08:27:44.180Z",
        "MaturityDate": "2020-03-23T08:27:44.180Z"
      },
      {
        "AccountId": "00345897",
        "Status": "Enabled",
        "StatusUpdateDateTime": "2020-03-23T08:27:44.180Z",
        "Currency": "BHD",
        "AccountType": "Personal",
        "AccountSubType": "SavingsAccount",
        "Description": "SavingsAccount

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",
        "NicknameStatus": "HouseholdEnabled",
        "OpeningDateStatusUpdateDateTime": "2020-03-23T08:27:44.180Z"180+03:00”,
        "MaturityDateCurrency": "2020-03-23T08:27:44.180ZBHD",
        "AccountAccountType": ["Business",
          {
    "AccountSubType": "CurrentAccount",
        "SchemeNameDescription": "IBANCurrentAccount",
            "IdentificationNickname": "BH10BBKU00100000008876Abdulla",
            "NameOpeningDate": "Asif Khan",
    2020-03-23T08:27:44.180+03:00”,
        "SecondaryIdentificationMaturityDate": "00025"
    2020-03-23T08:27:44.180+03:00”
      }
        ],
        "Servicer": {
          "SchemeNameAccountId": "IBAN00345897",
          "IdentificationStatus": "BH10CBBU00100000004598Enabled",
        }
"StatusUpdateDateTime": "2020-03-23T08:27:44.180+03:00”,
        }"Currency": "BHD",
    ]
  },
 "Links": {
  "AccountType": "Personal",
        "SelfAccountSubType": "www.TBC.comSavingsAccount",
    },
    "MetaDescription": {
"SavingsAccount",
        "TotalPagesNickname": 02"Household",
        "FirstAvailableDateTimeOpeningDate": "2020-03-12T0923T08:1027:17.596Z"44.180+03:00”,
        "LastAvailableDateTimeMaturityDate": "2020-03-12T0923T08:1027:17.596Z"
  }

}

4.2.  Specific Account

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

4.2.1     Request

GET /accounts/00348765
Authorization: Bearer 4ZopnFZFKjr5zDsicSQpLL
x-fapi-auth-date: Fri, 20 Mar 2020 11:07:03 GMT
x-fapi-customer-ip-address: 204.35.213.15
x-fapi-interaction-id: 75bdc714-b2dg-7676-c759-780d6815689f
Accept: application/json

4.2.2     Response

200 OK

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

Content-Type: application/json

{
  "Data": {
    "FilePaymentId": "764356",
    "ConsentId": "565656",
    "CreationDateTime44.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-20T1112T09:0710:04.048Z",
    "Status": "InitiationCompleted",
    "StatusUpdateDateTime17.596+03:00”,
    "LastAvailableDateTime": "2020-03-20T1112T09:0710:04.048Z",
    "Charges": [
      {
        "ChargeBearer": "BorneByCreditor",
        "Type": "TO_BE_CONFIRMED",
        "Amount": {
          "Amount": "2.38",
          "Currency": "BHD"
        }
      }
    ],
    "Initiation": {
      "FileType": "BH.OBF.PaymentInitiation",
      "FileHash": "jhkgas5768a/s78as",
      "FileReference": "41536789",
      "NumberOfTransactions": "10",
      "ControlSum": 0,
      "RequestedExecutionDateTime": "2020-03-20T09:14:32.115Z",
      "LocalInstrument": "EFT-CSCT-DNS",
      "DebtorAccount": {
        "SchemeName": "IBAN",
        "Identification": "BH10CBBU00100000008876",
        "Name": "Albert John",
        "SecondaryIdentification": "00023"
      },
      "RemittanceInformation": {
        "RemittanceDescription": "External Ops Code 34251",
        "Reference": "XYZ-101"
      },
    },
    "MultiAuthorisation": {
      "Status": "Authorised",
      "NumberRequired": 1,
      "NumberReceived": 1,
      "LastUpdateDateTime17.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-20T1123T08:0727:04.048Z",
      "ExpirationDateTime44.180+03:00”,
        "MaturityDate": "2020-03-20T1123T08:0727:04.048Z"
    }
  44.180+03:00”
      },
    ]
  },
   "Links": {
        "Self": "www.TBC.com"
    },
    "Meta": {
        "TotalPages": 102,
        "FirstAvailableDateTime": "2020-03-20T0912T09:10:17.596Z"596+03:00”,
        "LastAvailableDateTime": "2020-03-20T0912T09:10:17.596Z"
  }
}596+03:00”
  } 

}


CENTRAL BANK OF BAHRAIN © 2020