Skip to main content

General Error Model & Codes

Description

VPWS services cover the following endpoints

  • /vpws/paymentOptions
  • /vpws/paymentOptions/{binNumber}
  • /vpws/payment
  • /vpws/transaction
  • /vpws/payment/cancel
  • /vpws/payment/refund

Services respond with HTTP status codes and a standard JSON error model based on the operation result.

Note: The /vpws/transaction service may return the Transaction object directly. In error cases, the standard error model applies.

Standard Response Model

{
"message": "Description",
"statusCode": 400,
"exceptions": null,
"data": null,
"oldData": null,
"errors": [
{
"code": "P001",
"message": "Invalid request parameter"
}
]
}

Field Descriptions

FieldTypeDescription
messagestringGeneral info or error message
statusCodeintHTTP status code
exceptionsobjectApplication-level error details
dataobjectSuccessful operation data
oldDataobjectPrevious data before update
errorsarrayMultiple error objects

Error Codes

CodeHTTPDescription
P001400Invalid parameter
P002401Invalid or expired AccessToken
P003403Dealer not authorized for this operation
P004404Transaction not found
P005409Transaction conflict (duplicate request)
P006422Transaction validation error
P007429Too many requests
P008500System error
P009503Bank service not responding
P010504Timeout
P011600Payment failed
P012601OTP verification error
P013602Cancellation failed
P014603Refund failed
P015604Partial refund limit exceeded
P016605Unsupported operation
P017606Transaction already completed
P018607BIN undefined
P019608POS not found
P020609Currency not supported

Error Management Recommendations

  • statusCode and errorCode should be checked together.

  • Even if 200 is returned, data.isSuccess should be checked.

  • Exponential backoff is recommended for 429 errors.

  • Retry policies should be applied carefully for bank-related errors (P011–P015).