Subscription - Retrieve
curl --request GET \
--url https://sandbox.orchestratorx.com/subscriptions/{subscription_id} \
--header 'X-Profile-Id: <x-profile-id>' \
--header 'api-key: <api-key>'import requests
url = "https://sandbox.orchestratorx.com/subscriptions/{subscription_id}"
headers = {
"X-Profile-Id": "<x-profile-id>",
"api-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Profile-Id': '<x-profile-id>', 'api-key': '<api-key>'}
};
fetch('https://sandbox.orchestratorx.com/subscriptions/{subscription_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://sandbox.orchestratorx.com/subscriptions/{subscription_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Profile-Id: <x-profile-id>",
"api-key: <api-key>"
],
]);
$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.orchestratorx.com/subscriptions/{subscription_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Profile-Id", "<x-profile-id>")
req.Header.Add("api-key", "<api-key>")
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.orchestratorx.com/subscriptions/{subscription_id}")
.header("X-Profile-Id", "<x-profile-id>")
.header("api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.orchestratorx.com/subscriptions/{subscription_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Profile-Id"] = '<x-profile-id>'
request["api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "active",
"profile_id": "<string>",
"merchant_id": "<string>",
"customer_id": "<string>",
"merchant_reference_id": "<string>",
"plan_id": "<string>",
"item_price_id": "<string>",
"client_secret": "<string>",
"coupon_code": "<string>",
"payment": {
"payment_id": "<string>",
"status": "succeeded",
"amount": 123,
"currency": "AED",
"profile_id": "<string>",
"connector": "<string>",
"payment_method_id": "pm_01926c58bc6e77c09e809964e72af8c8",
"return_url": "<string>",
"next_action": {
"redirect_to_url": "<string>",
"type": "redirect_to_url"
},
"payment_experience": "redirect_to_url",
"error_code": "<string>",
"error_message": "<string>",
"payment_method_type": "ach",
"client_secret": "<string>",
"billing": {
"address": {
"city": "New York",
"country": "AF",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe",
"origin_zip": "08807"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
},
"email": "<string>"
},
"shipping": {
"address": {
"city": "New York",
"country": "AF",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe",
"origin_zip": "08807"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
},
"email": "<string>"
},
"payment_type": "normal",
"payment_token": "token_sxJdmpUnpNsJk5VWzcjl"
},
"invoice": {
"id": "<string>",
"subscription_id": "<string>",
"merchant_id": "<string>",
"profile_id": "<string>",
"merchant_connector_id": "<string>",
"customer_id": "<string>",
"amount": 123,
"currency": "AED",
"status": "invoice_created",
"payment_intent_id": "<string>",
"payment_method_id": "pm_01926c58bc6e77c09e809964e72af8c8",
"billing_processor_invoice_id": "<string>"
}
}Subscriptions
Subscription - Retrieve
Retrieves subscription details by ID.
GET
/
subscriptions
/
{subscription_id}
Subscription - Retrieve
curl --request GET \
--url https://sandbox.orchestratorx.com/subscriptions/{subscription_id} \
--header 'X-Profile-Id: <x-profile-id>' \
--header 'api-key: <api-key>'import requests
url = "https://sandbox.orchestratorx.com/subscriptions/{subscription_id}"
headers = {
"X-Profile-Id": "<x-profile-id>",
"api-key": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Profile-Id': '<x-profile-id>', 'api-key': '<api-key>'}
};
fetch('https://sandbox.orchestratorx.com/subscriptions/{subscription_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://sandbox.orchestratorx.com/subscriptions/{subscription_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Profile-Id: <x-profile-id>",
"api-key: <api-key>"
],
]);
$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.orchestratorx.com/subscriptions/{subscription_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Profile-Id", "<x-profile-id>")
req.Header.Add("api-key", "<api-key>")
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.orchestratorx.com/subscriptions/{subscription_id}")
.header("X-Profile-Id", "<x-profile-id>")
.header("api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sandbox.orchestratorx.com/subscriptions/{subscription_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Profile-Id"] = '<x-profile-id>'
request["api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"id": "<string>",
"status": "active",
"profile_id": "<string>",
"merchant_id": "<string>",
"customer_id": "<string>",
"merchant_reference_id": "<string>",
"plan_id": "<string>",
"item_price_id": "<string>",
"client_secret": "<string>",
"coupon_code": "<string>",
"payment": {
"payment_id": "<string>",
"status": "succeeded",
"amount": 123,
"currency": "AED",
"profile_id": "<string>",
"connector": "<string>",
"payment_method_id": "pm_01926c58bc6e77c09e809964e72af8c8",
"return_url": "<string>",
"next_action": {
"redirect_to_url": "<string>",
"type": "redirect_to_url"
},
"payment_experience": "redirect_to_url",
"error_code": "<string>",
"error_message": "<string>",
"payment_method_type": "ach",
"client_secret": "<string>",
"billing": {
"address": {
"city": "New York",
"country": "AF",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe",
"origin_zip": "08807"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
},
"email": "<string>"
},
"shipping": {
"address": {
"city": "New York",
"country": "AF",
"line1": "123, King Street",
"line2": "Powelson Avenue",
"line3": "Bridgewater",
"zip": "08807",
"state": "New York",
"first_name": "John",
"last_name": "Doe",
"origin_zip": "08807"
},
"phone": {
"number": "9123456789",
"country_code": "+1"
},
"email": "<string>"
},
"payment_type": "normal",
"payment_token": "token_sxJdmpUnpNsJk5VWzcjl"
},
"invoice": {
"id": "<string>",
"subscription_id": "<string>",
"merchant_id": "<string>",
"profile_id": "<string>",
"merchant_connector_id": "<string>",
"customer_id": "<string>",
"amount": 123,
"currency": "AED",
"status": "invoice_created",
"payment_intent_id": "<string>",
"payment_method_id": "pm_01926c58bc6e77c09e809964e72af8c8",
"billing_processor_invoice_id": "<string>"
}
}Authorizations
Response
Subscription retrieved successfully
Response payload returned after successfully creating a subscription.
Includes details such as subscription ID, status, plan, merchant, and customer info.
Possible states of a subscription lifecycle.
Created: Subscription was created but not yet activated.Active: Subscription is currently active.InActive: Subscription is inactive.Pending: Subscription is pending activation.Trial: Subscription is in a trial period.Paused: Subscription is paused.Unpaid: Subscription is unpaid.Onetime: Subscription is a one-time payment.Cancelled: Subscription has been cancelled.Failed: Subscription has failed.
Available options:
active, created, in_active, pending, trial, paused, unpaid, onetime, cancelled, failed