Loading...
Loading...
Paywize Connected Banking API enables multi-bank integration.
Last updated: 2026-07-17
Version: 1.0.2
Release Date: May 20, 2026
This guide helps you integrate Paywize's Connected Banking services into your application securely and seamlessly. Using our RESTful APIs, you can connect bank accounts, fetch real-time balances, and enable automated fund disbursements with high reliability and speed. This documentation covers API endpoints, security and consent mechanisms, webhook/callback formats, and detailed request and response samples.
https://merchant.paywize.in
Note: AES-256-GCM provides both encryption and integrity verification via the authentication tag. The nonce must be unique for every encryption call. The encoded payload format is:
Base64(Nonce[12 bytes] + CipherText + AuthTag[16 bytes]).
import crypto from 'crypto';
export function encrypt(data, secretKey) {
if (typeof data === 'object') {
data = JSON.stringify(data);
}
const nonce = crypto.randomBytes(12); // 96-bit nonce — GCM recommended size
const key = crypto.createHash('sha256').update(secretKey).digest();
const cipher = crypto.createCipheriv('aes-256-gcm', key, nonce);
const ciphertext = Buffer.concat([cipher.update(data, 'utf8'), cipher.final()]);
const authTag = cipher.getAuthTag(); // 16-byte authentication tag
// Payload format: Nonce (12 bytes) + CipherText + AuthTag (16 bytes)
return Buffer.concat([nonce, ciphertext, authTag]).toString('base64');
}
import crypto from 'crypto';
export function decrypt(encryptedData, secretKey) {
const combined = Buffer.from(encryptedData, 'base64');
const NONCE_LEN = 12;
const AUTH_TAG_LEN = 16;
const nonce = combined.subarray(0, NONCE_LEN);
const authTag = combined.subarray(combined.length - AUTH_TAG_LEN);
const ciphertext = combined.subarray(NONCE_LEN, combined.length - AUTH_TAG_LEN);
const key = crypto.createHash('sha256').update(secretKey).digest();
const decipher = crypto.createDecipheriv('aes-256-gcm', key, nonce);
decipher.setAuthTag(authTag);
let decrypted = decipher.update(ciphertext, undefined, 'utf8');
decrypted += decipher.final('utf8');
return decrypted;
}