Loading...
Loading...
Paywize Connected Banking UPI Collection API enables virtual account collections, real-time payment notifications, and reconciliation.
Last updated: 2026-07-06
Version: 1.0.0
Release Date: Jul 06, 2026
This guide helps you integrate Paywize's Connected Banking Collections services into your application securely and seamlessly. Using our RESTful APIs, you can manage virtual accounts, generate collection requests, receive real-time payment notifications, and reconcile incoming transactions with high reliability and speed. This documentation covers API endpoints, authentication and security mechanisms, webhook/callback formats, and detailed request and response examples to help you integrate collections efficiently.
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;
}