Direct Debits

1. Version Control

Version

Date

Description of Changes

Bahrain OBF v1.0.0

28th Oct 2020

Initial Release

2.  Overview

The direct-debits resource is used by an AISP to retrieve the direct debits for a specific account identified by AccountId or to retrieve direct debits for all accounts that the user/customer has consented to.

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

Parameters

Request Object

Response Object

3.1

direct-debits

GET

GET /accounts/{AccountId}/direct-debits

Conditional

accounts

Authorisation Code

No

 

 

OBReadDirectDebit

3.2

direct-debits

GET

GET /direct-debits

Optional

accounts

Authorisation Code

No

Pagination

 

OBReadDirectDebit

3.1 GET /accounts/{AccountId}/direct-debits

An ASPSP must provide this endpoint for AISPs to retrieve the direct-debits for a specific account identified by AccountId.

3.2 GET /direct-debits

An ASPSP may provide this endpoint for AISPs to retrieve direct-debits for all accounts that the user/customer has consented to. This will retrieve the direct-debit resources for all authorised accounts linked to the account-request.

4.  Data Models

4.1 OBReadDirectDebit

4.1.1 Resource Definition

A resource that contains a set of elements that describes the list of direct debits that have been set up on a specific account (AccountId). An account (AccountId) may have no direct debits set up, or may have multiple direct debits set up.

4.1.2 UML Diagram

 

4.1.3 Permission Codes

The resource requires ReadDirectDebits permission. The resource response payload does not differ depending on the permissions granted.

4.1.4 Data Dictionary

Name

Occurrence

XPath

Enhanced Definition

Class/ Datatype

Codes

Pattern

OBReadDirectDebit

 

OBReadDirectDebit

 

OBReadDirectDebit

 

 

Data

1..1

OBReadDirectDebit/Data

 

OBReadDirectDebit/Data

 

 

DirectDebit

0..n

OBReadDirectDebit/Data/DirectDebit

Account to or from which a cash entry is made

OBReadDirectDebit/Data/DirectDebit

 

 

AccountId

1..1

OBReadDirectDebit/Data/DirectDebit/AccountId

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

String

 

 

DirectDebitId

0..1

OBReadDirectDebit/Data/DirectDebit/DirectDebitId

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

String

 

 

MandateIdentification

0..1

OBReadDirectDebit/Data/DirectDebit/MandateIdentification

Direct Debit reference

String

 

 

DirectDebitStatusCode

0..1

OBReadDirectDebit/Data/DirectDebit/DirectDebitStatusCode

Specifies the status of the direct debit in code form

String

Enum:

  • Active

  • Inactive

 

Name

0..1

OBReadDirectDebit/Data/DirectDebit/Name

Name of Service User

String

 

 

PreviousPaymentDateTime

0..1

OBReadDirectDebit/Data/DirectDebit/PreviousPaymentDateTime

Date of most recent direct debit collection

DateTime

 

 

Frequency

0..1

OBReadDirectDebit/Data/DirectDebit/Frequency

Regularity with which direct debit instructions are to be created and processed

String

Enum:

  • BH.OBF.Annual

  • BH.OBF.Daily

  • BH.OBF.Fortnightly

  • BH.OBF.HalfYearly

  • BH.OBF.Monthly

  • BH.OBF.NotKnown

  • BH.OBF.Quarterly

  • BH.OBF.Weekly

 

PreviousPaymentAmount

0..1

OBReadDirectDebit/Data/DirectDebit/PreviousPaymentAmount

The amount of the most recent direct debit collection

OBReadDirectDebit/Data/DirectDebit/PreviousPaymentAmount

 

 

Amount

0..1

OBReadDirectDebit/Data/DirectDebit/PreviousPaymentAmount/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

0..1

OBReadDirectDebit/Data/DirectDebit/PreviousPaymentAmount/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}$

SupplementaryData

0..1

OBReadDirectDebit/Data/DirectDebit/PreviousPaymentAmount/SupplementaryData

Additional information that can not be captured in the structured fields and/or any other specific block

OBSupplementaryData

 

 

5.  Usage Example

5.1 Bulk

5.1.1 Get Direct Debits Request

GET /direct-debits

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 Get Direct Debits Response

200 OK

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

Content-Type: application/json

{

  "Data": {

    "DirectDebit": [

      {

        "AccountId": "00345897",

        "DirectDebitId": "2257",

        "MandateIdentification": "Instalment",

        "DirectDebitStatusCode": "Active",

        "Name": "Mohammed Ahmed Abdulla",

        "PreviousPaymentDateTime": "2020-03-24T09:31:55.590+03:00”,

        "Frequency": "Monthly",

        "PreviousPaymentAmount": {

          "Amount": "1000",

          "Currency": "BHD"

        }

      },

      {

        "AccountId": "00178956",

        "DirectDebitId": "1567",

        "MandateIdentification": "Investment",

        "DirectDebitStatusCode": "Active",

        "Name": "Ali Hassan Mohammed",

        "PreviousPaymentDateTime": "2020-03-24T09:31:55.590+03:00”,

        "Frequency": "Monthly",

        "PreviousPaymentAmount": {

          "Amount": "10000",

          "Currency": "BHD"

        }

      }

    ]

  },

 "Links": {

    "Self": "www.TBC.com"

  },

  "Meta": {

    "TotalPages": 01,

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

    "LastAvailableDateTime": "2020-03-24T09:10:17.596+03:00”

  }

}

5.2 Specific Account

5.2.1 Get Account Direct Debits Request

GET /accounts/00345897/direct-debits

Authorisation: Bearer 4ZopnFZFKjr5zDsicSQpLL

x-fapi-auth-date: Tue, 24 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/jsonn

5.2.2  Get Account Direct Debits Response

200 OK

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

Content-Type: application/json

  "Data": {

    "DirectDebit": [

      {

        "AccountId": "00345897",

        "DirectDebitId": "2257",

        "MandateIdentification": "Instalment",

        "DirectDebitStatusCode": "Active",

        "Name": "Mohammed Ahmed Abdulla",

        "PreviousPaymentDateTime": "2020-03-24T09:31:55.590+03:00”,

        "Frequency": "Monthly",

        "PreviousPaymentAmount": {

          "Amount": "1000",

          "Currency": "BHD"

        }

      }

    ]

  },

 "Links": {

    "Self": "www.TBC.com"

  },

  "Meta": {

    "TotalPages": 01,

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

    "LastAvailableDateTime": "2020-03-24T09:10:17.596+03:00”

  }

}

 

 

CENTRAL BANK OF BAHRAIN © 2020