Account Statement

Retrieve single or multiple bank account balances

Singleview B2B API services Account statement allows the users with the access to request and retrieve specific user bank account statements. Corporate Customers can use this B2B service to get unaltered and raw account statement information that includes all the majorly required information.

📘

Mandatory information

  • The user must provide the valid credentials in the header
  • Encrypted and valid Signature and an active "Access Token"
  • Request format as specified with all the mandatory details with appropriate request tags

🌐Domain details

End-point details

EndpointHTTP OperationGrant typeService validations
/api/v1/account/statement/940POSTThe header should include:
1. clientId
2. clientCode
3. Access Token
4. SVReferenceID
5. CompanyId
- Signature verification
- IPs Whitelisting
- Token Validation
- Valid/Active B2B company code
- Authorized Account
- Statement Date should not be current/Future Date
- While requesting the statement date should not be more than 1 day
- Statement Date should not be prior to 30 days

Sample request

curl --location 'https://sandboxapi.onesingleview.com/api/v1/account/statement/940' \
--header 'clientsecret: Enter-Client-Secret' \
--header 'clientid: Enter-Client-Id' \
--header 'SVReferenceID: Enter-SV-Reference-Id' \
--header 'Device: Device-type' \
--header 'DateTimeStamp: YYYY-MM-DDTHH:MM:SS' \
--header 'CompanyId: Enter-Company-Id' \
--header 'BaseCurrency: SAR' \
--header 'Authorization: Bearer <Enter-Token>' \
--header 'Content-Type: application/json' \
--data '{
	"Message": {
    "OSVAccountStatementRequest": {
        "FromDate": "YYYY-MM-DDTHH:MM:SS",
        "ToDate": "YYYY-MM-DDTHH:MM:SS",
        "DateTimeStamp": "YYYY-MM-DDTHH:MM:SS",
        "TransactionType": "Enter_Transaction_Type",
        "OSVPaymentInfoMessage": [
            {
                "OSVPaymentInfoRequest": {
                    "BankCode": "Enter_Bank_Code",
                    "CompanyCode": "Enter_Company_Code",
                    "AccountNumbers": {
                        "AccountNumber": [
                            {
                                "AccNumber": "Account_Number"
                            }
                        ]
                    }
                }
            }
        ]
    }
},
	"Signature": "Enter_Signature_String"
}

Request description:

JSON TagDescriptionData type
Message
Mandatory
Header information (client credentials)Object & String
OSVAccountStatementRequest
Mandatory
Root nodeObject
FromDate
Mandatory
From dateString
ToDate
Mandatory
To dateString
DateTimeStamp
Mandatory
Enquiry DateString
TransactionType
Mandatory
Always it should be “940”String
OSVPaymentInfoMessage
Mandatory
This tag contains multiple banks requestsObject
OSVPaymentInfoRequest
Mandatory
Element rootObject
BankCode
Mandatory
Name of the bank.
Ex: “ALRAJHI”, “SABB”
String
CompanyCode
Mandatory
Sender company code/Identifier provided by the bank during on-boardingString
AccountNumbers
Mandatory
Array of accountsArray of Strings
AccountNumber
Mandatory
Bank account numberString
Signature
Mandatory
Encrypted string obtained by processing request body with Private Key/Certificate through SHA-256 with RSA Algorithm (Crypto : JCE Sign)String

Sample responses

