Create Link API

Checksum required: YES

Use Case

  • This API will be used to create new payment links
  • It can be used to create all 3 types of links
  • The merchant also has an option to send the link to a customer via SMS/Email

Request Parameters

API Content format: JSON


Timestamp longUnix Timestamp of the requestYES
tokenType AESType of tokenYES
Signature StringChecksum string created by using Paytm checksum logic Yes


merchantRequestId StringUnique ID to be generated by merchant.NO
mid StringMerchant unique identifier, Unique Id for merchant provided by PaytmYES
linkDescription StringDescription of the link that merchant wants to display to customerYES
linkType StringType of linkYES
amount DoubleTransaction amountNO
expiryDateDate of expiry of the link, beyond this date customer will not be able to make payment for the linkNO
sendSms BooleanFlag whether SMS to be sent to customer by PaytmNO
sendEmail BooleanFlag whether Email to be sent to customer by PaytmNO
customerContact jsonContact details of customer, refer the Customer Contact JSON objectNO
statusCallbackUrl StringCallback URL which will be used by Paytm to post the status of the transaction post paymentNO

Customer Contact JSON Object

customerName StringName of the customerNO
customerEmail StringEmail id of the customerNO
customerMobile StringMobile Number of the customerNO

Response Parameters


timestamp longUnix Timestamp of the requestYES
clientId stringClientId by which key checksum is created, required to validate the checksumYES
Version stringVersion of the API. Current version is v1YES
channelId stringChannel by which call is initiatedYES
tokenType AESType of tokenYES
signature StringChecksum string created by using Paytm checksum logicYes


linkId LongUnique Identifier for each LinkYES
merchantRequestId StringUnique Identifier as passed by merchantYES
longUrl StringPayment Link URL. Not to be shared with the customerYES
shortUrl StringSmart Payment Link URL. This should be shared with the customerYES
linkType StringType of LinkYES
amount doubleAmount of LinkNO
isActive BooleanOnly Active Links can be used by customers to payYES
expiryDate StringLink would get expired after this time. Customers would no longer use this link to complete payment.YES
merchantHtml stringThis can be used to create a ‘Pay with Paytm’ button on merchant App & Website. Please embed this HTML behind the buttonYES
createdDate StringDate & Time of Creation of the LinkYES
status stringLink Creation StatusYES
notificationDetails JsonDetails require to send link via SMS and Email to the customer. Customer Name is mandatoryYES
resultInfo JsonResult information, refer the Result JSON Object tableYES

NotificationDetails JSON Object

customerName StringName of the Customer which will be sent in the notification messageNO
Contact StringContact Number of customer where the notification will be sentYES
notifyStatus StringStatus of the notificationYES
timestamp StringUnix Timestamp of the responseYES

ResultInfo JSON Object

resultStatus StringStatus of API callYES
resultCode intResult code for each resultYES
resultMessage StringMessage contain the information about the resultYES




Request CodeResponse JSON
curl -X POST -H 'Content-Type: application/json' -d '{"body":{"merchantRequestId":"xxxxxxxxxxxxxxx","mid":"xxxxxxxxxxxxxxxxxxxx","linkName":"ProTest","linkDescription":"this is only testing link...","linkType":"FIXED","amount":"100","expiryDate":"11/04/2020","isActive":"true","sendSms":"true","sendEmail":"true","customerContact":{"customerName":"Paytm Test","customerEmail":"","customerMobile":"8130021266"}},"head":{"timestamp":1556699208,"clientId":"C11","version":"v1","channelId":"WEB","tokenType":"xxx","signature":"xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"}}'