POSTQuery VAN API
Use Case
This API is used to:
- Query VAN details based on VAN number
- Query VAN details based on the identification number
Request Attributes
Head
Attribute | Description |
---|---|
requestTimestamp string optional | EPOCH timestamp of the time at which request is being sent. |
tokenType string mandatory | This parameter identifies whether the API works on checksum authentication. Possible Values: CHECKSUM |
token string mandatory | For tokenType CHECKSUM, It's value to be sent should be the checksum string created by using Paytm checksum library. Authorization string corresponding to the tokenType used. Example: 16Xm7DXbvNqhaLw+HMj4XB6XTQKCoM= |
channelId string optional | The parameter value identifies the Channel for which API call is initiated. Possible values: WEB, WAP |
clientId string optional | Paytm use the merchant key on the basis of clientId parameter value. It requires only if the merchant has more than one key. |
version string optional | Version of the API. Example: v1 |
Body
Attribute | Description | ||||||
---|---|---|---|---|---|---|---|
mid string optional | Paytm provides MID as a unique identifier to each merchant. For your staging MID, click here. You get the production MID post the account activation. Example: INTEGR7769XXXXXX9383 | ||||||
requestId string mandatory | Unique request id | ||||||
searchKey string optional | Possible values: VAN, IDN | ||||||
searchDetails object mandatory | This number will be used to query data | ||||||
SearchDetails +
|
Response Attributes
Head
Attribute | Description |
---|---|
responseTimestamp string | EPOCH timestamp of the time at which response is being sent. |
clientId string | Paytm use the merchant key on the basis of clientId parameter value. It requires only if the merchant has more than one key. |
signature string | You should validate the parameter values by verifying the signature comes in the response. It ensures that parameter values not tempered. Signature string can be verified by using Paytm checksum library. |
Body
Attribute | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
resultInfo object | This parameter gives the information about the result of the API response | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
ResultInfo +
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
vanDetails object | van details | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
VanDetails +
|
Response Codes & Messages
resultCode | resultStatus | resultMessage |
---|---|---|
0000 | S | SUCCESS |
0001 | F | specific failure message example: body.requestId : requestId should not be empty : rejected value []" |
2001 | F | Bank Transfer not supported |
2002 | F | CheckSum Validation Failure |
2003 | F | Jwt Validation Failure |
2004 | F | Incorrect mid This case will happen when mid is not passed in request. |
Error codes and messages in VanDetails
errorCode | responseStatus | errorMessage |
---|---|---|
0002 | FAILURE | Internal issue. |
0003 | FAILURE | Internal issue. |
0004 | FAILURE | Internal issue. |
1000 | FAILURE | Internal issue. |
1001 | FAILURE | Internal issue. |
1002 | FAILURE | Internal issue. |
1003 | FAILURE | Internal issue. |
1004 | FAILURE | Internal issue. |
1005 | FAILURE | Internal issue. |
1006 | FAILURE | Internal issue. |
1007 | FAILURE | Internal issue. |
1008 | FAILURE | Internal issue. |
1009 | FAILURE | Internal issue. |
1010 | FAILURE | Internal issue. |
1011 | FAILURE | Internal issue. |
1012 | FAILURE | Internal issue. |
1013 | FAILURE | Internal issue. |
1014 | FAILURE | Internal issue. |
1015 | FAILURE | Internal issue. |
1016 | FAILURE | Internal issue. |
1017 | FAILURE | Internal issue. |
1018 | FAILURE | Internal issue. |
1019 | FAILURE | Internal issue. |
1020 | FAILURE | Internal issue. |
3000 | FAILURE | Van doesn't belong to the mid in request |
3001 | FAILURE | Invalid search id. Accepted value: IDN, VAN |
3002 | FAILURE | IdentificationNumber length is invalid |
3003 | FAILURE | Merchant prefix sent in request is invalid |
4000 | FAILURE | Internal issue. |
4002 | FAILURE | Internal issue. |
4003 | FAILURE | Internal issue. |
4006 | FAILURE | Internal issue. |
4007 | FAILURE | Internal issue. |
5001 | FAILURE | In query via van/identificationNo, van does not exist |
5002 | FAILURE | Internal issue. |
curl -X POST 'https://securegw-stage.paytm.in/vanproxy/api/v1/van/query?mid={mid}' --header 'Content-Type: application/json' --data '{"body":{"requestId":"1602151579","searchKey":"VAN","mid":"{mid}","searchDetails":[{"searchId":"PYLOKP1602146881"}]},"head":{"clientId":"C11","version":"v1","requestTimestamp":1602151579,"channelId":"SYSTEM","tokenType":"CHECKSUM","token":"{checksum}"}}'