Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Version

Date

Description of Changes

Bahrain OBF v1.0

25th Aug 2020

Initial Release

...

2. Overview

The statements resource is used by an AISP to retrieve the

...

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

...

3. Endpoints

S. No.

Resource

HTTP Operation

Endpoint

Mandatory

Scope

Grant Type

Idempotency Key

Parameter

Request Object

Response Object

23.1

statements

GET

GET /accounts/{AccountId}/statements

Conditional

accounts

Authorisation Code

No

Pagination Filtering

 

OBReadStatement

23.2

statements

GET

GET /accounts/{AccountId}/statements/{StatementId}

Conditional

accounts

Authorisation Code

No

 

 

OBReadStatement

23.3

statements

GET

GET /accounts/{AccountId}/statements/{StatementId}/file

Optional

accounts

Authorisation Code

No

 

 

File

23.4

transactions

GET

GET /accounts/{AccountId}/statements/{StatementId}/transactions

Conditional

accounts

Authorisation Code

No

Pagination

 

OBReadTransaction

23.5

statements

GET

GET /statements

Optional

accounts

Authorisation Code

No

Pagination Filtering

 

OBReadStatement

...

3.1 GET /accounts/{AccountId}/statements

An ASPSP may provide this endpoint for AISPs to retrieve the statements information resource for the AccountId (which is retrieved in the call to GET /accounts).

...

3.2 GET /accounts/{AccountId}/statements/{StatementId}

An ASPSP may provide this endpoint for AISPs to retrieve the statement information resource for a specific statement in the AccountId (which is retrieved in the call to GET /accounts).

...

3.3 GET /accounts/{AccountId}/statements/{StatementId}/file

An ASPSP may provide this endpoint for AISPs to retrieve a non-json representation of a specific statement.

...

3.4 GET /accounts/{AccountId}/statements/{StatementId}/transactions

An ASPSP may provide this endpoint for AISPs to retrieve transactions that appear on the selected statement. The data model for the returned objects is documented in the transactions resource.

...

3.5 GET/statements

An ASPSP may provide this endpoint for AISPs to retrieve statement information for all accounts that the customer has consented to. This will retrieve the statement resources for all authorised accounts linked to the account-request.

...

4. Data Models

...

4.1 OBReadStatement

The OBReadStatement object will be used for the call to:

...

  • GET /accounts/{AccountId}/statements/{StatementId}/transactions

...

4.1.1 Resource Definition

A resource that describes summary details for an account statement period. For a specific date range, an account (AccountId) may have no statements, or may have multiple statements. The /statements endpoint (if implemented by the ASPSP) must return all statements within the requested date range for all accounts selected during the authorisation of the account-request. If an AISP would like to access a specific statement (StatementId) to retrieve a formal statement download or transactions for a specific statement - the AISP must specify the account (the AccountId) via the URI request path i.e., via:

  • GET /accounts/{AccountId}/statements/{StatementId}/file - to download the statement

  • GET /accounts/{AccountId}/statements/{StatementId}/transactions - to return the transactions relating to a statement

...

4.1.2 UML Diagram

...

...

4.1.3 Notes

  • The statements resource must only be used for data that can be returned for a statement period.

  • StartDateTime, EndDateTime and CreationDateTime are mandatory for the statements resource. If an ASPSP does not display these dates in an online channel, the ASPSP must populate these dates with sensible values. E.g., the StartDateTime could be the day after the previous statement EndDateTime, and the CreationDateTime could be the day after the EndDateTime.

...

4.1.4 Filtering

Limited support for filtering is provided on the statements resource

...

// All statements from 1st Jan, 2019 GET /statements?fromStatementDateTime=2019-01-01T00:00:00   // All statements in 2019 GET /statements?fromStatementDateTime=2019-01-01T00:00:00&toStatementDateTime=2019-12-31T23:59:59   // All statements in a specific account up to 31-Mar-2020 GET /accounts/1/statements?toStatementDateTime=2020-03-31T23:59:59

...

4.1.5 Permission Codes

The resource differs depending on the permissions (ReadStatementsBasic and ReadStatementsDetail) used to access resource (the OBReadStatement object). In the event the resource is accessed with both ReadStatementsBasic and ReadStatementsDetail, the most detailed level (ReadStatementsDetail) must be used..

