ClearBank

Account reporting

Statements

You can request a statement containing all payment activity across your ClearBank accounts for a completed business day, also referred to as a 'Bank to Customer Statement'. The statement is delivered in an ISO 20022 compliant XML file known as camt.053 (Cash Management message).

The statement is populated with transaction activity across all of your accounts within a given time range. Note that a transaction must be in a Settled state to be included. The startDateTime and endDateTime in your statement request must:

  • be less than or equal to 25 hours apart
  • be within the last 6 months (for example, on 1 July 2024, you can request transaction data back to and including 1 January 2024)
  • be in the past

How to request and download your statement

Use the POST /v1/statementrequests endpoint to request the generation of a camt.053 statement for a specific time range.

The process is shown in this message flow diagram:



Image showing camt.053 statement message flow


Once the statement has been generated, you will receive a Statements Ready For Download webhook containing a unique MessageId and a TotalPages value. The statement is divided into pages and each page is assigned a PageNumber value. If a page reaches the maximum number of accounts (5000), the statement is continued on a new page. Each page is a complete XML file starting with a group header.

To download a statement page, use the GET /v1/statements/{messageId} and provide the unique MessageID contained in the webhook and the PageNumber you wish to download. You can only download one statement page per request. If the generated statement contains multiple pages and you wish to download them all, repeat the GET call with an incremented page number until:

  • PageNumber is equal to the TotalPages value in the webhook, or,
  • LastPageIndicator in the Group Header of the XML is true

We'll respond to the GET statement call with a 200 OK response containing an XMLObject. This object contains the requested page of the camt.053 statement in XML format. The start of the statement page can be identified by the XML group header which will be in this format:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.053.001.11">
<BkToCstmrStmt>
<GrpHdr>
<MsgId>1234567891234567891234567891234</MsgId>
<CreDtTm>2023-06-22T04:59:59.000Z</CreDtTm>
<MsgRcpt>
<Nm>Institution Name</Nm>
<Id>
<OrgId>
<Othr>
<Id>12345678901039488545</Id>
</Othr>
</OrgId>
</Id>
</MsgRcpt>
<MsgPgntn>
<PgNb>1</PgNb>
<LastPgInd>Yes</LastPgInd>
</MsgPgntn>
</GrpHdr>

Request a statement for all accounts

post/v1/statementrequests

Request a Camt.053 statement to be generated.

POSTs a statement generation request by specifying the start and end of the statement in UTC.

Parameters

  • Authorization string, header, Required

    Your API Token, retrieved from the web portal.

  • DigitalSignature string, header, Required

    Signed hash of the body of the request. The hash is signed by your private key.

  • X-Request-Id string, header, Required

    A unique identifier for the request.

Request Payload (application/json)

  • startDateTimeUtc string

    The statement includes transactions after this time in the format yyyy-MM-ddTHH:mm:ssZ.

  • endDateTimeUtc string

    The statement includes transactions before this time in the format yyyy-MM-ddTHH:mm:ssZ.

request

{
"startDateTimeUtc": "string",
"endDateTimeUtc": "string"
}
Code copied

Response (application/json)

  • 202 Accepted
  • 422 Client Error

Client Error

{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"errors": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"property1": null,
"property2": null
}
Code copied

Associated Webhooks

Request statement pages

get/v1/statements/{messageId}

Retrieve a Camt.053 statement which has been generated.

GETs a generated statement in Camt.053 format by specifying the MessageId property of the statement and a page number.

Parameters

  • Authorization string, header, Required

    Your API Token, retrieved from the web portal.

  • messageId string, path, Required

    The statement ID as per the MsgId field of the Camt.053 specification; provided as the MessageId property in the Statements.ReadyForDownload webhook. Pattern: (CAMT053_)[0-9]{8}[_][0-9]{8}[_]\w{8}

  • pageNumber integer, query, Required

    The requested page number; should be no greater than the TotalPages property of the Statements.ReadyForDownload webhook.

Response (application/json)

  • 200 OK (Contains statement in XML)
  • 400 Bad Request
  • 404 Not Found

Bad Request

{
"type": "string",
"title": "string",
"status": 0,
"detail": "string",
"instance": "string",
"errors": {
"property1": [
"string"
],
"property2": [
"string"
]
},
"property1": null,
"property2": null
}
Code copied

Key camt.053 fields

There are many fields in camt.053 messages as defined in the ISO 20022 Standard. This table provides information on the most relevant fields within the messages and their associated conversions.

Group header

