• Getting Started
    • Website Integration
      Mobile Integration (Android/IOS)
      Enterprise Solutions
      Accept Payments
      Process Payments
      Disbursals
      API References
      Webhooks
      Testing
      Refunds
      Guides
      Other Processes

      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 Attributes

      API Content format: JSON

      Head

      ATTRIBUTEDESCRIPTIONMANDATORY
      timestamp longUnix Timestamp of the requestYes
      tokenType AESType of tokenYes
      signature StringChecksum string created by using Paytm checksum logic Yes

      Body

      ATTRIBUTEDESCRIPTIONMANDATORY
      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 CustomerContactContact details of customer, refer the Customer ContactNo
      statusCallbackUrl StringCallback URL which will be used by Paytm to post the status of the transaction post paymentNo
      maxPaymentsAllowed NumberSpecify the maximum number of payments you wish to accept via the linkNo

      Customer Contact

      ATTRIBUTEDESCRIPTIONMANDATORY
      customerName StringName of the customerNo
      customerEmail StringEmail id of the customerNo
      customerMobile StringMobile Number of the customerNo

      Response Attributes

      Head

      ATTRIBUTEDESCRIPTIONMANDATORY
      timestamp longUnix Timestamp of the requestYes
      clientId StringClientId by which key checksum is created, required to validate the checksumNo
      version StringVersion of the API. Current version is v1No
      channelId StringChannel by which call is initiatedYes
      tokenType AESType of tokenYes
      signature StringChecksum string created by using Paytm checksum logicYes

      Body

      ATTRIBUTEDESCRIPTIONMANDATORY
      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 NotificationDetailsDetails require to send link via SMS and Email to the customer. Customer Name is mandatoryYes
      resultInfo ResultInfoResult information, refer the Result JSON Object tableYes

      NotificationDetails

      ATTRIBUTEDESCRIPTIONMANDATORY
      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

      ATTRIBUTEDESCRIPTIONMANDATORY
      resultCode StringResult code for each resultYes
      resultStatus StringStatus of API call
      (S:Success, F:Failure, U:Unknown)
      Yes
      resultMessage StringMessage contain the information about the resultYes

      Endpoints

      Staging: https://securegw-stage.paytm.in/link/create

      Production: https://securegw.paytm.in/link/create

      Request CodeResponse JSON
      curl -X POST 'https://securegw-stage.paytm.in/link/create' --header 'Content-Type: application/json' --data '{"body":{"mid":"{mid}","linkType":"{link-type}","linkDescription":"{link-description}","linkName":"{link-name}"},"head":{"tokenType":"AES","signature":"{signature}"}}'