POSTCreate VAN API
Use Case
This API is used to:
- Create VANs for an entity/customer. In response, VAN Number, IFSC Code, and Beneficiary Name is received. This needs to give to the entity/customer to make the required payment.
- Add bank account numbers to a VAN to support third-party verification (TPV).
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 mandatory | 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 for each request | ||||||||||||||||||||||||||||||||||||||||||||||
vanDetails object mandatory | These details will be used to create VANs. You can create a minimum of 1 and a maximum of 10 VANs at a time. Additionally, bank accounts can be added to a given VAN for third-party validation (TPV). | ||||||||||||||||||||||||||||||||||||||||||||||
VanDetails +
|
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 | These details will be used to create VANs. You can create a minimum of 1 and a maximum of 10 VANs at a time. | ||||||||||||||||||||||||||||||||||
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 |
3004 | FAILURE | Customer detail should not me more then 1 |
3006 | FAILURE | Email id format not correct |
3100 | FAILURE | Internal issue. |
3101 | FAILURE | Internal issue. |
3102 | FAILURE | Internal issue. |
3103 | FAILURE | Internal issue. |
3104 | FAILURE | Internal issue. |
3105 | FAILURE | Internal issue. |
3106 | FAILURE | Internal issue. |
4000 | FAILURE | Internal issue. |
4002 | FAILURE | Internal issue. |
4003 | FAILURE | Internal issue. |
4004 | FAILURE | Internal issue. |
4005 | FAILURE | Internal issue. |
4006 | FAILURE | Internal issue. |
4007 | FAILURE | Internal issue. |
4008 | FAILURE | Internal issue. |
4009 | FAILURE | Internal issue. |
4010 | FAILURE | In Van creation, if the van already exists |
4010 | FAILURE | Internal issue. |
5001 | FAILURE | In query via van/identificationNo, van does not exist |
5002 | FAILURE | Internal issue. |
curl - X POST 'https://securestage.paytmpayments.com/vanproxy/api/v1/van?mid={mid}'--header 'Content-Type: application/json'--data '{"body": {"requestId": "1618814077", "mid": "{mid}", "vanDetails": [{"identificationNo": "1618814077", "purpose": "Testing only", "merchantPrefix": "1234", "customerDetails": [{"customerEmail": "testuser@gmail.com", "customerMobile": "7777777777", "customerName": "test user"} ], "userDefinedFields": {"udf1": "test1", "udf2": "test2", "udf3": "test3", "udf4": "test4", "udf5": "test5"}, "tpvList": [{"accountHolderName": "Test Account 1", "accountNumber": "917777777777", "bankName": "Paytm Payments Bank", "ifscCode": "PYTM123456", "nbin": "string", "active": true } ] } ] }, "head": {"clientId": "C11", "version": "v1", "requestTimestamp": "1618814077", "channelId": "WEB", "tokenType": "CHECKSUM", "token": "{checksum}"} }'