Subscription Management
Fetch Subscription
API Documentation
Paytring Checkout Payment
Merchant Hosted Checkout Payment
Subscription Management
Payout Management
Settlement Management
Vendor Management
Subscription Management
Fetch Subscription
POST
/
api
/
v1
/
subscription
/
subscription
/
fetch
curl --request POST \
--url https://api.paytring.com/api/v1/subscription/subscription/fetch \
--header 'Content-Type: application/json' \
--data '{
"key": "<string>",
"id": "<string>",
"hash": "<string>"
}'
"{\n \"status\": true,\n \"subscription\": {\n \"subscription_id\": \"677361288237548476\",\n \"mer_reference_id\": \"TXN934579\",\n \"amount\": 500,\n \"initial_amount\": null,\n \"currency\": \"USD\",\n \"subscription_status\": \"active\",\n \"pg\": \"Transactbridge\",\n \"customer\": {\n \"name\": \"Preetam Sharma\",\n \"email\": \"preetam@paytring.com\",\n \"phone\": \"7027445661\"\n },\n \"notes\": {\n \"udf1\": \"\",\n \"udf2\": \"\",\n \"udf3\": \"\",\n \"udf4\": \"\",\n \"udf5\": \"\",\n \"udf6\": \"\",\n \"udf8\": \"\",\n \"udf9\": \"\",\n \"udf10\": \"\"\n },\n \"billing_address\": {\n \"firstname\": \"FirstName\",\n \"lastname\": \"LastName\",\n \"phone\": \"9999999999\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"country\": \"\",\n \"zipcode\": \"\"\n },\n \"shipping_address\": {\n \"firstname\": \"FirstName\",\n \"lastname\": \"LastName\",\n \"phone\": \"9999999999\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"country\": \"\",\n \"zipcode\": \"\"\n }\n },\n \"request_id\": \"66ebdb6678097\"\n}"
This API is used to fetch details of an existing subscription.
Request Body
{
"subscription_id": "string", // ID of the subscription to fetch
"hash": "string" // Calculated hash for request validation
}
Responses
200 OK
{
"status": true,
"subscription": {
"id": "string",
"status": "string",
"plan": {
"id": "string",
"name": "string",
"amount": "integer",
"currency": "string",
"interval": "string"
}
},
"message": "Subscription fetched successfully"
}
400 Bad Request
{
"status": false,
"error": {
"message": "Invalid request",
"code": 400
}
}
Body
application/json
Merchant key, available in dashboard profile section
Subscription id provided by paytring.
to be calculated by key sort of all non-object key values of this request
Response
200
application/json
200
Example:
true
Example:
"677361288237548476"
Example:
"TXN934579"
Example:
500
Example:
"USD"
Example:
"active"
Example:
"Transactbridge"
Example:
""
Example:
""
Example:
""
Example:
""
Example:
""
Example:
""
Example:
""
Example:
""
Example:
""
Example:
"FirstName"
Example:
"LastName"
Example:
"9999999999"
Example:
""
Example:
""
Example:
""
Example:
""
Example:
""
Example:
""
Example:
"FirstName"
Example:
"LastName"
Example:
"9999999999"
Example:
""
Example:
""
Example:
""
Example:
""
Example:
""
Example:
""
Example:
"66ebdb6678097"
curl --request POST \
--url https://api.paytring.com/api/v1/subscription/subscription/fetch \
--header 'Content-Type: application/json' \
--data '{
"key": "<string>",
"id": "<string>",
"hash": "<string>"
}'
"{\n \"status\": true,\n \"subscription\": {\n \"subscription_id\": \"677361288237548476\",\n \"mer_reference_id\": \"TXN934579\",\n \"amount\": 500,\n \"initial_amount\": null,\n \"currency\": \"USD\",\n \"subscription_status\": \"active\",\n \"pg\": \"Transactbridge\",\n \"customer\": {\n \"name\": \"Preetam Sharma\",\n \"email\": \"preetam@paytring.com\",\n \"phone\": \"7027445661\"\n },\n \"notes\": {\n \"udf1\": \"\",\n \"udf2\": \"\",\n \"udf3\": \"\",\n \"udf4\": \"\",\n \"udf5\": \"\",\n \"udf6\": \"\",\n \"udf8\": \"\",\n \"udf9\": \"\",\n \"udf10\": \"\"\n },\n \"billing_address\": {\n \"firstname\": \"FirstName\",\n \"lastname\": \"LastName\",\n \"phone\": \"9999999999\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"country\": \"\",\n \"zipcode\": \"\"\n },\n \"shipping_address\": {\n \"firstname\": \"FirstName\",\n \"lastname\": \"LastName\",\n \"phone\": \"9999999999\",\n \"line1\": \"\",\n \"line2\": \"\",\n \"city\": \"\",\n \"state\": \"\",\n \"country\": \"\",\n \"zipcode\": \"\"\n }\n },\n \"request_id\": \"66ebdb6678097\"\n}"