{
    "OSVAccoutStatementResponse": {
        "FromDate": "2023-02-12T00:00:00",
        "ToDate": "2023-02-12T23:59:59",
        "TransactionType": "940",
        "OSVPaymentInfoMessageResponse": [
            {
                "BankCode": "ANB",
                "CompanyCode": "Jazeera",
                "B2BUrn": "",
                "B2BAggrId": "",
                "B2BUserId": "",
                "StatusCode": "OK",
                "StatusDetail": "OK",
                "ResponseItemCount": "",
                "TotalOpeningBalance": 491959149.42,
                "TotalOpeningBalanceUSD": 0,
                "TotalOpeningBalanceAED": 0,
                "TotalOpeningBalanceGBP": 0,
                "TotalOpeningBalanceINR": 0,
                "TotalOpeningBalanceKWD": 0,
                "TotalOpeningBalanceBHD": 0,
                "TotalOpeningBalanceEUR": 0,
                "TotalClosingBalance": 491959795.67,
                "TotalClosingBalanceUSD": 0,
                "TotalClosingBalanceAED": 0,
                "TotalClosingBalanceGBP": 0,
                "TotalClosingBalanceINR": 0,
                "TotalClosingBalanceKWD": 0,
                "TotalClosingBalanceBHD": 0,
                "TotalClosingBalanceEUR": 0,
                "OSVPaymentInfoResponse": [
                    {
                        "StatusCode": "OK",
                        "StatusDetail": "OK",
                        "TransactionType": "940",
                        "SequenceNum": "",
                        "AccountNumber": "0108057386290014",
                        "ReceiptTime": "",
                        "ProcessStatus": "",
                        "TransactionData": {
                            "UniqueReference": "",
                            "RelatedReferenceNumber": "",
                            "AccountNumber": "0108057386290014",
                            "StatementNo": "",
                            "TransactionTime": "",
                            "CurrencyAmountCode": "",
                            "OpeningBalance": {
                                "DCMark": "",
                                "Date": "",
                                "Currency": "SAR",
                                "Amount": 491959149.42
                            },
                            "TransactionDetails": [
                                {
                                    "ValueDate": "230212",
                                    "EntryDate": "0212",
                                    "PostingTime": "",
                                    "DCMark": "C",
                                    "FundsCode": "",
                                    "Amount": 50,
                                    "TransactionType": "56",
                                    "IdentificationCode": "",
                                    "AccountOwnerReference": "68230212070856",
                                    "BankReference": "2967375840-تحويل بين حساباتي",
                                    "Description": "2967375840-تحويل بين حساباتيOwn account transfer68230212070856",
                                    "SourceAccount": "0108057386290052",
                                    "SourceID": "",
                                    "SourceAccountName": "2967375840-تحويل بين حساباتي"
                                },
                                {
                                    "ValueDate": "230212",
                                    "EntryDate": "0212",
                                    "PostingTime": "",
                                    "DCMark": "D",
                                    "FundsCode": "",
                                    "Amount": 6,
                                    "TransactionType": "56",
                                    "IdentificationCode": "",
                                    "AccountOwnerReference": "2000000294",
                                    "BankReference": "6296820270",
                                    "Description": "6296820270ANB to Local Banks transfer2000000294",
                                    "SourceAccount": "",
                                    "SourceID": "",
                                    "SourceAccountName": "6296820270"
                                },
                                {
                                    "ValueDate": "230212",
                                    "EntryDate": "0212",
                                    "PostingTime": "",
                                    "DCMark": "D",
                                    "FundsCode": "",
                                    "Amount": 6,
                                    "TransactionType": "56",
                                    "IdentificationCode": "",
                                    "AccountOwnerReference": "2000000294",
                                    "BankReference": "BT7296820276",
                                    "Description": "BT7296820276ANB to Local Banks transfer2000000294",
                                    "SourceAccount": "",
                                    "SourceID": "",
                                    "SourceAccountName": "BT7296820276"
                                },
                                {
                                    "ValueDate": "230212",
                                    "EntryDate": "0212",
                                    "PostingTime": "",
                                    "DCMark": "C",
                                    "FundsCode": "",
                                    "Amount": 1000,
                                    "TransactionType": "56",
                                    "IdentificationCode": "",
                                    "AccountOwnerReference": "69230212072522",
                                    "BankReference": "8063276811-شراء عن طريق الأونلاين",
                                    "Description": "8063276811-شراء عن طريق الأونلاينOnline purchase69230212072522",
                                    "SourceAccount": "0108057386290052",
                                    "SourceID": "",
                                    "SourceAccountName": "8063276811-شراء عن طريق الأونلاين"
                                },
                                {
                                    "ValueDate": "230212",
                                    "EntryDate": "0212",
                                    "PostingTime": "",
                                    "DCMark": "D",
                                    "FundsCode": "",
                                    "Amount": 6,
                                    "TransactionType": "56",
                                    "IdentificationCode": "",
                                    "AccountOwnerReference": "2000000294",
                                    "BankReference": "BT7296820350",
                                    "Description": "BT7296820350ANB to Local Banks transfer2000000294",
                                    "SourceAccount": "",
                                    "SourceID": "",
                                    "SourceAccountName": "BT7296820350"
                                },
                                {
                                    "ValueDate": "230212",
                                    "EntryDate": "0212",
                                    "PostingTime": "",
                                    "DCMark": "C",
                                    "FundsCode": "",
                                    "Amount": 100,
                                    "TransactionType": "56",
                                    "IdentificationCode": "",
                                    "AccountOwnerReference": "74230212074459",
                                    "BankReference": "8040097872-تحويل بين حساباتي",
                                    "Description": "8040097872-تحويل بين حساباتيDeposit to the wallet74230212074459",
                                    "SourceAccount": "0108057386290052",
                                    "SourceID": "",
                                    "SourceAccountName": "8040097872-تحويل بين حساباتي"
                                },
                                {
                                    "ValueDate": "230212",
                                    "EntryDate": "0212",
                                    "PostingTime": "",
                                    "DCMark": "C",
                                    "FundsCode": "",
                                    "Amount": 20,
                                    "TransactionType": "56",
                                    "IdentificationCode": "",
                                    "AccountOwnerReference": "75230212074756",
                                    "BankReference": "4956708890-تحويل بين حساباتي",
                                    "Description": "4956708890-تحويل بين حساباتيDeposit to the wallet75230212074756",
                                    "SourceAccount": "0108057386290052",
                                    "SourceID": "",
                                    "SourceAccountName": "4956708890-تحويل بين حساباتي"
                                },
                                {
                                    "ValueDate": "230212",
                                    "EntryDate": "0212",
                                    "PostingTime": "",
                                    "DCMark": "D",
                                    "FundsCode": "",
                                    "Amount": 505.75,
                                    "TransactionType": "56",
                                    "IdentificationCode": "",
                                    "AccountOwnerReference": "17191",
                                    "BankReference": "7969204623-مدفوعات تجارية",
                                    "Description": "7969204623-مدفوعات تجاريةB2B OUTGOING - 1719117191",
                                    "SourceAccount": "",
                                    "SourceID": "",
                                    "SourceAccountName": "7969204623-مدفوعات تجارية"
                                }
                            ],
                            "ClosingBalance": {
                                "DCMark": "",
                                "Date": "",
                                "Currency": "SAR",
                                "Amount": 491959795.67
                            },
                            "ClosingAvailableBalance": {
                                "DCMark": "",
                                "Date": "",
                                "Currency": "",
                                "Amount": ""
                            },
                            "Comment": "",
                            "TotalNumberOfDebits": "",
                            "TotalNumberOfCredits": ""
                        }
                    }
                ]
            }
        ]
    }
}

