For AI agents: visit https://docs.payu.in/llms.txt for an index of all pages formatted in Markdown and endpoints in OpenAPI. Append .md to any documentation page URL to get its markdown version.
Update a Virtual Account display name or active status. Set isActive to false to deactivate the VA and block new bank credits. Historic VA details and deposit records remain available through list and transaction APIs.
The current date and time. For example, format of the date is Wed, 28 Jun 2023 11:25:19 GMT.
authorization
The actual HMAC signature generated using the specified algorithm (sha512) and includes the hashed data. For more information, refer to authorization fields description table below.
authorization fields description
Parameter
Description
username
Represents the username or identifier for the client or merchant, in this case, it's "smsplus".
algorithm
Use SHA512 algorithm for hashing and send this as header value.
headers
Specifies which headers have been used in generating the hash. In this case, only the "date" header is used.
signature
The actual HMAC signature generated using the specified algorithm (sha512) and includes the hashed data. For more information, refer to hashing algorithm.
hashing algorithm
You must hash the request parameters using the following hash logic:
sha512(<Body data> + '|' + date + '|' + merchant_secret}
Where, <Body data> contains the request Body posted with the request.
Sample authorization header code
var merchant_key = '<merchant_key>';
var merchant_secret = '<merchant_salt>';
// date
var date = new Date();
// var date = "Wed, 28 Jun 2023 11:25:19 GMT";
date = date.toUTCString();
// authorization
var authorization = getAuthHeader(date);
console.log(authorization);
function getAuthHeader(date) {
var AUTH_TYPE = 'sha512';
var data = isEmpty(request['data'])?"":request['data'];
var hash_string = data + '|' + date + '|' + merchant_secret;
console.log("Hash String is ", hash_string);
var hash = CryptoJS.SHA512(hash_string).toString(CryptoJS.enc.Hex);
var authHeader = 'hmac username="' + merchant_key + '", ' + 'algorithm="' + AUTH_TYPE + '", headers="date", signature="' + hash + '"'
return authHeader;
}
pm.environment.set('date', date);
pm.environment.set('authorization', authorization);
pm.environment.set('merchant_key',merchant_key);
pm.environment.set('merchant_secret',merchant_secret);
function isEmpty(obj) {
for(var key in obj) {
if(obj.hasOwnProperty(key))
return false;
}
return true;
}
Request Header
Parameter
Description
Example
Content-Type mandatory
String - Request body format. Set to application/json
application/json
Query Parameters
Parameter
Description
Example
virtualAccountId mandatory
String - PayU-assigned VA identifier (virtualAccountId) or virtual account number (for example PURW2231266)
2231266
Body Parameters
📘
Note:
At least one of virtualAccountName or isActive is required.
Parameter
Description
Example
virtualAccountName optional
String - Updated display name for the VA. Maximum 255 characters
Storefront collections Q2
isActive optional
Boolean - Set to false to deactivate the VA. New deposits are rejected at validation when isActive is false
false after deactivation; true when the VA accepts new credits
externalRefId
Merchant reference ID, if provided at creation
📘
Note:
Deactivation blocks new incoming transfers to the VA. Credits already received and linked PayU transactions are not removed. Contact your PayU Key Account Manager (KAM) if you need to reactivate a VA.
Updated about 2 months ago
Did this page help you?
Updated about 2 months ago
Did this page help you?
Ask AI
Beta
Hi! I am an AI Assistant. Ask me about PayU and get help with your integration.