Loading...
Loading...
Get started with Paywize APIs. Quick-start guide for integrating payouts, collections, and connected banking.
Last updated: 2026-02-21
Welcome to the Paywize Platform! This guide will help you understand our payment infrastructure and get started with the right product for your needs.
Paywize provides a complete payment infrastructure with three core products:
Choose the right product based on your use case:
Before you start, ensure you have:
Base URL: https://merchant.paywize.in/
Dashboard: https://dashboard.paywize.in
Base URL: https://sandbox.merchant.paywize.in/
Dashboard: https://sandbox-dashboard.paywize.in
All Paywize APIs use unified authentication and encryption:
https://merchant.paywize.in/Detailed Guides:
import crypto from 'crypto';
// Encryption function (shared across all APIs)
function encryptMerchantData(data, key, iv) {
if (typeof data === 'object') {
data = JSON.stringify(data);
}
const cipher = crypto.createCipheriv('aes-256-cbc', key, iv);
const encrypted = Buffer.concat([cipher.update(data, 'utf8'), cipher.final()]);
return encrypted.toString('base64');
}
// Generate access token
async function generateAccessToken() {
const credentials = {
apiKey: 'your_32_char_api_key_here_123456',
secretKey: 'your_16_char_iv_12'
};
const encryptedPayload = encryptMerchantData(credentials, API_KEY, SECRET_KEY);
const response = await fetch('https://merchant.paywize.in/v1/auth/clients/token', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ payload: encryptedPayload })
});
const result = await response.json();
if (result.respCode === 2000) {
const decryptedData = decryptMerchantData(result.data, API_KEY, SECRET_KEY);
return JSON.parse(decryptedData).token;
}
}
// Step 1: Generate token
const token = await generateAccessToken();
// Step 2: Initiate payout
const payoutData = {
sender_id: "unique_transaction_id",
wallet_id: "PAYWIZE12345679",
payment_mode: "IMPS",
beneficiary_name: "John Doe",
beneficiary_acc_number: "123456789012",
beneficiary_ifsc: "HDFC0001234",
amount: 1000,
remarks: "Payment",
callback_url: "https://your-website.com/webhook/payout"
};
const encryptedPayload = encryptMerchantData(payoutData, API_KEY, SECRET_KEY);
const response = await fetch('https://merchant.paywize.in/payout/v1/initiate', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({ payload: encryptedPayload })
});
// Step 1: Generate token (same as above)
const token = await generateAccessToken();
// Step 2: Initiate collection
const collectionData = {
senderId: "unique_sender_id",
requestAmount: "500.00",
vpa: "merchant@paywize",
callbackUrl: "https://your-website.com/webhook/collection"
};
const encryptedPayload = encryptMerchantData(collectionData, API_KEY, SECRET_KEY);
const response = await fetch('https://merchant.paywize.in/collection/v1/initiate', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'Authorization': `Bearer ${token}`
},
body: JSON.stringify({ payload: encryptedPayload })
});
Use our sandbox environment for testing:
https://sandbox.merchant.paywize.in/// Test bank account (always successful)
{
account_number: "1234567890",
ifsc: "TEST0001234",
name: "Test Account"
}
// Test bank account (always fails)
{
account_number: "9876543210",
ifsc: "TEST0001234",
name: "Test Fail Account"
}
Set up webhooks for real-time notifications:
callback_url in each API requestImplement robust error handling:
try {
const response = await fetch(apiUrl, options);
const data = await response.json();
if (data.respCode !== 2000) {
throw new Error(`API Error ${data.respCode}: ${data.respMessage}`);
}
// Decrypt response data
const decryptedData = decryptMerchantData(data.data, API_KEY, SECRET_KEY);
return JSON.parse(decryptedData);
} catch (error) {
console.error('API call failed:', error);
// Implement retry logic or fallback
}
Need help? We're here to assist:
All APIs have rate limits to ensure fair usage:
Monitor your usage through the dashboard and implement proper backoff strategies.
Ready to build? Choose your product and start integrating today!