API Responses
VNPAY API calls return HTTP status codes. Some API calls also return JSON response bodies that include information about the resources. Each REST API request returns an HTTP status code.
HTTP Status Code
For successful requests, VNPAY returns HTTP 2xx
status codes.
For failed requests, VNPAY returns HTTP 4xx
or 5xx
status codes.
VNPAY may returns these HTTP status codes:
Status Code | Description |
---|---|
200 OK |
The request succeeded. |
201 Created |
A POST method successfully created a resource. If the resource was
already created by a previous execution of the same method |
400 Bad Request |
INVALID_REQUEST . Request is not well-formed, syntactically incorrect,
or violates schema. |
401 Unauthorized |
AUTHENTICATION_FAILURE . Authentication failed due to invalid
authentication credentials. |
403 Forbidden |
NOT_AUTHORIZED . Authorization failed due to insufficient permissions.
|
404 Not Found |
RESOURCE_NOT_FOUND . The specified resource does not exist. |
405 Method Not Allowed |
METHOD_NOT_SUPPORTED . The server does not implement the requested HTTP
method.
|
500 Internal Server Error |
INTERNAL_SERVER_ERROR . An internal server error has occurred. |
503 Service Unavailable |
SERVICE_UNAVAILABLE . Service Unavailable. |
API Error Code
Status Code | Description |
---|---|
422 |
Form validate error (ret_msg with show detail) |
5000 |
Too many attempt in 1 min |
9000 |
IP not in white list |
9001 |
IP in black list |
9002 |
Invalid project |
9003 |
Invalid token |
9004 |
Client Transaction ID already exists |
9005 |
Project's currency already disabled |
9006 |
This Merchant already disabled |
9007 |
This project already disabled |
9008 |
Cant find project's currency |
9009 |
The system is currently busy, please try again later (if error exist, please contact our customer service) |
9010 |
Decode data Error |
9011 |
This transaction havent support this currency |