Fetch Subscription By Receipt ID
curl --request POST \
--url https://api.paytring.com/api/v1/subscription/subscription/fetch/receipt \
--header 'Content-Type: application/json' \
--data '
{
"key": "<string>",
"id": "<string>",
"hash": "<string>"
}
'import requests
url = "https://api.paytring.com/api/v1/subscription/subscription/fetch/receipt"
payload = {
"key": "<string>",
"id": "<string>",
"hash": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({key: '<string>', id: '<string>', hash: '<string>'})
};
fetch('https://api.paytring.com/api/v1/subscription/subscription/fetch/receipt', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.paytring.com/api/v1/subscription/subscription/fetch/receipt",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'key' => '<string>',
'id' => '<string>',
'hash' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.paytring.com/api/v1/subscription/subscription/fetch/receipt"
payload := strings.NewReader("{\n \"key\": \"<string>\",\n \"id\": \"<string>\",\n \"hash\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.paytring.com/api/v1/subscription/subscription/fetch/receipt")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"<string>\",\n \"id\": \"<string>\",\n \"hash\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paytring.com/api/v1/subscription/subscription/fetch/receipt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"key\": \"<string>\",\n \"id\": \"<string>\",\n \"hash\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body"{\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}""{\n \"status\": false,\n \"error\": {\n \"message\": \"Hash is not verified\",\n \"code\": 204\n }\n}"Subscription Management
Fetch Subscription By Receipt ID
POST
/
api
/
v1
/
subscription
/
subscription
/
fetch
/
receipt
Fetch Subscription By Receipt ID
curl --request POST \
--url https://api.paytring.com/api/v1/subscription/subscription/fetch/receipt \
--header 'Content-Type: application/json' \
--data '
{
"key": "<string>",
"id": "<string>",
"hash": "<string>"
}
'import requests
url = "https://api.paytring.com/api/v1/subscription/subscription/fetch/receipt"
payload = {
"key": "<string>",
"id": "<string>",
"hash": "<string>"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({key: '<string>', id: '<string>', hash: '<string>'})
};
fetch('https://api.paytring.com/api/v1/subscription/subscription/fetch/receipt', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.paytring.com/api/v1/subscription/subscription/fetch/receipt",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'key' => '<string>',
'id' => '<string>',
'hash' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.paytring.com/api/v1/subscription/subscription/fetch/receipt"
payload := strings.NewReader("{\n \"key\": \"<string>\",\n \"id\": \"<string>\",\n \"hash\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.paytring.com/api/v1/subscription/subscription/fetch/receipt")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"<string>\",\n \"id\": \"<string>\",\n \"hash\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paytring.com/api/v1/subscription/subscription/fetch/receipt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"key\": \"<string>\",\n \"id\": \"<string>\",\n \"hash\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body"{\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}""{\n \"status\": false,\n \"error\": {\n \"message\": \"Hash is not verified\",\n \"code\": 204\n }\n}"This API is used to fetch subscription details using the receipt ID.
Request Body
{
"key": "string", // Merchant key, available in dashboard profile section
"id": "string", // Merchant reference subscription ID (receipt ID)
"hash": "string" // Calculated hash for request validation
}
Responses
200 OK
{
"status": true,
"subscription": {
"subscription_id": "string",
"mer_reference_id": "string",
"amount": 500,
"currency": "USD",
"subscription_status": "active",
"pg": "string",
"customer": {
"name": "string",
"email": "string",
"phone": "string"
}
},
"request_id": "string"
}
400 Bad Request
{
"status": false,
"error": {
"message": "string",
"code": 400
}
}
Body
application/json
⌘I

