Fetch by Receipt ID
curl --request POST \
--url https://api.paytring.com/api/v2/order/fetch/receipt \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "DEMO202611030001"
}
'import requests
url = "https://api.paytring.com/api/v2/order/fetch/receipt"
payload = { "id": "DEMO202611030001" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: 'DEMO202611030001'})
};
fetch('https://api.paytring.com/api/v2/order/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/v2/order/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([
'id' => 'DEMO202611030001'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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/v2/order/fetch/receipt"
payload := strings.NewReader("{\n \"id\": \"DEMO202611030001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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/v2/order/fetch/receipt")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"DEMO202611030001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paytring.com/api/v2/order/fetch/receipt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"DEMO202611030001\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"order": {
"order_id": "1111111111111111",
"receipt_id": "DEMO202611030001",
"amount": 10000,
"currency": "INR",
"order_status": "success"
}
}Paytring Checkout Payment
Fetch Order by Receipt ID
Fetch a collection order by the merchant receipt_id supplied at creation. Send that value as id, not receipt_id. Use HTTP Basic Auth and omit key and hash from the body. V1 orders remain accessible for the same business account and test or live environment.
POST
/
api
/
v2
/
order
/
fetch
/
receipt
Fetch by Receipt ID
curl --request POST \
--url https://api.paytring.com/api/v2/order/fetch/receipt \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "DEMO202611030001"
}
'import requests
url = "https://api.paytring.com/api/v2/order/fetch/receipt"
payload = { "id": "DEMO202611030001" }
headers = {
"Authorization": "Basic <encoded-value>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Basic <encoded-value>', 'Content-Type': 'application/json'},
body: JSON.stringify({id: 'DEMO202611030001'})
};
fetch('https://api.paytring.com/api/v2/order/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/v2/order/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([
'id' => 'DEMO202611030001'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Basic <encoded-value>",
"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/v2/order/fetch/receipt"
payload := strings.NewReader("{\n \"id\": \"DEMO202611030001\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Basic <encoded-value>")
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/v2/order/fetch/receipt")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"DEMO202611030001\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paytring.com/api/v2/order/fetch/receipt")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Basic <encoded-value>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"id\": \"DEMO202611030001\"\n}"
response = http.request(request)
puts response.read_body{
"status": true,
"order": {
"order_id": "1111111111111111",
"receipt_id": "DEMO202611030001",
"amount": 10000,
"currency": "INR",
"order_status": "success"
}
}Retrieve a collection order using the
The full response also includes customer, gateway, address, note, and timestamp fields. The top-level
receipt_id you supplied when creating it. Send that receipt ID in the request field id, not receipt_id. This differs from Fetch Order by ID, which expects Paytring’s order_id.
Authenticate with HTTP Basic Auth using your API key and secret. Do not include key or hash in the request body.
Request example
The receipt ID must be a string between 5 and 75 characters.curl --request POST 'https://api.paytring.com/api/v2/order/fetch/receipt' \
--user "${PAYTRING_API_KEY}:${PAYTRING_API_SECRET}" \
--header 'Content-Type: application/json' \
--data '{"id":"DEMO202611030001"}'
Success response excerpt
{
"status": true,
"order": {
"order_id": "1111111111111111",
"receipt_id": "DEMO202611030001",
"amount": 10000,
"currency": "INR",
"order_status": "success"
}
}
status describes whether the fetch succeeded. order.order_status describes the payment state.
V1 orders can be fetched through this endpoint for the same business account and environment. Use the matching test or live credentials. You do not need to recreate existing orders or regenerate credentials for V2.
Errors and payment confirmation
Known authentication, validation, and lookup errors can return HTTP 200 withstatus: false and an error object. Always inspect the response body.
Before updating your payment records, confirm order.order_status is success and match the receipt ID, amount, and currency against your expected order. A successful fetch or receipt of a webhook alone does not mean the payment succeeded.
See Migrating collection requests from V1 for the endpoint changes and collection webhook considerations.Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
application/json
The receipt_id you supplied when creating the order. This is not Paytring's order_id.
Required string length:
5 - 75Example:
"DEMO202611030001"
Response
Inspect status. A successful fetch returns order; order.order_status is the payment state. Handled API errors can also return HTTP 200 with status false and error.

