post https://cac-api.cashfree.com/cac/v1.1/editVA
Use this API to edit virtual account details.
URLs
- Production/Live: https://cac-api.cashfree.com/cac/v1.1/editVA
- Sandbox/Test: https://cac-gamma.cashfree.com/cac/v1.1/editVA
minAmount and maxAmount
- In the Edit Virtual Account request, if only minAmount or maxAmount is provided, the given value should be <= existing maxAmount or >= existing minAmount value for that virtual account.
- The default values 0 - 1000000000 is applicable if minAmount and MaxAmount are not applicable for a virtual account.
For example, a Virtual Account has (min,max) as (5,10).
New Edit Virtual Account request with only maxAmount as 4 will return 422 error.
Similarly, Edit Virtual Account request with only minAmount as 11 will return 422.
Request and Response Sample Code
Status: 200
//Case 1 - Edit Virtual Account without split configuration details
{
"vAccountId":"VATEST",
"name":"TestVendor",
"phone":"99999XXXXX",
"email":"[email protected]",
"remitterAccount" : "123456789",
"remitterIfsc":"HDFC0000549"
}
//Case 2 - Edit Virtual Account with split configuration details
{
"vAccountId": "Test4",
"name": "TestName",
"phone": "99999XXXXX",
"email": "[email protected]",
"splitConfigDetails": {
"bearAllCharges": true,
"proportions": {
"testvendor_1": 20.00
}
}
}
{
"status": "SUCCESS",
"subCode": "200",
"message": "Virtual account details updated"
}
Status: 403
{
"vAccountId":"VATEST1",
"name":"TestVendor",
"phone":"99999XXXXX",
"email":"[email protected]"
}
{
"status": "ERROR",
"subCode": "403",
"message": "Virtual account is not active"
}
Status: 400
{
"vAccountId":"VATEST1",
"name":"TestVendor",
"phone":"99999XXXXX",
"email":"[email protected]",
"remitterAccount" : "123456789",
"remitterIfsc":"ABC012434"
}
{
"status": "ERROR",
"subCode": "400",
"message": "Please pass a valid remitter Ifsc"
}
Response Codes
Sub Code | Status | Message |
---|---|---|
200 | SUCCESS | Virtual account details updated. |
400 | ERROR | Please pass a valid remitter Ifsc. |
400 | ERROR | Please provide vAccountId |
400 | ERROR | Invalid proportion scale precision provided for the given vendorId: {vendorId} |
400 | ERROR | Split Settlement preference is not enabled for profile, you cannot provide Split Config Details for virtual account. |
400 | ERROR | Specified Split Proportions greater than 100 |
400 | ERROR | Invalid Proportion provided for the given vendorId : {vendorId} |
400 | ERROR | Specified VendorId: {vendorid}, is not registered with merchant |
400 | ERROR | Please provide valid phone number. |
400 | ERROR | Please provide valid email |
400 | ERROR | Please provide valid name. Only alphabets and spaces are allowed. |
400 | ERROR | Remitter Account number should contain 9 to 30 alphanumeric characters. |
400 | ERROR | Virtual account not found with given id |
403 | ERROR | Virtual account is not active. |
422 | ERROR | Amount Lock with VPA not supported. |
422 | ERROR | Remitter Lock with VPA not supported. |
400 | ERROR | Enter valid Ifsc. |
400 | ERROR | Given maxAmount less than existing minAmount |
400 | ERROR | Given minAmount greater than existing maxAmount. |