The following guide will help you migrate from Token API V2 to Token API V4. We advise you to do so, as V2 won't be maintained anymore.
A list of all migration guides can be found here: Go to migration guides
Note: Everything colored with red was removed in API V4, while the new functionalities added in V4 are colored with green.
Endpoint | HTTP method | V2 | V4 |
Create token | POST | order/token/v2/merchantToken | api/v4/token |
Get token | GET | order/token/v2/merchantToken | api/v4/token/:token |
Get multiple token info | GET | order/token/v2/merchantToken | |
Get history for token | GET | order/token/v2/merchantToken/:token/history | |
Cancel token | DELETE | order/token/v2/merchantToken/:token | api/v4/token/:token |
V2 | V4 | Details |
refNo | payuPaymentReference | |
merchant | it was moved in X-Header-Merchant, see authentication section | |
timestamp | it was moved in X-Header-Date header (date format changed), see authentication section | |
signature | it was moved in X-Header-Signature header, see authentication section |
V2 | V4 | Details |
response.token | token | |
response.cardUniqueIdentifier | cardUniqueIdentifier | |
meta.status.message | message | |
meta.response.httpCode | code | It is also the HTTP response code received |
meta.status.code | status | Values migrated from being numeric, to literal. eg. Success was 0, now its `SUCCESS` |
response.fxCurrency | Was populated only for orders created with FX | |
meta.response.httpMessage | ||
meta.version | ||
expirationDate | ||
cardHolderName | ||
tokenStatus | ||
lastFourDigits | ||
cardExpirationDate |
V2 | V4 | Details |
token | token | Path parameter |
merchant | it was moved in X-Header-Merchant header, see authentication section | |
timestamp | it was moved in X-Header-Date header (date format changed), see authentication section | |
signature | it was moved in X-Header-Signature header, see authentication section |
V2 | V4 | Details |
token.tokenStatus | tokenStatus | |
token.tokenExpirationDate | expirationDate | |
token.cardHolderName | cardHolderName | |
token.cardNumberMask | ||
token.cardExpirationDate | cardExpirationDate | |
token.cardType | ||
token.cardBank | ||
token.cardProgramName | ||
meta.status.message | message | |
meta.response.httpCode | code | It is also the HTTP response code received |
meta.status.code | ||
meta.response.httpMessage | ||
meta.version | ||
status | ||
lastFourDigits | ||
token | ||
cardUniqueIdentifier | ||
networkToken.lastFourDigits | ||
networkToken.expirationDate |
V2 | V4 | Details |
token | token | Path parameter |
cancelReason | ||
merchant | it was moved in X-Header-Merchant header, see authentication section | |
timestamp | it was moved in X-Header-Date header (date format changed), see authentication section | |
signature | it was moved in X-Header-Signature header, see authentication section |
On API V2, for success, HTTP code 204 is returned with no body, while in API V4 HTTP code 200 is returned, with the following fields:
code |
message |
status |
token |
cardUniqueIdentifier |
expirationDate |
cardHolderName |
tokenStatus |
lastFourDigits |
Deprecated | V4 |
Can be done in two ways:
|
The signature is passed in the requests X-Header-Signature header, that has to be sent together with X-Header-Date and X-Header-Merchant headers. Read more about how its calculated here |