Overview

Statement service provides a couple of useful inquiry services about your anb account. These services expand to include balance inquiry, general statement, and end-of-day statements. General statement service supports MT942 and JSON formats. End-of-day (EOD) statements will be provided in MT940 format only.

 

Prerequisites

To use the Account Statement service, you need to do the following:

  • Register/Login to the anb Developer Portal.
  • Create an app.
  • You should now have a client id and secret associated with your app.
  • Get an access token from our auth service using your client id and secret.

Balance Service

This service can be used to get the currency and the cleared balance of an anb account.

 

Balance Request
Field Description
Account number anb account number

 

Balance Response
Field Description
Account number anb account number
Currency The currency of the account (ISO format)
Cleared balance The cleared balance of the account

 

General Statement Service

This service can be used to get the account's statement between two periods. Additionally, the account's opening and closing balance between these two periods will be provided.

 

 

General Statement Request
Field Description Required Note
Account number anb account number Yes  
From date From date (YYYY-MM-DD) Yes Pass today date to inquire about intra-day statement
To date To date (YYYY-MM-DD) Yes Pass today date to inquire about intra-day statement
Max Maximum records per page to be returned in the response. No.
Default: 20.
Maximum accepted value: 20
Type The format to be returned in the response

No.
Default:

MT942.

Enum [JSON, MT942]
Offset Used for pagination No  

 

General Statement Response
Field Description Always Note
Account number anb account number Yes  
From date From date (YYYY-MM-DD) Yes  
To date To date (YYYY-MM-DD) Yes  
Number of records Number of transactions returned in the page Yes  
Completed Boolean flag to mark if statement between the passed two periods is complete Yes Enum [JSON, MT940]
Offset Offset to be used for pagination No Re-send it in the next request to fetch the next page of transactions
Brought forward balance Amount and currency code for brought forward balance No  
Opening cleared balance Amount for brought opening clearance balance No  
Closing balance Amount for brought closing clearance balance of the page No Note that this value doesn't represent the closing balance of the account on "to-date" passed in the request. It represents the closing balance on that page. In case "completed" flag is marked as true, then it does reflect the real closing balance.
Statement Data of statement (either in MT942 or JSON format) No  
Statement/Data Data of statement in string for MT942 format No Returned only in case the format is MT942
Statement/Transactions Array of statements for JSON format No Returned only in case the format is JSON

 

JSON Format
Field Description Always Versions
Unique Id Transaction unique ID No All
Post date Transaction posting date No All
Posting time Transaction posting time No All
Value date Transaction value date No All
Type Transaction type. Refer to appendix A No All
Amount Amount and currency code for transaction amount No All
Narrative Transaction narratives No All
Reference number Transaction reference number No All
Counter Transaction counter No All
Statement flag Transaction statement flag No All
Source account number Source account number No All
POI number Personnel Office Identifier (National Id, CR number, etc ..) No All
Particular transaction type Transaction part type (CREDIT, DEBIT) No All
Particular transaction serial number Transaction serial number No All
Running balance Amount and currency code for running balance No All
Ordering Party Originator Name No V2
Beneficiary Name Beneficiary Name No V2
Bank Originator Bank No V2
Iban Beneficiary/Originator IBAN No V2
SAMA narrative SAMA narrative No All
Network Network
01: ANB
02: Local (SARIE or IPS)
03: SWIFT
No All
Channel Channel (ANB-SARIE-IPS-SWIFT) No V2
Network account number Source account number in case network is not ANB No All
Particulars code Transaction particulars code No All
Category Transaction category No All
Subcategory Transaction sub-category No All

 

MT942 Format
Tag Description Sample
:20: Statement reference number :20:RPMS-210530144352
:25: anb account number :25:0108050053560021
:28C: Statement sequence number :28C:150/001
:60F: Opening balance
[1!a(C for credit, D for debit)][YYMMDD(from date)][3!a(currency)][15d (amount)]
:60F:C210101SAR1000,50
The opening balance on 2021-01-01 is 1000.50

:60F:D210223USD1000,50
The opening balance on 2021-02-23 is -1000.50 USD
:61: Statement line
[YYMMDD(value date)][MMDD(posting date)][1!a(C for credit, D for debit)][15d (amount)][1!a3!c(4-char transaction code in appendix B)][35!a(narrative 2)]//[35!a(narrative 1)]
:61:2101020101D910,00NTRF21003551//anb transfer
A debit transfer with value date 2021-01-02 posted on 2021-01-01 with narrative 1 (anb transfer) and narrative 2 (21003551)