...

  • The ReadTransactionsBasic or ReadTransactionsDetail (in addition to the appropriate ReadTransactionsCredits and/or ReadTransactionsDebits ) permission codes will be required. The ASPSP must apply the same access to GET /accounts/{AccountId}/statements/{StatementId}/transactions as GET /accounts/{AccountId}/transactions

  • If the ReadPAN permission is granted by the user/customer - the ASPSP may choose to populate the unmasked PAN - if the PAN is being populated in the response for these fields

    • OBReadTransaction/Data/Transaction/CreditorAgent/Identification

    • OBReadTransaction/Data/Transaction/DebtorAccount/Identification

    • OBReadTransaction /Data/Transaction/CardInstrument/Identification

...

4.1.6 Data Dictionary

Name

Occurrence

XPath

Definition

Class/ Datatype

Codes

Pattern

OBReadStatement

 

OBReadStatement

 

OBReadStatement

 

 

Data

1..1

OBReadStatement/Data

 

OBReadStatement/Data

 

 

Statement

0..n

OBReadStatement/Data/Statement

Provides further details on a statement resource.

OBReadStatement/Data/Statement

 

 

AccountId

1..1

OBReadStatement/Data/Statement/AccountId

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

String

 

 

StatementId

0..1

OBReadStatement/Data/Statement/StatementId

Unique identifier for the statement resource within a servicing institution. This identifier is both unique and immutable.

String

 

 

StatementReference

0..1

OBReadStatement/Data/Statement/StatementReference

Unique reference for the statement. This reference may be optionally populated if available.

String

 

 

Type

1..1

OBReadStatement/Data/Statement/Type

Statement type, in a coded form

String

Enum:

  • AccountClosure

  • AccountOpening

  • Annual

  • Interim

  • RegularPeriodic

 

StartDateTime

1..1

OBReadStatement/Data/Statement/StartDateTime

Date and time at which the statement period starts.

DateTime

 

 

EndDateTime

1..1

OBReadStatement/Data/Statement/EndDateTime

Date and time at which the statement period ends.

DateTime

 

 

CreationDateTime

1..1

OBReadStatement/Data/Statement/CreationDateTime

Date and time at which the resource was created.

DateTime

 

 

StatementDescription

0..n

OBReadStatement/Data/Statement/StatementDescription

Other descriptions that may be available for the statement resource.

String

 

 

StatementBenefit

0..n

OBReadStatement/Data/Statement/StatementBenefit

Set of elements used to provide details of a benefit or reward amount for the statement resource.

OBReadStatement/Data/Statement/StatementBenefit

 

 

Type

1..1

OBReadStatement/Data/Statement/StatementBenefit/Type

Benefit type, in a coded form.

String

 

 

Amount

1..1

OBReadStatement/Data/Statement/StatementBenefit/Amount

Amount of money associated with the statement benefit type.

OBReadStatement/Data/Statement/StatementBenefit/Amount

 

 

Amount

1..1

OBReadStatement/Data/Statement/StatementBenefit/Amount/Amount

A number of monetary units specified in an active currency where the unit of currency is explicit and compliant with ISO 4217.

String

 

^\d{1,13}$\|^\d{1,13}\.\d{1,5}$

Currency

1..1

OBReadStatement/Data/Statement/StatementBenefit/Amount/Currency

A  code allocated to a currency by a Maintenance Agency under an international identification scheme, as described in the latest edition of the international standard ISO 4217 "Codes for the representation of currencies and funds".

String

 

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

StatementFee

0..n

OBReadStatement/Data/Statement/StatementFee

Set of elements used to provide details of a fee for the statement resource.

OBReadStatement/Data/Statement/StatementFee

 

 

Description

0..1

OBReadStatement/Data/Statement/StatementFee/Description

Description that may be available for the statement fee.

String

 

 

CreditDebitIndicator

1..1

OBReadStatement/Data/Statement/StatementFee/CreditDebitIndicator1

Indicates whether the amount is a credit or a debit. Usage: A zero amount is considered to be a credit amount.

String

Enum:

  • Credit

  • Debit

 

Type

1..1

OBReadStatement/Data/Statement/StatementFee/Type

Fee type, in a coded form.

