POSTSubscription PreNotify API
Use Case
This is an asynchronous API to pre-notify user about the debit of the subscription.
Also, when successful notification has been sent to the user, a callback would be there to notify the same to the merchant as well.
Request Attributes
Head
Attribute | Description |
---|---|
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. Example: C11 |
tokenType string mandatory | This parameter identifies whether the API works on checksum authentication. The value to be sent in tokenType is 'AES' for this API. |
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. |
timestamp string optional | EPOCH timestamp of the time at which request is being sent. |
Body
Attribute | Description |
---|---|
mid string mandatory | Paytm provides MID as a unique identifier to each merchant. Example: INTEGR7769XXXXXX93833 |
subsId string mandatory | Subscription ID - Only Subscription Flow |
txnAmount string mandatory | Order value of the transaction in INR. Example: 1.00 |
txnDate string mandatory | Date on which the debit is intended to happen Example: 06-11-2020 |
txnMessage string mandatory | Reason for debit, with length between 1 to 50 alphanumeric characters. |
referenceId string mandatory | Unique reference number, Length <= 50 |
invoiceDisplayNo alphanumeric optional | Invoice number for Subscription on cards, Length <= 15 characters |
Response Attributes
Head
Attribute | Description |
---|---|
clientId string | Paytm use the merchant key on the basis of clientId parameter value. It requires only if the merchant has more than one key. Example: C11 |
version string | Version of the API passed in the request. |
timestamp string | EPOCH timestamp of the time at which response is being sent. |
Body
Attribute | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|
resultInfo object | This parameter gives the information about the result of the API response | ||||||||
ResultInfo +
| |||||||||
paytmReferenceId string | Reference Id |
Response Codes & Messages
code | status | message |
---|---|---|
3006 | SUCCESS | SUCCESS |
400 | FAILURE |
• txnAmount can not be greater than max amount |
401 | FAILURE | Authentication Failure. |
500 | FAILURE | System Error |
3000 | FAILURE | MERCHANT_NOT_FOUND |
3004 | FAILURE | Subscription Not Found. |
3005 | FAILURE | Some error occured. |
3008 | FAILURE | Invalid Subscription Amount |
3046 | FAILURE | Notification has already been sent. |
3047 | FAILURE | Invalid Debit Date. |
3049 | FAILURE | Duplicate Reference Id. |
3065 | FAILURE | Pre-debit retry in progress. Please try after sometime |
INT-4056 | FAILURE | Scheduled payment has already expired. You can't perform any action on it |
INT-6018 | FAILURE | Invalid mandate execution number |
INT-6024 | FAILURE | Execution date for Scheduled payment is not valid |
INT-6023 | FAILURE | Scheduled payment is in paused state. Please try later. |
INT-1058 | FAILURE | Your request was unsuccessful. Please try again |
curl -X POST 'https://securegw-stage.paytm.in/subscription/preNotify' \
-H 'Content-Type: application/json' \
--data-raw '{"head":{"signature" : "aesdg123456789jhdfgrtyuaaaa=","tokenType" : "AES" },"body":{"subsId" : "7271","mid" : "{mid}","txnAmount":"2000","txnDate":"06-11-2020","txnMessage" :"subscription for postpaid mobile bill" ,"referenceId" : "NspPa6464ndCre985T5998985456"}}'