search
Your Paytm for business app is working and will keep working beyond March 15th, 2024. Click to know more

POST Guest Checkout Token Data API

Use Case

This API will be used to generate card token (alternate id) for guest checkout payments from the corresponding network in a synchronous fashion.  Paytm TG will perform card eligibility checks before sending the request to the network.

Request Attributes

Content Type : JSON

Head

AttributeDescription
Version
string
mandatory

Version of the API.

Example: v1

requestTimestamp
string
mandatory

EPOCH timestamp of the time at which request is being sent.
Example: 1588402269

requestId
string
mandatory

Unique reference ID for a transaction which is generated by merchant and sent in the request

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.

signatureType
string
mandatory

Authorization method for this request.

Possible Value: CHECKSUM

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.

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

orderId
string
optional

Merchant’s transaction id/ reconciliation id 

Body

AttributeDescription
authRefId
string
conditional

Authentication ID for the 2FA transaction generated as received from the acquirer.
Condition: To be provided mandatorily for RupayCards

cardSource
string
mandatory

The source where PAN data was captured. Must be one of the possible values.
MANUAL_ENTERED:  PAN data is manually entered by the cardholder.
CARD_SCAN: PAN data is manually captured via a camera/OCR

encryptedCardData
object
mandatory

Encrypted card data string with RSA Encryption logic

Decrypted String: {"cardNumber":"4111XXXXXXXX1111","expiryMonth":"10","expiryYear":"2022","securityCode":"123"}

Note: This is sample string which is encrypted by RSA Encryption logic and used here.
cardData
+
AttributeDescription
cardNumber
string
mandatory

Card number

Possible Value: Any numeric valid card number

expiryMonth
string
mandatory

Card expiry month

Possible Values: MM format i.e 09/12/02

expiryYear
string
mandatory

Card expiry year

Possible Values: YYYY format. i.e 2022

securityCode
string
conditional

Card cvv number

Possible Values: 3-4 digit numeric no. 567/1305

amount
object
mandatory

Transaction amount in Indian paisa.

Example: {"value" : "1000", "currency" : "INR"}

amount
+
AttributeDescription
value
Long
mandatory

Amount value in Indian paisa.

currency
string
mandatory

ISO 4217 currency code.

userInfo
object
mandatory

customer info object

userInfo
+
AttributeDescription
custId
string
mandatory

Merchant customer id/consumer id
(custId/userId atleast one is mandatory)

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)

Response Attributes

Content Type : JSON

Head

AttributeDescription
Version
string

Version of the API.

Example: v1

responseTimestamp
string

EPOCH timestamp of the time at which response is being sent.
Example: 1588402269

requestId
string

Unique reference ID for a transaction which is generated by merchant and sent in the request

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.

cardToken
string

16 digits Token PAN 

tavv
string

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

tokenInfo
string

Token Information object

tokenInfo
+
AttributeDescription
cardScheme
string

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

tokenExpiry
string

Expiry of the card token

MMYYYY format .ie 092021
 

issuingBankName
string

Name of the bank issuing the card

cardSuffix
string

Last 4 digits of the actual card

panUniqueReference
string

Token reference number provided by card network.

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

globalPanIndex
string

Unique index number against a card

tokenRequestorId
string

Token Requestor ID

resultInfo
string

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

resultCode resultStatus resultMsg
00 SUCCESS SUCCESS
100 PENDING PENDING
150 PENDING SYSTEM_ERROR
400 FAILED BAD_REQUEST
401 FAILED FAILURE
405 FAILED Invalid Token Index Number
406 FAILED Invalid request id
407 FAILED Incorrect mid
408 FAILED Incorrect User ID
409 FAILED Incorrect details passed
410 FAILED Mandatory fields missing
730 FAILED Error from card network
440 FAILED Operation not supported by network
442 FAILED Unable to found TRID
443 FAILED TRID is not in Active state
500 FAILED INTERNAL_SYSTEM_ERROR
502 FAILED SYSTEM_ERROR
1001 FAILED Signature Validation Failure
1002 FAILED CheckSum Validation Failure
1003 FAILED Jwt Validation Failure
1004 FAILED Merchant Id is missing
1005 FAILED Signature type is missing
1006 FAILED Head is missing
1400 FAILED Signature Type is invalid
700 FAILED Bad Request from card Network
701 FAILED Failure from card network
702 FAILED Error from Network
708 FAILED Error connecting with card network
709 FAILED Error communicating with card network
714 FAILED Further operations for this card are not allowed
715 FAILED Requested action for the token not allowed or token is invalid
721 FAILED Error with Network
723 FAILED Error While connecting to card network
724 FAILED TOKEN_NOT_FOUND
726 FAILED TOKEN_INVALID_STATE
727 FAILED INVALID_AUTHREFNO
728 FAILED TOKEN_SUSPENDED
729 FAILED TOKEN_EXPIRED
750 FAILED REQUIRE_ADDITIONAL_AUTHENTICATION
801 PENDING Awaiting response from the network
Staging
Production
https://securegw-stage.paytm.in/coft-center/coft/merchant/{mid}/token/gc/generateTokenData?requestId={requestId}&orderId={orderId} copy icon
REQUEST
RESPONSE
CURL
PHP
PYTHON
NODE
DOTNET
curl -X POST 'https://securegw-stage.paytm.in/coft-center/coft/merchant/{mid}/token/gc/generateTokenData?requestId={requestId}&orderId={orderId}
' \
--header 'Content-Type: application/json' \
--data '{"body":{"authRefId":"501123338","cardSource":"CARD_ON_FILE","encryptedCardData":"Encrypted cardData object","userInfo":{"custId":"CUST_001","firstName":"","lastName":"","mobileNumber":""},"tokenizationConsent":{"userConsent":1,"createdAtuser":"Jul 22, 2021 02:46:54 PM","userConsentId":"1234","language":"en","platform":"APP","os":"androidapp","appVersion":"9.10.2","locale":"en-IN","ip":"157.35.79.240","deviceId":"samsung-SM-A260G-01b9ec5dc11fc570","deviceName":"SM-A260G"}},"head":{"version":"v1","requestTimestamp":"1544614590000","requestId":"merchre000001","signature":"{signature}","signatureType":"signatureType","clientId":""}}'

 

copy icon