Website Integration Snippet
const payload = {
order_id: 'ORD_2026_1001',
amount: 199.00,
note: 'Subscription payment',
customer_mobile: '9876543210',
customer_email: 'buyer@example.com'
};
const rawBody = JSON.stringify(payload);
const timestamp = Math.floor(Date.now() / 1000).toString();
const signature = hmacSha256(timestamp + '.' + rawBody, API_SECRET);
const response = await fetch('https://pay.tezzcorp.in/api/v1/payments/intents', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'X-API-KEY': API_KEY,
'X-Timestamp': timestamp,
'X-Signature': signature
},
body: rawBody
});
const json = await response.json();
// Show json.data.upi.qr_code_url and poll /payments/{order_id}
Android UPI Launch
val upiUri = Uri.parse(apiResponse.data.upi.uri)
val intent = Intent(Intent.ACTION_VIEW, upiUri)
startActivity(Intent.createChooser(intent, "Pay with UPI"))