search

POSTPause/Resume Subscription API

Use Case

Purpose of this API is to pause/resume subscriptions based on the subscription Id and status.

  • For a given subsId, if the subscription is found in active state, and status is passed as suspended, then the subscription will be moved to suspended state
  • For a given subsId, if the subscription is found in suspended (paused) state and status is passed as active,  then the subscription will be moved back to the active state

Request Attributes

Content Type : JSON

Head

AttributeDescription
version
string
optional

Version of the API.

Example: v1

requestTimestamp
string
optional

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

tokenType
string
optional

This parameter identifies whether the API works on checksum authentication. 

Possible Values: AES

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.

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.

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

subsId
string
mandatory

Unique subscription Id generated by Paytm for identifying a subscription.

status
string
mandatory

Desired status to which the subscription needs to be moved to

Possible values: ACTIVE , SUSPENDED

Response Attributes

Content Type : JSON

Head

AttributeDescription
responseTimestamp
string

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

version
string

Version of the API.

Example: v1

Body

AttributeDescription
resultInfo
Object

This parameter gives the information about the result of the API response

Resultinfo
+
AttributeDescription
status
string

This parameter indicates the status of API call.

Possible Values: SUCCESS, FAILURE

code
string

This is the result Code corresponding to a particular message and is returned to the merchant. It's maximum length is 64. The different result codes corresponding to this API are mentioned below.

 

message
string

This parameter is the result message which contains information about the result.The different result messages corresponding to this API are mentioned below.

Response Codes & Messages

resultCoderesultStatusresultMsg
400FAILURE

Subscription is not associated with the provided mid.
MID is mandatory.
Status is mandatory.
Subscription Id field can not be empty.
The MID checksum is not enabled on the given mid.
Invalid Status.
Subscription is not in paused state.
Subscription is not in suspended state.
The MID Checksum Validation Failed.

3005FAILURESome error occurred
3006SUCCESSSUCCESS
500FAILURESystem Error
⇾
Staging
Production
https://securegw-stage.paytm.in/subscription/subscription/status/modifycopy icon
REQUEST
RESPONSE
CURL
curl -X POST 'https://securegw-stage.paytm.in/subscription/subscription/status/modify' \
--header 'Content-Type: application/json' \
--data '{"head" : {"version":"v1","requestTimestamp":"Time","tokenType":"AES","clientId":"C11","signature":"{signature}"},"body":{"mid":"{mid}","subsId":"100003548970","status": "SUSPENDED"}}'

 

copy icon