Request Status
curl --request GET \
--url https://api.example.com/api/v1/requests/{id}import requests
url = "https://api.example.com/api/v1/requests/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/requests/{id}', 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.example.com/api/v1/requests/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/requests/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/requests/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/requests/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyAPI Reference
Request Status
Get request status and results by ID
GET
/
api
/
v1
/
requests
/
{id}
Request Status
curl --request GET \
--url https://api.example.com/api/v1/requests/{id}import requests
url = "https://api.example.com/api/v1/requests/{id}"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.example.com/api/v1/requests/{id}', 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.example.com/api/v1/requests/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/api/v1/requests/{id}"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/api/v1/requests/{id}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/api/v1/requests/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_bodyRequest Status
Retrieve the status and results of a verification request by its ID. Use this endpoint to poll for results if you’re not using webhooks.Overview
After submitting a verification request, you receive a request ID. Use this endpoint to:- Check the current status of a request
- Retrieve verification results when completed
- Get error details if the request failed
- Verify webhook delivery status
Request
Path Parameters
string
required
The unique request ID (UUID) returned when the verification request was submitted.
Headers
| Header | Value | Required |
|---|---|---|
X-API-Key | Your API key | Yes |
Example Request
curl -X GET "https://api.txncheck.in/api/v1/requests/550e8400-e29b-41d4-a716-446655440000" \
-H "X-API-Key: fb_your_api_key_here"
import requests
request_id = "550e8400-e29b-41d4-a716-446655440000"
response = requests.get(
f"https://api.txncheck.in/api/v1/requests/{request_id}",
headers={"X-API-Key": "fb_your_api_key_here"}
)
print(response.json())
const axios = require('axios');
const requestId = '550e8400-e29b-41d4-a716-446655440000';
const response = await axios.get(
`https://api.txncheck.in/api/v1/requests/${requestId}`,
{
headers: { 'X-API-Key': 'fb_your_api_key_here' }
}
);
console.log(response.data);
<?php
$requestId = "550e8400-e29b-41d4-a716-446655440000";
$ch = curl_init("https://api.txncheck.in/api/v1/requests/{$requestId}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, [
"X-API-Key: fb_your_api_key_here"
]);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
requestId := "550e8400-e29b-41d4-a716-446655440000"
req, _ := http.NewRequest("GET", fmt.Sprintf("https://api.txncheck.in/api/v1/requests/%s", requestId), nil)
req.Header.Set("X-API-Key", "fb_your_api_key_here")
client := &http.Client{}
resp, _ := client.Do(req)
Response
200 OK - Queued
Request is waiting for processing.{
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"method": "upi-by-mobile",
"status": "QUEUED",
"webhookStatus": "PENDING",
"createdAt": "2025-01-11T10:30:00.000Z"
}
200 OK - Processing
Request is currently being processed.{
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"method": "upi-by-mobile",
"status": "PROCESSING",
"webhookStatus": "PENDING",
"createdAt": "2025-01-11T10:30:00.000Z"
}
200 OK - Completed
Request completed successfully with results.{
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"method": "upi-by-mobile",
"status": "COMPLETED",
"result": {
"name": "JOHN DOE",
"upi": [
"johndoe@upi",
"9876543210@paytm"
],
"status": "1"
},
"webhookStatus": "SENT",
"createdAt": "2025-01-11T10:30:00.000Z",
"completedAt": "2025-01-11T10:30:05.000Z"
}
200 OK - Failed
Request failed with error details.{
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"method": "upi-by-mobile",
"status": "FAILED",
"error": {
"class": "PROVIDER_BUSINESS_ERROR",
"message": "Mobile number not found in UPI system"
},
"webhookStatus": "SENT",
"createdAt": "2025-01-11T10:30:00.000Z",
"completedAt": "2025-01-11T10:30:05.000Z"
}
200 OK - Partial (Full Check)
Some steps completed, others failed.{
"requestId": "550e8400-e29b-41d4-a716-446655440000",
"method": "full-check",
"status": "PARTIAL",
"stepStatuses": {
"upiByMobile": "ok",
"kycByMobile": "failed",
"vpaChargebackCheck": "ok"
},
"result": {
"upiByMobile": { ... },
"vpaChargebackCheck": {
"vpas": [
{"vpa": "johndoe@upi", "isBlocklisted": false}
]
}
},
"error": {
"kycByMobile": {
"class": "PROVIDER_TEMPORARY",
"message": "Service temporarily unavailable"
}
},
"webhookStatus": "SENT",
"createdAt": "2025-01-11T10:30:00.000Z",
"completedAt": "2025-01-11T10:30:10.000Z"
}
Response Fields
| Field | Type | Description |
|---|---|---|
requestId | string | Unique request identifier |
method | string | Verification method used |
status | string | Current status (see below) |
result | object | Verification results (if completed) |
error | object | Error details (if failed) |
stepStatuses | object | Individual step statuses (for full-check) |
webhookStatus | string | Webhook delivery status |
createdAt | string | Request creation timestamp |
completedAt | string | Request completion timestamp |
Request Statuses
| Status | Description |
|---|---|
QUEUED | Request received and waiting for processing |
PROCESSING | Request is being processed |
COMPLETED | Request completed successfully |
FAILED | Request failed (check error details) |
PARTIAL | Request partially completed (some steps failed) |
Webhook Statuses
| Status | Description |
|---|---|
PENDING | Webhook not yet sent |
SENT | Webhook delivered successfully |
RETRYING | Webhook delivery failed, retrying |
FAILED | Webhook delivery failed after all retries |
Error Responses
401 Unauthorized
Invalid or missing API key.{
"statusCode": 401,
"message": "Invalid API key",
"error": "Unauthorized"
}
404 Not Found
Request not found or doesn’t belong to your merchant.{
"statusCode": 404,
"message": "Request not found",
"error": "Not Found"
}
Polling Best Practices
When polling for results:Use Exponential Backoff
Start with 1-2 seconds, increase delay progressively
Set a Timeout
Don’t poll indefinitely - set a maximum duration
Prefer Webhooks
Webhooks are more efficient than polling
Check Terminal States
Stop polling when status is COMPLETED, FAILED, or PARTIAL
Example Polling Implementation
async function pollForResult(requestId, maxAttempts = 30, initialDelay = 1000) {
let attempt = 0;
let delay = initialDelay;
while (attempt < maxAttempts) {
const response = await fetch(
`https://api.txncheck.in/api/v1/requests/${requestId}`,
{ headers: { 'X-API-Key': API_KEY } }
);
const data = await response.json();
// Check for terminal states
if (['COMPLETED', 'FAILED', 'PARTIAL'].includes(data.status)) {
return data;
}
// Wait before next attempt
await new Promise(resolve => setTimeout(resolve, delay));
// Increase delay (max 10 seconds)
delay = Math.min(delay * 1.5, 10000);
attempt++;
}
throw new Error('Polling timeout - request still processing');
}
// Usage
try {
const result = await pollForResult('550e8400-e29b-41d4-a716-446655440000');
console.log('Verification result:', result);
} catch (error) {
console.error('Polling failed:', error.message);
}
