search

POSTGenerate Token Data API

Use Case

Used by the merchant to fetch the full Token PAN and TAVV required for transaction processing.

Request Attributes

Content Type : JSON

Head

AttributeDescription
Version
string
mandatory

Version of the API
Possible Value: v1

requestTimestamp
string
mandatory

EPOCH timestamp of the time at which request is being sent

Possible Value: 1588402269

requestId
string
mandatory

Merchant's Unique Request ID for Card Token and Tavv generation.

Possible Value: Any

signature
string
mandatory

Paytm validates the request and ensures that parameters are not tempered by verifying the signature in the request. For creating the checksum (signature) refer to the steps given in Checksum Logic.
Note: Create the signature using the body parameter of the request.

Possible Value: Any

signatureType
string
mandatory

Authorization method for this request.

Possible Value: CHECKSUM

clientId
string
optional

Paytm uses the merchant key on the basis of clientId parameter value. It is required only if the merchant has more than one key.

encryptionKeyVersion
string
optional

Paytm uses the merchant key on the basis of the encryption key version. It is required only if the merchant has more than one key.

Possible Value: v1

Body

AttributeDescription
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

paymentType
string
mandatory

Type of card payment. Must be either of the possible values.

Possible Value: ECOM/SUBS

tokenIndexNumber
string
mandatory

Unique Token Reference ID provided by Paytm Token Service

userInfo
object
mandatory

Customer info object

userInfoCoft
+
AttributeDescription
custId
string
mandatory

 Merchant customer id/consumer id

Possible Values: Any

firstName
string
optional

Customer/consumer first name

Possible Values: Any

lastName
string
optional

Customer/consumer last name

Possible Values: Any

mobileNumber
string
optional

Customer/consumer mobile no

Possible Value: Any (valid mobile no)

orderID
string
optional

Merchant's reconciliation Id for token generation.
For example, merchants can simply pass Paytm's Order ID to keep track of the card payment against which the token was successfully generated.

Response Attributes

Content Type : JSON

Head

AttributeDescription
Version
string

Version of the API
Possible Value: v1

responseTimestamp
string

EPOCH timestamp of the time at which request is being received

Possible Value: 1588402269

requestId
string

Merchant’s Unique Request ID for card tokenization

Possible Value: Any

Body

AttributeDescription
mid
string

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

paymentType
string

Type of card payment. Must be either of the possible values.

Possible Value: ECOM/SUBS

tokenIndexNumber
string

Unique Token Reference ID provided by Paytm Token Service

cardToken
string

16 digits Token PAN

tavv
string(40)

Token Verification Value generated by the network valid for a single token card  payment

tokenInfo
Object
TokenInfo
+
AttributeDescription
tokenIndexNumber
string

Unique Token Reference ID provided by Paytm Token Service
Possible Value: Any Alphanumeric

cardScheme
string

The network used for card token generated
Possible Values: VISA, MASTER, RUPAY

tokenExpiry
string

Expiry  of the card token
Possible Value: MMYYYY format .ie 092021

issuingBankName
string

Name of the bank issuing the card
Possible Value: Any

cardSuffix
string

Last 4 digits of the actual card
Possible Value: Any

tokenUniqueReference
string

Token reference number provided by the card network for a given tokenization request.
Possible Value: Any

panUniqueReference
string

The unique reference allocated to the Primary Account Number by the card network also known as PAR.
Possible Value: Any

cardType
string

Type of the card
Possible Values: CC or DC

displayName
string

Display name of the card
Example: HDFC Bank Regalia

tokenSuffix
string

Last 4 digits of token

tokenStatus
string

The status of the token. Must be one of the four possible values.
INIT: Tokenization is not yet complete
SUSPENDED: Card Token has been temporarily disabled.
ACTIVE: Card token is active and transactions can be processed with the same.
DEAD: Card Token has been deleted permanently.
FAILED: Card Token failed by system or card network error.

tokenRequestorId
string

The token requestor ID provided by the network or issuer for a given Paytm Merchant using which this token was created/provisioned. This parameter will be provided conditionally for Diners Token.

isRetriable
string

This parameter will be returned true only if the requested Token Index Number will undergo a retry at some point of time before June 30, 2022.

resultInfo
Object

Status Object

ResultInfo
+
AttributeDescription
resultCode
string

Response code for different failure reason

Possible Values: Any

resultStatus
string

Response status

Possible Values: S/F/U

resultMsg
string

Response message

Possible Values: Any

Response Codes & Messages

resultCoderesultStatusresultMsg
00SUCCESSSUCCESS
100PENDINGPENDING
150PENDINGSYSTEM_ERROR
400FAILEDBAD_REQUEST
401FAILEDFAILURE
405FAILEDInvalid Token Index Number
406FAILEDInvalid request id
407FAILEDIncorrect mid
408FAILEDIncorrect User ID
409FAILEDIncorrect details passed
410FAILEDMandatory fields missing
730FAILEDError from card network
440FAILEDOperation not supported by network
442FAILEDUnable to found TRID
443FAILEDTRID is not in Active state
500FAILEDINTERNAL_SYSTEM_ERROR
502FAILEDSYSTEM_ERROR
1001FAILEDSignature Validation Failure
1002FAILEDCheckSum Validation Failure
1003FAILEDJwt Validation Failure
1004FAILEDMerchant Id is missing
1005FAILEDSignature type is missing
1006FAILEDHead is missing
1400FAILEDSignature Type is invalid
700FAILEDBad Request from card Network
701FAILEDFailure from card network
702FAILEDError from Network
708FAILEDError connecting with card network
709FAILEDError communicating with card network
714FAILEDFurther operations for this card are not allowed
715FAILEDRequested action for the token not allowed or token is invalid
721FAILEDError with Network
723FAILEDError While connecting to card network
724FAILEDTOKEN_NOT_FOUND
726FAILEDTOKEN_INVALID_STATE
727FAILEDINVALID_AUTHREFNO
728FAILEDTOKEN_SUSPENDED
729FAILEDTOKEN_EXPIRED
750FAILEDREQUIRE_ADDITIONAL_AUTHENTICATION
801PENDINGAwaiting response from the network
⇾
Staging
Production
https://securestage.paytmpayments.com/coft-center/coft/merchant/{mid}/token/generateTokenData?requestId={request-id}copy icon
REQUEST
RESPONSE
CURL
PHP
DOTNET
NODE
PYTHON
curl -X POST 'https://securestage.paytmpayments.com/coft-center/coft/merchant/{mid}/token/generateTokenData?requestId={request-id}' \
--header 'Content-Type: application/json' \
--data '{"body":{"paymentType":"ECOM", //ENUM,"tokenIndexNumber":"","userInfo":{}},"head":{"version":"v1","requestTimestamp":"1544614590000","requestId":"merchre000001","signature":"d7186f022c5a44cc8915bf74e4e8c9f61534487392716","signatureType":"CHECKSUM","clientId":""}}'
copy icon