ElementData typeMin lengthMax lengthLevelMandatory/OptionalDescription
Group HeaderN/AN/AN/A+GrpHdrMandatoryCommon information for the message. It only occurs once.
MessageIdentificationString135+GrpHdr
++MsgId
MandatoryPoint to point reference, as assigned by ClearBank, and sent to the account owner or the party authorised to receive the message, to unambiguously identify the message. The Message Identification has following pattern:
<service> - Service name = CAMT053
<date> - Date in the format YYYYMMDD
<time> - Time in the format hhmmssMs
<random alphanumeric string> - 8 characters random alphanumeric string
Remark: ‘_’ underscore segregates the elements
CreationDateTimeDateTimeN/AN/A+GrpHdr
++CreDtTm
MandatoryDate and time when the message was created, time in UTC format (YYYY-MM-DDThh:mm:ss.sssZ)
MessagePaginationN/AN/AN/A+GrpHdr
++MsgPgntn
OptionalProvides details on the page number of the message.
PageNumberNumeric15+GrpHdr
++MsgPgntn
+++PgNb
OptionalThe Page Number, beginning with "1", is used to count the number of messages in a statement.
LastPageIndicatorIndicatorN/AN/A+GrpHdr
++MsgPgntn
+++LastPgInd
OptionalIndicates the last page. True or False.
Message RecipientN/AN/AN/A+GrpHdr
++MsgRcpt
OptionalClearBank client authorised by the account owner to receive information about movements on the account.
NameString1140+GrpHdr
++MsgRcpt
+++Nm
OptionalName of ClearBank's client.

Statement

ElementData typeMin lengthMax lengthLevelMandatory/OptionalDescription
IdentificationString135+GrpHdr
++MsgRcpt
+++Id
++++OrgId
+++++Othr
++++++Id
OptionalYour Institution ID
IdentificationString135+Stmt
++Id
MandatoryUnique ID per statement
FromDateTimeDateTimeN/AN/A+Stmt
++FrToDt
++FrDtTm
OptionalDate and time at which the period starts.
ToDateTimeDateTimeN/AN/A+Stmt
++FrToDt
++FrDtTm
OptionalDate and time at which the period ends.
IBANString2234+Stmt
++Acct
+++Id
++++IBAN
OptionalInternational Bank Account Number (IBAN) - identifier used internationally by financial institutions to uniquely identify the account of a customer. ISO 13616.
CodeEnum14+Stmt
++Acct
+++Tp
++++Cd
OptionalAccount type, in a coded form. ExternalCashAccountType1Code, default to CACC.
NameString1140+Stmt
++Acct
+++Ownr
++++Nm
OptionalName by which a party is known and which is usually used to identify that party.
BICFIString811+Stmt
++Acct
+++Svcr
++++FinInstnId
+++++BICFI
OptionalCode allocated to a financial institution by the ISO 9362 Registration Authority (ClearBank's BIC).
NameString1140+Stmt
++Acct
+++Svcr
++++FinInstnId
+++++Nm
OptionalName by which an agent is known and which is usually used to identify that agent (ClearBank)
CodeString14+Stmt
++Bal
+++Tp
++++CdOrPrtry
+++++Cd
MandatoryBalance type, in a coded format. OPBD or CLBD (Opening or Closing Balance)
AmountString018,5+Stmt
++Bal
+++Amt
MandatoryAmount of money of the cash balance e.g. <Amt Ccy="GBP">100.00</Amt>
CreditDebitIndicatorEnum44+Stmt
++Bal
+++CdtDbtInd
MandatoryIndicates whether the balance is a credit or a debit balance. A zero balance is considered to be a credit balance. CRDT or DBIT.
Currency ExchangeN/AN/AN/A+Stmt
++Ntry
+++AmtDtls
++++InstdAmt
+++++CcyXchg
OptionalSet of elements used to provide details on the currency exchange
Source CurrencyEnum33+Stmt
++Ntry
+++AmtDtls
++++InstdAmt
+++++CcyXchg
++++++SrcCcy
OptionalCurrency from which an amount is to be converted in a currency conversion.
Target CurrencyEnum33+Stmt
++Ntry
+++AmtDtls
++++InstdAmt
+++++CcyXchg
++++++TrgtCcy
OptionalCurrency into which an amount is to be converted in a currency conversion.
Exchange RateNumeric011 (10 Fraction digits)+Stmt
++Ntry
+++AmtDtls
++++InstdAmt
+++++CcyXchg
++++++XchgRate
OptionalFactor used to convert an amount from one currency into another. This reflects the price at which one currency was bought with another currency.
CodeEnum14+Stmt
++Ntry
+++Sts
++++Cd
OptionalEntry status, in a coded form, always BOOK
Account Servicer ReferenceString135+Stmt
++Ntry
+++AcctSvcrRef
OptionalUnique reference as assigned by the account servicing institution to unambiguously identify the entry (ClearBank's TransactionId)
EndToEndIdentificationString135+Stmt
++Ntry
+++NtryDtls
++++TxDtls
+++++Refs
++++++EndToEndId
OptionalUnique identification, as assigned by the initiating party, to unambiguously identify the transaction. This identification is passed on, unchanged, throughout the entire end-to-end chain (EndtoEndId)
InstructionIdentificationString135+Stmt
++Ntry
+++NtryDtls
++++TxDtls
+++++Refs
++++++InstrId
OptionalUnique identification, as assigned by an instructing party for an instructed party, to unambiguously identify the instruction. ActualEndToEndTransactionId for GBP payments else SchemeEndToEndId for MCCY
Ultimate DebtorN/AN/AN/A+Stmt
++Ntry
+++NtryDtls
++++TxDtls
+++++RltdPties
++++++UltmtDbtr
OptionalParty that initiated the payment that is reported in the entry.
Ultimate CreditorN/AN/AN/A+Stmt
++Ntry
+++NtryDtls
++++TxDtls
+++++RltdPties
++++++UltmtCdtr
OptionalUltimate party to which an amount of money is due.