String

Enum: (Indicative)

  • BH.OBF.Annual

  • BH.OBF.BalanceTransfer

  • BH.OBF.CashAdvance

  • BH.OBF.CashTransaction

  • BH.OBF.ForeignCashTransaction

  • BH.OBF.ForeignTransaction

  • BH.OBF.Gambling

  • BH.OBF.LatePayment

  • BH.OBF.MoneyTransfer

  • BH.OBF.Monthly

  • BH.OBF.Overlimit

  • BH.OBF.PostalOrder

  • BH.OBF.PrizeEntry

  • BH.OBF.StatementCopy

  • BH.OBF.Total 

 

Rate

0..1

OBReadStatement/Data/Statement/StatementFee/Rate

Rate charged for Statement Fee (where it is charged in terms of a rate rather than an amount)

Number

 

 

RateType

0..1

OBReadStatement/Data/Statement/StatementFee/RateType

Description that may be available for the statement fee rate type.

String

Enum:

  • BH.OBF.AER

  • BH.OBF.EAR

 

Frequency

0..1

OBReadStatement/Data/Statement/StatementFee/Frequency

How frequently the fee is applied to the Account.

String

Enum:

  • BH.OBF.ChargingPeriod

  • BH.OBF.PerTransactionAmount

  • BH.OBF.PerTransactionPercentage

  • BH.OBF.Quarterly

  • BH.OBF.StatementMonthl

  • BH.OBF.Weekly

 

Amount

1..1

OBReadStatement/Data/Statement/StatementFee/Amount

Amount of money associated with the statement fee type.

OBReadStatement/Data/Statement/StatementFee/Amount

 

 

Amount

1..1

OBReadStatement/Data/Statement/StatementFee/Amount/Amount

A number of monetary units specified in an active currency where the unit of currency is explicit and compliant with ISO 4217.

String

 

^\d{1,13}$\|^\d{1,13}\.\d{1,5}$

Currency

1..1

OBReadStatement/Data/Statement/StatementFee/Amount/Currency

A  code allocated to a currency by a Maintenance Agency under an international identification scheme, as described in the latest edition of the international standard ISO 4217 "Codes for the representation of currencies and funds".

String

 

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

StatementInterest

0..n

OBReadStatement/Data/Statement/StatementInterest

Set of elements used to provide details of a generic interest amount related to the statement resource.

OBReadStatement/Data/Statement/StatementInterest

 

 

Description

0..1

OBReadStatement/Data/Statement/StatementInterest/Description

Description that may be available for the statement interest.

String

 

 

CreditDebitIndicator

1..1


OBReadStatement/Data/Statement/StatementInterest/CreditDebitIndicator

Indicates whether the amount is a credit or a debit. Usage: A zero amount is considered to be a credit amount.

String

Enum:

  • Credit

  • Debit

 

Type

1..1

OBReadStatement/Data/Statement/StatementInterest/Type

Interest amount type, in a coded form.

String

Enum: (Indicative)

  • BH.OBF.BalanceTransfer

  • BH.OBF.Cash

  • BH.OBF.EstimatedNext

  • BH.OBF.Purchase

  • BH.OBF.Total

 

Rate

0..1

OBReadStatement/Data/Statement/StatementInterest/Rate

Rate for Statement Interest (where it is applicable in terms of a rate rather than an amount)

Number

 

 

RateType

0..1

OBReadStatement/Data/Statement/StatementInterest/RateType

Description that may be available for the statement Interest rate type.

String

Enum:

  • BH.OBF.FixedRate

  • BH.OBF.Gross

  • BH.OBF.LoanProviderBaseRate

  • BH.OBF.Net

 

Frequency

0..1

OBReadStatement/Data/Statement/StatementInterest/Frequency

How frequently the Interest Rate is applied to the Account.

String

Enum:

  • BH.OBF.Daily BH.OBF.HalfYearly

  • BH.OBF.Monthly

  • BH.OBF.PerStatementDate

  • BH.OBF.Quarterly

  • BH.OBF.Weekly

  • BH.OBF.Yearly

 

Amount

1..1

OBReadStatement/Data/Statement/StatementInterest/Amount

Amount of money associated with the statement interest amount type.

OBReadStatement/Data/Statement/StatementInterest/Amount

 

 