:61:2102030101C110,15NTRN123456//Credit transfer
A credit fee transfer with value date 2021-02-03 posted on 2021-01-01 with narrative 1 (Credit transfer) and narrative 2 (123456)
:86: Statement enrichment line :86:SDC123456
:62F: Closing balance
[1!a(C for credit, D for debit)][YYMMDD(from date)][3!a(currency)][15d (amount)]
:62F:D210528SAR97500,00
the closing balance on 2021-05-28 is 97500,00

 

MT942 Format V2
Tag Description Sample
:20: Statement reference number :20:RPMS-210530144352
:25: anb account number :25:0108050053560021
:28C: Statement sequence number :28C:150/001
:60F: Opening balance
[1!a(C for credit, D for debit)][YYMMDD(from date)][3!a(currency)][15d (amount)]
:60F:C210101SAR1000,50
The opening balance on 2021-01-01 is 1000.50

:60F:D210223USD1000,50
The opening balance on 2021-02-23 is -1000.50 USD
:61: Statement line
[YYMMDD(value date)][MMDD(posting date)][1!a(C for credit, D for debit)][15d (amount)][1!a3!c(4-char transaction code in appendix B)][35!a(narrative 2)]//[35!a(narrative 1)]
:61:2101020101D910,00NTRF21003551//anb transfer
A debit transfer with value date 2021-01-02 posted on 2021-01-01 with narrative 1 (anb transfer) and narrative 2 (21003551)

:61:2102030101C110,15NTRN123456//Credit transfer
A credit fee transfer with value date 2021-02-03 posted on 2021-01-01 with narrative 1 (Credit transfer) and narrative 2 (123456)
:86:

Statement enrichment line
ORDP: ordering party
BENM: beneficiary name
NTWRK: payment network (ANB, SARIE, IPS, SWIFT, SADAD .. etc)
BANK: ordering bank
IBAN: beneficiary/originator IBAN
NAR3: narrative 3
EXCH: exchange rate
CBS: anb transaction reference
TNXT: transaction type. Refer to appendix A
POINUM: originator NIN (for incoming anb payment only)

:86:/ORDP/Khaled Saeed
/BENM/Ahmed Abdullah
/NTWRK/IPS/BANK/Alrajhi Bank/IBAN/SA95800001186055568301777
/NAR3/SA9580000118608010301777
/EXCH/1/CBS/SDC722834/TNXT/56
/POINum/1005878988

Ordering party: Khaled Saeed
Beneficiary: Ahmad Abdullah
Network: IPS
Bank: Alrajhi Bank
IBAN: SA95800001186055568301777
Narrative 3: SA95800001186055568301777
Exchange rate: 1
CBS: SDC722834
Transaction type: 56
POI Number:  1005878988

:62F: Closing balance
[1!a(C for credit, D for debit)][YYMMDD(from date)][3!a(currency)][15d (amount)]
:62F:D210528SAR97500,00
the closing balance on 2021-05-28 is 97500,00

 

Statement Pagination In Depth

The response of the general statement service returns an offset to be used to fetch the next page. In case offset is not sent, the service will always return the first 20 transactions posted between from-date and to-date specified in the request. This is because account transactions will always be sorted in ascending order.

Scenario 1: From-date and to-date are before today date

The first request sent from the customer will have no offset. The service will return the first 20 transactions along with the offset and completion flag. If the list is not complete, you need to send another request with the same from-date and to-date with the offset provided in the last response. The service will return the following 20 transactions. Repeat that until completion flag is marked as true.

.

Scenario 2: From-date and to-date are today date

 

Since "offset" is a query parameter and contains some spaces, make sure to encode the URL before conducting the request.

End of Day Statement Service

End-of-day (EOD) statement service provides more details about all transactions occurred on a certain account on a particular date. Also, it provides the opening and closing balance of the account on that date. EOD statement supports MT940 standard format as of now. As part of Notification service, EOD statements can be pushed to your system once generated.

In case your ERP system supports English characters only, you need to inform anb to configure that for your accounts. This is because some EOD statements' content might contain Arabic characters (narrative 1, 2, or 3).

 

scenraio1
Scenario 1 - Old from-date and to-date