Get Authorization Status
curl --request GET \
--url https://sandbox.cashfree.com/api/v2/subscriptions/seamless/authorization/{authId}/pollimport requests
url = "https://sandbox.cashfree.com/api/v2/subscriptions/seamless/authorization/{authId}/poll"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox.cashfree.com/api/v2/subscriptions/seamless/authorization/{authId}/poll', 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://sandbox.cashfree.com/api/v2/subscriptions/seamless/authorization/{authId}/poll",
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://sandbox.cashfree.com/api/v2/subscriptions/seamless/authorization/{authId}/poll"
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://sandbox.cashfree.com/api/v2/subscriptions/seamless/authorization/{authId}/poll")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.cashfree.com/api/v2/subscriptions/seamless/authorization/{authId}/poll")
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_body{
"status": 200,
"message": "Auth status fetched successfully",
"data": {
"authStatus": "PENDING",
"subReferenceId": 99124,
"paymentType": "UPI",
"umn": "abcdefghijklmnop@okaxis",
"subscriptionId": "test-1674467137-ss",
"authAmount": 1,
"orderId": "SUB_110926_AUTH_122424"
}
}
Seamless APIs
Get Authorization Status
Use this API to fetch the status of the authorisation request. Provide the authID that is available in the Create Auth API response. This API is applicable only if you have created a subscription using the Create Seamless Subscription API
GET
/
api
/
v2
/
subscriptions
/
seamless
/
authorization
/
{authId}
/
poll
Get Authorization Status
curl --request GET \
--url https://sandbox.cashfree.com/api/v2/subscriptions/seamless/authorization/{authId}/pollimport requests
url = "https://sandbox.cashfree.com/api/v2/subscriptions/seamless/authorization/{authId}/poll"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://sandbox.cashfree.com/api/v2/subscriptions/seamless/authorization/{authId}/poll', 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://sandbox.cashfree.com/api/v2/subscriptions/seamless/authorization/{authId}/poll",
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://sandbox.cashfree.com/api/v2/subscriptions/seamless/authorization/{authId}/poll"
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://sandbox.cashfree.com/api/v2/subscriptions/seamless/authorization/{authId}/poll")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.cashfree.com/api/v2/subscriptions/seamless/authorization/{authId}/poll")
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_body{
"status": 200,
"message": "Auth status fetched successfully",
"data": {
"authStatus": "PENDING",
"subReferenceId": 99124,
"paymentType": "UPI",
"umn": "abcdefghijklmnop@okaxis",
"subscriptionId": "test-1674467137-ss",
"authAmount": 1,
"orderId": "SUB_110926_AUTH_122424"
}
}
Was this page helpful?
āI