Open BankingB2B SuiteERP Integration
GuidesChangelog
Menu

Categories

Open BankingB2B SuiteERP Integration


  • GENERAL INFORMATION

    • Documentation guide
    • Documentation guide
    • SingleView B2B Core APIs
    • SingleView Open Banking
    • Platform architecture
    • KSAOB standards
    • Security best practices
  • Getting started

    • Introduction
    • Become a User
    • Quick Lookup
  • GETTING STARTED

    • Integration guide
    • Become a user
    • Integration guide
    • Prerequisites for Sandbox
    • Developer console
    • Establishing secure connection
    • Establish secure connection
    • Authenticating your request
    • Generate access token
    • Making your first test api call
    • Make test raw data API call
    • Prerequisites for production
    • Make test data use case API call
    • Moving to production
  • Authentication

    • Generate Signature
  • ERP API Services

    • Configure API Account
    • Create Group & Company
    • Supplier Services
    • Account Services
    • Balance Enquiry
    • Statements
    • IBAN Validation
    • POS Transactions
  • CONSENT MANAGEMENT

    • Overview
    • Create a consent
    • Retrieve consent details
    • Revoke a consent
  • AUTHENTICATION

    • Header parameters
    • Obtain access token
    • Generate signature
  • Data APIs

    • Account statement
    • Balance enquiry
    • IBAN verification
    • POS transactions
    • Raw statement
  • Raw Data APIs

    • Introduction
    • View accounts
    • View balance
    • View transactions
    • Identify account holders (Parties)
    • Review direct debits
    • Review scheduled payments
    • Review standing orders
  • Payment APIs

  • DATA USE CASE APIS

  • SADAD

  • Plug-and-Play Integrations

    • Payly
  • RESOURCES

    • POR Details
    • Error codes
    • Errors & codes
    • Collections
    • API version management
    • Bank connectivity
  • API Archives


Generate Signature

Authenticating your request

Overview

A signature is a 64-digit encrypted string that is crucial to the authorization process.

The signature code ensures and confirms that the information included in the request is genuine and hasn't been modified. The user must first generate a Signature Code and pass it through the login request based on which the system detects and authorizes the request. Any request with an invalid or unmatched Signature will be responded to as unauthorized.

Generate a Signature

Generating a Signature Code requires you to provide the Signature Key that is located in your Profile details under Company Credentials. Along with the request body, the Signature Key goes through encryption processes to finally get the Signature Code.

A Signature Code for every request

The Signature Code varies for every request, and no two requests will have the same Signature Code.

Signature algorithm

Below is the sample algorithm to generate a Signature Code:

const crypto = require("crypto");
const SIGNATURE_KEY = "JUYADZ3ZMrj8Bwdme2Pu8a4r"; // your signature key
 
// Your request body
const data = {
  svAccServiceRQ: {
    company: [
      {
        companyCode: "1810",
        userName: "Muhammad_11",
        account: [
          {
            bankCode: "11",
            accountNum: "108057386290014",
            corpId: "OSV0000062",
            holderName: "Company Code 1810",
            iban: "SA5330400108057386290014",
            address: "riyadh",
            currency: "SAR",
            acERPcode: "ANB_1"
          }
        ]
      }
    ]
  }
};
 
function generateSignature(reqBody) {
  // Step 1: Convert request body to JSON string
  const jsonString = JSON.stringify(reqBody);
 
  // Step 2: Base64 encode the JSON string
  const base64Data = Buffer.from(jsonString, "utf-8").toString("base64");
 
  // Step 3: Append the SIGNATURE_KEY
  const dataToHash = base64Data + SIGNATURE_KEY;
 
  // Step 4: Generate SHA256 hash (hex encoded)
  const signature = crypto.createHash("sha256").update(dataToHash).digest("hex");
 
  return signature;
}
 
// Example usage
const signature = generateSignature(data);
console.log("Generated Signature:", signature);

Algorithm breakdown

  • The first encoding represents the Base64 encoding of the Request Body
  • The second encoding is performed to the first encoded result with the Signature Key
  • SHA256 algorithm is applied to the second encoded result
  • A Hexa Stash Code is generated with the SHA256 string
  • The result of the process is your Signature Code

Here's a sample Signature Code:

Sample Signature Code - 64-bit String
Sample Signature Code - 64-bit String
Possible Responses

❌ In case of Signature Key mismatch, an "Unauthorized or Invalid" response will be reflected
⚠️ If the process encounters a technical error, the system will respond to the request as "Technical/Internal/Server Error"

 

 

Updated June 15, 2026

Was this helpful?