Amount

1..1

OBReadStatement/Data/Statement/StatementInterest/Amount/Amount

A number of monetary units specified in an active currency where the unit of currency is explicit and compliant with ISO 4217.

String

 

^\d{1,13}$\|^\d{1,13}\.\d{1,5}$

Currency

1..1

OBReadStatement/Data/Statement/StatementInterest/Amount/Currency

A  code allocated to a currency by a Maintenance Agency under an international identification scheme, as described in the latest edition of the international standard ISO 4217 "Codes for the representation of currencies and funds".

String

 

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

StatementAmount

0..n

OBReadStatement/Data/Statement/StatementAmount

Set of elements used to provide details of a generic amount for the statement resource.

OBReadStatement/Data/Statement/StatementAmount

 

 

CreditDebitIndicator

1..1

OBReadStatement/Data/Statement/StatementAmount/CreditDebitIndicator

Indicates whether the amount is a credit or a debit. Usage: A zero amount is considered to be a credit amount.

String

Enum

  • Credit

  • Debit

 

Type

1..1

OBReadStatement/Data/Statement/StatementAmount/Type

Amount type, in a coded form.

String

Enum: (Indicative)

  •  BH.OBF.ArrearsClosingBalance

  • BH.OBF.AvailableBalance

  • BH.OBF.AverageBalanceWhenInCredit

  • BH.OBF.AverageBalanceWhenInDebit

  • BH.OBF.AverageDailyBalance

  • BH.OBF.BalanceTransferClosingBalance

  • BH.OBF.CashClosingBalance

  • BH.OBF.ClosingBalance

  • BH.OBF.CreditLimit

  • BH.OBF.CurrentPayment

  • BH.OBF.DirectDebitPaymentDue

  • BH.OBF.MinimumPaymentDue

  • BH.OBF.PendingTransactionsBalance

  • BH.OBF.PreviousClosingBalance

  • BH.OBF.PreviousPayment

  • BH.OBF.PurchaseClosingBalance

  • BH.OBF.StartingBalance

  • BH.OBF.TotalAdjustments

  • BH.OBF.TotalCashAdvances

  • BH.OBF.TotalCharges

  • BH.OBF.TotalCredits

  • BH.OBF.TotalDebits

  • BH.OBF.TotalPurchases   

 

Amount

1..1

OBReadStatement/Data/Statement/StatementAmount/Amount

Amount of money associated with the amount type.

OBReadStatement/Data/Statement/StatementAmount/Amount

 

 

Amount

1..1

OBReadStatement/Data/Statement/StatementAmount/Amount/Amount

A number of monetary units specified in an active currency where the unit of currency is explicit and compliant with ISO 4217.

String

 

^\d{1,13}$\|^\d{1,13}\.\d{1,5}$

Currency

1..1

OBReadStatement/Data/Statement/StatementAmount/Amount/Currency

A code allocated to a currency by a Maintenance Agency under an international identification scheme, as described in the latest edition of the international standard ISO 4217 "Codes for the representation of currencies and funds".

String

 

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

StatementDateTime

0..n

OBReadStatement/Data/Statement/StatementDateTime

Set of elements used to provide details of a generic date time for the statement resource.

OBReadStatement/Data/Statement/StatementDateTime

 

 

DateTime

1..1

OBReadStatement/Data/Statement/StatementDateTime/DateTim

Date and time associated with the date time type.

DateTime

 

 

Type

1..1

OBReadStatement/Data/Statement/StatementDateTime/Type

 

Date time type, in a coded form.

String

Enum: (Indicative)

  • BH.OBF.BalanceTransferPromoEnd

  • BH.OBF.DirectDebitDue

  • BH.OBF.LastPayment

  • BH.OBF.LastStatement

  • BH.OBF.NextStatement

  • BH.OBF.PaymentDue

  • BH.OBF.PurchasePromoEnd

  • BH.OBF.StatementAvailable

 

StatementRate

0..n

OBReadStatement/Data/Statement/StatementRate


Set of elements used to provide details of a generic rate related to the statement resource.

 

OBReadStatement/Data/Statement/StatementRate

 

 

Rate

1..1

OBReadStatement/Data/Statement/StatementRate/Rate

 

