Fetch by Date
curl --request POST \
--url https://api.paytring.com/api/v2/settlement/fetch \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"key": "<string>",
"date": "2023-12-25",
"pg": "<string>",
"offset": "<string>",
"limit": "<string>"
}
'import requests
url = "https://api.paytring.com/api/v2/settlement/fetch"
payload = {
"key": "<string>",
"date": "2023-12-25",
"pg": "<string>",
"offset": "<string>",
"limit": "<string>"
}
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({
key: '<string>',
date: '2023-12-25',
pg: '<string>',
offset: '<string>',
limit: '<string>'
})
};
fetch('https://api.paytring.com/api/v2/settlement/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/settlement/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([
'key' => '<string>',
'date' => '2023-12-25',
'pg' => '<string>',
'offset' => '<string>',
'limit' => '<string>'
]),
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/settlement/fetch"
payload := strings.NewReader("{\n \"key\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"pg\": \"<string>\",\n \"offset\": \"<string>\",\n \"limit\": \"<string>\"\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/settlement/fetch")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"pg\": \"<string>\",\n \"offset\": \"<string>\",\n \"limit\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paytring.com/api/v2/settlement/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 \"key\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"pg\": \"<string>\",\n \"offset\": \"<string>\",\n \"limit\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body"{\n \"status\": true,\n \"data\": [\n {\n \"order_id\": null,\n \"pg_transaction_id\": \"xxxx83793xxxxxxxxx\",\n \"order_date\": \"2xxx-0x-xx 2x:0x:xx\",\n \"utr\": \"xxxx4791xxxxxx\",\n \"settlement_date\": \"2xxx-0x-xx 00:xx:00\",\n \"order_status\": \"success\",\n \"pg_status\": \"Shipped\",\n \"payment_mode\": \"UPI\",\n \"amount\": 1xxxxxx,\n \"mer_service_fee\": 0,\n \"mer_service_tax\": 0,\n \"merchant_subvention_amount\": \"0.00\",\n \"cgst\": \"0.00\",\n \"igst\": \"0.00\",\n \"sgst\": \"0.00\",\n \"settled_amount\": 1xxxxx,\n \"dispute_id\": null,\n \"description\": null\n },\n ],\n \"is_last_page\": false, // If it is the last page, it will return true.\n \"request_id\": \"67bf1xxxxxxx4\"\n}""{}"Settlement Management
Fetch by Date
POST
/
api
/
v2
/
settlement
/
fetch
Fetch by Date
curl --request POST \
--url https://api.paytring.com/api/v2/settlement/fetch \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data '
{
"key": "<string>",
"date": "2023-12-25",
"pg": "<string>",
"offset": "<string>",
"limit": "<string>"
}
'import requests
url = "https://api.paytring.com/api/v2/settlement/fetch"
payload = {
"key": "<string>",
"date": "2023-12-25",
"pg": "<string>",
"offset": "<string>",
"limit": "<string>"
}
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({
key: '<string>',
date: '2023-12-25',
pg: '<string>',
offset: '<string>',
limit: '<string>'
})
};
fetch('https://api.paytring.com/api/v2/settlement/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/settlement/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([
'key' => '<string>',
'date' => '2023-12-25',
'pg' => '<string>',
'offset' => '<string>',
'limit' => '<string>'
]),
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/settlement/fetch"
payload := strings.NewReader("{\n \"key\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"pg\": \"<string>\",\n \"offset\": \"<string>\",\n \"limit\": \"<string>\"\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/settlement/fetch")
.header("Authorization", "Basic <encoded-value>")
.header("Content-Type", "application/json")
.body("{\n \"key\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"pg\": \"<string>\",\n \"offset\": \"<string>\",\n \"limit\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.paytring.com/api/v2/settlement/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 \"key\": \"<string>\",\n \"date\": \"2023-12-25\",\n \"pg\": \"<string>\",\n \"offset\": \"<string>\",\n \"limit\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body"{\n \"status\": true,\n \"data\": [\n {\n \"order_id\": null,\n \"pg_transaction_id\": \"xxxx83793xxxxxxxxx\",\n \"order_date\": \"2xxx-0x-xx 2x:0x:xx\",\n \"utr\": \"xxxx4791xxxxxx\",\n \"settlement_date\": \"2xxx-0x-xx 00:xx:00\",\n \"order_status\": \"success\",\n \"pg_status\": \"Shipped\",\n \"payment_mode\": \"UPI\",\n \"amount\": 1xxxxxx,\n \"mer_service_fee\": 0,\n \"mer_service_tax\": 0,\n \"merchant_subvention_amount\": \"0.00\",\n \"cgst\": \"0.00\",\n \"igst\": \"0.00\",\n \"sgst\": \"0.00\",\n \"settled_amount\": 1xxxxx,\n \"dispute_id\": null,\n \"description\": null\n },\n ],\n \"is_last_page\": false, // If it is the last page, it will return true.\n \"request_id\": \"67bf1xxxxxxx4\"\n}""{}"This API allows you to fetch settlement details by date.
Request Body
{
"key": "string", // Merchant key, available in dashboard profile section
"date": "string", // The date you want to fetch settlements for (format: YYYY-MM-DD)
"pg": "string", // Payment gateway code (optional)
"offset": "string", // Starting point for results (optional)
"limit": "string" // Maximum number of records to return (optional)
}
Responses
200 OK
{
"status": true,
"data": [
{
"order_id": null,
"pg_transaction_id": "string",
"order_date": "string",
"utr": "string",
"settlement_date": "string",
"order_status": "string",
"pg_status": "string",
"payment_mode": "string",
"amount": 0,
"settled_amount": 0
}
],
"is_last_page": false,
"request_id": "string"
}
400 Bad Request
{
"status": false,
"error": {
"message": "Invalid request",
"code": 400
}
}
Authorizations
Basic authentication header of the form Basic <encoded-value>, where <encoded-value> is the base64-encoded string username:password.
Body
application/json
Merchant key, available in dashboard profile section
the date you want to fetch settlements for
if you want to fetch details of a particular pg. only, please pass it's pg code
It specifies the starting point from which to return results
It specifies the maximum number of records to return in a response
Response
200
⌘I

