The Unified API for
Cambodia's Banking Network
Connect to ABA, ACLEDA, and Wing with a single integration. Built for developers, optimized for AI.
Payment processing by NBC-licensed commercial banks
Trusted by innovative companies across Cambodia
Build Faster with AI-Native Documentation
Stop reading PDFs. Just point your LLM to the endpoint below and let it write the integration code for you.
Choose a Use Case
DevDocs
Two endpoints. That's the entire API surface. Create a payment intent, receive a webhook.
/payCreate Payment Intent
Send an encrypted payment request. Receive an intent ID. Redirect your customer to the payment page.
/webhookReceive Payment Confirmation
Baray sends an encrypted webhook to your server when payment is complete. Decrypt and update your order.
Payment Flow
Create Intent
POST /pay
Redirect
→ pay.baray.io
Customer Pays
Bank handles
Webhook
You receive
Done
Update order
const crypto = require('crypto');
// Your credentials from dash.baray.io
const API_KEY = 'bry_live_xxxxxxxxxxxx';
const SK = 'Base64EncodedSecretKey32Bytes...';
const IV = 'Base64EncodedIV16Bytes...';
// Encrypt payload for API request
function encrypt(payload) {
const key = Buffer.from(SK, 'base64');
const ivBuffer = Buffer.from(IV, 'base64');
const cipher = crypto.createCipheriv('aes-256-cbc', key, ivBuffer);
let encrypted = cipher.update(JSON.stringify(payload), 'utf8');
encrypted = Buffer.concat([encrypted, cipher.final()]);
return encrypted.toString('base64');
}
// Decrypt webhook response
function decrypt(encryptedData) {
const key = Buffer.from(SK, 'base64');
const ivBuffer = Buffer.from(IV, 'base64');
const decipher = crypto.createDecipheriv('aes-256-cbc', key, ivBuffer);
let decrypted = decipher.update(Buffer.from(encryptedData, 'base64'));
decrypted = Buffer.concat([decrypted, decipher.final()]);
return decrypted.toString('utf8');
}
// Create payment intent
const payload = { amount: '10.00', currency: 'USD', order_id: 'ORDER-12345' };
const response = await fetch('https://api.baray.io/pay', {
method: 'POST',
headers: { 'Content-Type': 'application/json', 'x-api-key': API_KEY },
body: JSON.stringify({ data: encrypt(payload) })
});
const { _id: intentId } = await response.json();
redirect(`https://pay.baray.io/${intentId}`);
// Handle webhook
app.post('/webhook/baray', (req, res) => {
const orderId = decrypt(req.body.encrypted_order_id);
// Update order status
res.status(200).send('OK');
});Sign up at dash.baray.io
Create your organization and generate API credentials (api_key, sk, iv).
Integrate the API
Encrypt your payload, call POST /pay, redirect to payment page.
Handle webhooks
Receive payment confirmations and update your order status.
How It Works
Baray is a developer tool that helps businesses integrate with banks faster. Baray simplifies the technical work — banks handle all payments and keep the customer relationship.
Merchant App
E-commerce, SaaS, or any application
Baray API
API Translation & Routing
Licensed Banks
NBC-regulated institutions
What Baray Provides
- •API translation between merchant systems and banks
- •Request routing to appropriate bank APIs
- •Webhook forwarding for payment notifications
- •Unified checkout UI with bank selection
Direct Integration with Leaders
Baray works with NBC-licensed banks to reach more merchants and developers. All payments flow directly through bank infrastructure.
Processed securely by NBC-licensed institutions
Compliance & Security
Baray is built on a Zero-Liability Architecture. We route data, banks route money. This ensures maximum security and regulatory compliance for your business.
Non-Custodial
Baray never holds, stores, or transmits merchant funds. All settlements happen directly between the bank and the merchant.
Bank Partner
We act as a technical middleware and distribution partner, not a competitor. We help banks reach more developers and merchants.
Regulatory Clarity
Baray is a software integration service. We are not a Payment Service Provider (PSP) or a financial institution.
Ready to integrate?
Sign up for a free account, generate your API credentials, and start integrating with Cambodian banks today.
Development environment available for testing • No credit card required



