Skip to main content
GET
/
v1
/
subscriptions
/
{id}
Retrieve subscription details
curl --request GET \
  --url https://api.blink.store/v1/v1/subscriptions/{id} \
  --header 'x-store-id: <api-key>'
import requests

url = "https://api.blink.store/v1/v1/subscriptions/{id}"

headers = {"x-store-id": "<api-key>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {'x-store-id': '<api-key>'}};

fetch('https://api.blink.store/v1/v1/subscriptions/{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.blink.store/v1/v1/subscriptions/{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-store-id: <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://api.blink.store/v1/v1/subscriptions/{id}"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("x-store-id", "<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://api.blink.store/v1/v1/subscriptions/{id}")
.header("x-store-id", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.blink.store/v1/v1/subscriptions/{id}")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["x-store-id"] = '<api-key>'

response = http.request(request)
puts response.read_body
{
  "id": "<string>",
  "store_id": "<string>",
  "product_id": "<string>",
  "variant_id": "<string>",
  "status": "<string>",
  "current_period_end": "2023-11-07T05:31:56Z",
  "cancel_at_period_end": true,
  "metadata": {},
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "stripe_subscription_id": "<string>",
  "stripe_customer_id": "<string>",
  "product": {
    "id": "<string>",
    "name": "<string>",
    "pricing_model": "<string>",
    "subscription_interval": "<string>"
  },
  "variant": {
    "id": "<string>",
    "name": "<string>",
    "price": 123,
    "subscription_interval": "<string>"
  }
}

Authorizations

x-store-id
string
header
required

Path Parameters

id
string
required

ID of the subscription to retrieve.

Response

Subscription details retrieved successfully.

id
string
store_id
string
product_id
string
variant_id
string
status
string
current_period_end
string<date-time>
cancel_at_period_end
boolean
metadata
object
created_at
string<date-time>
updated_at
string<date-time>
stripe_subscription_id
string
stripe_customer_id
string
product
object
variant
object