Versions Compared

Key

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


Page Properties
hiddentrue


Resourcedirect-debits
Endpoints

GET /accounts/{AccountId}/direct-debits

GET /direct-debits

Mandatory?

Conditional

Optional

SortOrder06


Table of Contents
outlinetrue
stylenone

Version Control

VersionDateAuthorComments
3.0-draft118-Apr-2018OB R/W API TeamInitial draft for Version 3.0
3.0-draft4 OB R/W API Team

UML diagram update for Amount field, and data dictionary update to reflect UML diagram update.

Clarified use of Idempotency Key in endpoint table.

3.0-draft5 OB R/W API TeamUpdated examples to change UTC to GMT to be in line with https://tools.ietf.org/html/rfc7231#page-66
3.0-draft6/rc1 OB R/W API Team

Draft6 Changes:

  • For consistency - added a Permission Codes section to clarify expected behaviour.
3.0-draft7 OB R/W API TeamNo Change
3.0-RC2 OB R/W API TeamNo Change
3.0-RC3 OB R/W API TeamNo Change
3.0 OB R/W API TeamThis is the baseline version. No change from RC3.

Endpoints

Endpoints for the resource - and available methods.


ResourceHTTP OperationEndpointMandatory?ScopeGrant TypeIdempotency KeyParametersRequest ObjectResponse Object
1direct-debitsGETGET /accounts/{AccountId}/direct-debitsConditionalaccountsAuthorization CodeNo



OBReadDirectDebit1
2direct-debitsGETGET /direct-debitsOptionalaccountsAuthorization CodeNo

Pagination


OBReadDirectDebit1

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.

GET /direct-debits

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

Data Model

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.

UML Diagram

Permission Codes

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

Data Dictionary

NameOccurrenceXPathEnhancedDefinitionClassCodesPattern
OBReadDirectDebit1
OBReadDirectDebit1
OBReadDirectDebit1

Data1..1OBReadDirectDebit1/Data
OBReadDataDirectDebit1

DirectDebit0..nOBReadDirectDebit1/Data/DirectDebitAccount to or from which a cash entry is made.OBDirectDebit1

AccountId1..1OBReadDirectDebit1/Data/DirectDebit/AccountIdA unique and immutable identifier used to identify the account resource. This identifier has no meaning to the account owner.Max40Text

DirectDebitId0..1OBReadDirectDebit1/Data/DirectDebit/DirectDebitIdA unique and immutable identifier used to identify the direct debit resource. This identifier has no meaning to the account owner.Max40Text

MandateIdentification1..1OBReadDirectDebit1/Data/DirectDebit/MandateIdentificationDirect Debit reference. For AUDDIS service users provide Core Reference. For non AUDDIS service users provide Core reference if possible or last used reference.Max35Text

DirectDebitStatusCode0..1OBReadDirectDebit1/Data/DirectDebit/DirectDebitStatusCodeSpecifies the status of the direct debit in code form.OBExternalDirectDebitStatus1CodeActive
Inactive

Name1..1OBReadDirectDebit1/Data/DirectDebit/NameName of Service User.Max70Text

PreviousPaymentDateTime0..1OBReadDirectDebit1/Data/DirectDebit/PreviousPaymentDateTimeDate of most recent direct debit collection.ISODateTime

PreviousPaymentAmount0..1OBReadDirectDebit1/Data/DirectDebit/PreviousPaymentAmountThe amount of the most recent direct debit collection.OBActiveOrHistoricCurrencyAndAmount

Amount1..1OBReadDirectDebit1/Data/DirectDebit/PreviousPaymentAmount/AmountA number of monetary units specified in an active currency where the unit of currency is explicit and compliant with ISO 4217.ActiveCurrencyAndAmount_SimpleType

Currency1..1OBReadDirectDebit1/Data/DirectDebit/PreviousPaymentAmount/CurrencyA 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".ActiveOrHistoricCurrencyCode^[A-Z]{3,3}$


Usage Examples

Specific Account

Request

Code Block
languagejs
themeMidnight
titleGet Accounts Direct Debits Request
linenumberstrue
GET /accounts/22289/direct-debits HTTP/1.1
Authorization: Bearer Az90SAOJklae
x-fapi-financial-id: OB/2017/001
x-fapi-customer-last-logged-time:  Sun, 10 Sep 2017 19:43:31 GMT
x-fapi-customer-ip-address: 104.25.212.99
x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d
Accept: application/json


Response

Code Block
languagejs
themeMidnight
titleGet Accounts Direct Debits Response
linenumberstrue
HTTP/1.1 200 OK
x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d
Content-Type: application/json

{
  "Data": {
    "DirectDebit": [
      {
        "AccountId": "22289",
        "DirectDebitId": "DD03",
        "MandateIdentification": "Caravanners",
        "DirectDebitStatusCode": "Active",
        "Name": "Towbar Club 3 - We Love Towbars",
        "PreviousPaymentDateTime": "2017-04-05T10:43:07+00:00",
        "PreviousPaymentAmount": {
          "Amount": "0.57",
          "Currency": "GBP"
        }
      }
    ]
  },
  "Links": {
    "Self": "https://api.alphabank.com/open-banking/v2.0/accounts/22289/direct-debits/"
  },
  "Meta": {
    "TotalPages": 1
  }
}


Bulk

Request

Code Block
languagejs
themeMidnight
titleGet Direct Debits Request
linenumberstrue
GET /direct-debits HTTP/1.1
Authorization: Bearer Az90SAOJklae
x-fapi-financial-id: OB/2017/001
x-fapi-customer-last-logged-time:  Sun, 10 Sep 2017 19:43:31 GMT
x-fapi-customer-ip-address: 104.25.212.99
x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d
Accept: application/json


Response

Code Block
languagejs
themeMidnight
titleGet Direct Debits Response
linenumberstrue
HTTP/1.1 200 OK
x-fapi-interaction-id: 93bac548-d2de-4546-b106-880a5018460d
Content-Type: application/json

{
  "Data": {
    "DirectDebit": [
      {
        "AccountId": "22289",
        "DirectDebitId": "DD03",
        "MandateIdentification": "Caravanners",
        "DirectDebitStatusCode": "Active",
        "Name": "Towbar Club 3 - We Love Towbars",
        "PreviousPaymentDateTime": "2017-04-05T10:43:07+00:00",
        "PreviousPaymentAmount": {
          "Amount": "0.57",
          "Currency": "GBP"
        }
      },
      {
        "AccountId": "31820",
        "DirectDebitId": "DD77",
        "MandateIdentification": "Golfers",
        "DirectDebitStatusCode": "Active",
        "Name": "Golf Club",
        "PreviousPaymentDateTime": "2017-05-06T09:00:00+00:00",
        "PreviousPaymentAmount": {
          "Amount": "22.30",
          "Currency": "GBP"
        }
      }
    ]
  },
  "Links": {
    "Self": "https://api.alphabank.com/open-banking/v2.0/direct-debits/"
  },
  "Meta": {
    "TotalPages": 1
  }
}