{
    "OSVAccoutStatementResponse": {
        "FromDate": "2023-02-12T00:00:00",
        "ToDate": "2023-02-12T23:59:59",
        "TransactionType": "940",
        "OSVPaymentInfoMessageResponse": [
            {
                "BankCode": "NCB",
                "CompanyCode": "OSV0001",
                "B2BUrn": "",
                "B2BAggrId": "",
                "B2BUserId": "",
                "StatusCode": "Failed",
                "StatusDetail": "Failed",
                "ResponseItemCount": "1",
                "TotalOpeningBalance": "",
                "TotalOpeningBalanceUSD": "",
                "TotalOpeningBalanceAED": "",
                "TotalOpeningBalanceGBP": "",
                "TotalOpeningBalanceINR": "",
                "TotalOpeningBalanceKWD": "",
                "TotalOpeningBalanceBHD": "",
                "TotalOpeningBalanceEUR": "",
                "TotalClosingBalance": "",
                "TotalClosingBalanceUSD": "",
                "TotalClosingBalanceAED": "",
                "TotalClosingBalanceGBP": "",
                "TotalClosingBalanceINR": "",
                "TotalClosingBalanceKWD": "",
                "TotalClosingBalanceBHD": "",
                "TotalClosingBalanceEUR": "",
                "OSVPaymentInfoResponse": [
                    {
                        "StatusCode": "Failed",
                        "StatusDetail": "Unauthorized to access the service",
                        "TransactionType": "940",
                        "SequenceNum": "",
                        "AccountNumber": "05100002696502",
                        "ReceiptTime": "",
                        "ProcessStatus": "",
                        "TransactionData": {
                            "UniqueReference": "",
                            "RelatedReferenceNumber": "",
                            "AccountNumber": "05100002696502",
                            "StatementNo": "",
                            "TransactionTime": "",
                            "CurrencyAmountCode": "",
                            "OpeningBalance": {
                                "DCMark": "",
                                "Date": "",
                                "Currency": "",
                                "Amount": ""
                            },
                            "TransactionDetails": [],
                            "ClosingBalance": {
                                "DCMark": "",
                                "Date": "",
                                "Currency": "",
                                "Amount": ""
                            },
                            "ClosingAvailableBalance": {
                                "DCMark": "",
                                "Date": "",
                                "Currency": "",
                                "Amount": ""
                            },
                            "Comment": "",
                            "TotalNumberOfDebits": "",
                            "TotalNumberOfCredits": ""
                        }
                    }
                ]
            }
        ]
    }
}