Rate associated with the statement rate type.

String

 

^(-?\d{1,3}){1}(.\d{1,4}){0,1}$

Type

1..1

OBReadStatement/Data/Statement/StatementRate/Type

Statement rate type, in a coded form.

String

Enum: (Indicative)

  • BH.OBF.AnnualBalanceTransfer

  • BH.OBF.AnnualBalanceTransferAfterPromo

  • BH.OBF.AnnualBalanceTransferPromo

  • BH.OBF.AnnualCash

  • BH.OBF.AnnualPurchase

  • BH.OBF.AnnualPurchaseAfterPromo

  • BH.OBF.AnnualPurchasePromo

  • BH.OBF.MonthlyBalanceTransfer

  • BH.OBF.MonthlyCash

  • BH.OBF.MonthlyPurchase

 

StatementValue

0..n

OBReadStatement/Data/Statement/StatementValue

Set of elements used to provide details of a generic number value related to the statement resource.

OBReadStatement/Data/Statement/StatementValue

 

 

Value

1..1

OBReadStatement/Data/Statement/StatementValue/Value

Value associated with the statement value type.

String

 

 

Type

1..1

OBReadStatement/Data/Statement/StatementValue/Type

Statement value type, in a coded form.

String

Enum: (Indicative)

  • BH.OBF.AirMilesPoints

  • BH.OBF.AirMilesPointsBalance

  • BH.OBF.Credits

  • BH.OBF.Debits

  • BH.OBF.HotelPoints

  • BH.OBF.HotelPointsBalance

  • BH.OBF.RetailShoppingPoints

  • BH.OBF.RetailShoppingPointsBalance

 

 

...

5. Usage Example

...

5.1 Bulk

...

5.1.1Get Statements Request

GET /statements

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.2Get Statements Response

200 OK

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

Content-Type: application/json

{

  "Data": {

    "Statement": [

      {

        "AccountId": "00345897",

        "StatementId": "97813",

        "StatementReference": "005",

        "Type": "RegularPeriodic",

        "StartDateTime": "2020-03-14T09:24:04.952+03:00”,

        "EndDateTime": "2020-04-16T09:24:04.952+03:00”,

        "CreationDateTime": "2020-03-14T09:24:04.952+03:00”,

        "StatementDescription": [

          "March 2020 Statement" , "Bill Payment" ],

        "StatementFee": [

          {

            "Description": "Bill Payment",

            "CreditDebitIndicator": "Debit",

            "Type": "Bill Payment",

            "Frequency": "Monthly",

            "Amount": {

              "Amount": "1000",

              "Currency": "BHD"

            }

          }

        ],

        "StatementAmount": [

          {

            "CreditDebitIndicator": "Debit",

            "Type": "ClosingBalance",

            "Amount": {

              "Amount": "1000",

              "Currency": "BHD" }

          },

          {

            "CreditDebitIndicator": "Credit",

            "Type": "PreviousClosingBalance",

            "Amount": {

              "Amount": "1000",

              "Currency": "BHD"

            }

          }

          },

          {

        "AccountId": "00125865",

        "StatementId": "17873",

        "StatementReference": "008",

        "Type": "RegularPeriodic",

        "StartDateTime": "2020-03-14T09:24:04.952+03:00”,

        "EndDateTime": "2020-04-16T09:24:04.952+03:00”,

        "CreationDateTime": "2020-03-14T09:24:04.952+03:00”,

        "StatementDescription": [

          "March 2020 Statement", "Food expense"

        ],

        "StatementAmount": [

          {

            "CreditDebitIndicator": "Debit",

            "Type": "ClosingBalance",

            "Amount": {

              "Amount": "200",

              "Currency": "BHD"

            }

          },

       

          }

        ]

      }

    ]

  },"Links": {

    "Self": "www.TBC.com"

  },

  "Meta": {

    "TotalPages": 01,

    "FirstAvailableDateTime": "2020-03-14T09:10:17.596+03:00",

    "LastAvailableDateTime": "2020-03-16T09:10:17.596+03:00"

  }

}

...

5.2 Specific Account

...

5.2.1Get Account Statements Request

GET /accounts/00345897/statements

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.2Get Account Statements Response

200 OK

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

Content-Type: application/json

...