Fetch by Order ID
curl --request POST \
--url https://api.paytring.com/api/v2/order/fetch \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "1111111111111111"
}
'import requests
url = "https://api.paytring.com/api/v2/order/fetch"
payload = { "id": "1111111111111111" }
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: '1111111111111111'})
};
fetch('https://api.paytring.com/api/v2/order/fetch', 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",
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' => '1111111111111111'
]),
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"
payload := strings.NewReader("{\n \"id\": \"1111111111111111\"\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")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"1111111111111111\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paytring.com/api/v2/order/fetch")
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\": \"1111111111111111\"\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",
"card_last_4": "6005",
"card_issuer": "amex"
}
}Paytring Checkout Payment
Fetch Order by ID
Fetch an order using its Paytring order_id as id. Use HTTP Basic Auth and omit key and hash from the body. To look up your merchant receipt reference, use /api/v2/order/fetch/receipt instead.
POST
/
api
/
v2
/
order
/
fetch
Fetch by Order ID
curl --request POST \
--url https://api.paytring.com/api/v2/order/fetch \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"id": "1111111111111111"
}
'import requests
url = "https://api.paytring.com/api/v2/order/fetch"
payload = { "id": "1111111111111111" }
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: '1111111111111111'})
};
fetch('https://api.paytring.com/api/v2/order/fetch', 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",
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' => '1111111111111111'
]),
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"
payload := strings.NewReader("{\n \"id\": \"1111111111111111\"\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")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"id\": \"1111111111111111\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paytring.com/api/v2/order/fetch")
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\": \"1111111111111111\"\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",
"card_last_4": "6005",
"card_issuer": "amex"
}
}Retrieve an order using the Paytring
Card details are returned only when available for a successful card payment. The response also contains customer, gateway, and other order details.
The top-level
order_id returned by Create Order. To look up your own receipt reference instead, use Fetch Order by Receipt ID.
Authenticate with HTTP Basic Auth. Do not include key or hash in the request body.
Request example
curl --request POST 'https://api.paytring.com/api/v2/order/fetch' \
--user "${PAYTRING_API_KEY}:${PAYTRING_API_SECRET}" \
--header 'Content-Type: application/json' \
--data '{"id":"1111111111111111"}'
Success response excerpt
{
"status": true,
"order": {
"order_id": "1111111111111111",
"receipt_id": "DEMO202611030001",
"amount": 10000,
"currency": "INR",
"order_status": "success",
"card_last_4": "6005",
"card_issuer": "amex"
}
}
status describes whether the fetch succeeded. order.order_status describes the payment state. Check both and match the receipt ID, amount, and currency against your records before marking a payment successful.
V1 orders remain accessible through V2 for the same business account and test or live environment. Known API errors can return HTTP 200 with status: false; inspect the response body rather than relying on HTTP status alone.Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
application/json
Paytring order_id returned by Create Order, not your receipt_id.
Required string length:
5 - 30Example:
"1111111111111111"
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.