Response description

JSON TagDescriptionData type
OSVAccoutStatementResponseRoot nodeObject
FromDateFrom DateString
ToDateTo DateString
TransactionTypeAlways it should be “940”String
OSVPaymentInfoMessageResponseElement root containing response of every bankObject
BankCodeName of the bank
Ex: “ALRAJHI”, “SABB”
String
CompanyCodeSender company code/Identifier provided by the bank during on-boardingString
StatusCodeSuccess/FailedString
StatusDetailSuccess/FailedString
ResponseItemCountNo of the banks in the requestString
TotalOpeningBalanceTotal Opening BalanceString
TotalClosingBalanceTotal Closing BalanceString
OSVPaymentInfoResponseThis tag contains the status of the Bank AccountsObject
TransactionTypeAlways it should be “940”String
StatusCodeSuccess/FailedString
StatusDetailSuccess/Failed
SequenceNumCount of the accounts per the bankString
AccountNumberAccount NumberString
ReceiptTimeReceipt Time of the EnquiryString
ProcessStatus
TransactionDataElement rootString
UniqueReferenceStatement reference numberString
RelatedReferenceNumberString
AccountNumberAccount NumberString
StatementNoStatement NumberString
CurrencyAmountCodeString
OpeningBalanceRoot elementString
DCMarkCredit/Debit markString
DateDate of the credit and debit amountString
CurrencyAccount Currency. Maximum length of Currency should be 3. E.g. SARString
AmountAmountString
TransactionDetailsRoot element contains the statement of the accountString
ValueDateStatement Date Ex: 230213String
EntryDateStatement Date Ex: 0213String
DCMarkTransaction Credit/DebitString
FundsCodeString
AmountCredit/Debit AmountString
TransactionTypeS: Swift Transfer
N: Non Swift Transfer
F: First Advice
String
IdentificationCode
AccountOwnerReferenceAccount Owner Reference NumberString
BankReferenceBank Reference NumberString
DescriptionTransaction DescriptionString
SourceAccountSource AccountString
SourceIDSource IDString
SourceAccountNameSource Account NameString
CardTypeCard TypeString