Node.js
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.subscriptions.settings();<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->subscriptions->settings();
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.subscriptions.settings()
curl --request GET \
--url https://api.shoply.gg/v1/stores/{storeId}/subscriptions/settings \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/subscriptions/settings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.shoply.gg/v1/stores/{storeId}/subscriptions/settings")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/subscriptions/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": null,
"code": null,
"data": {
"cancelOn": true,
"cancelMode": "end",
"undoOn": true,
"pauseOn": true,
"pauseDays": 30,
"pausesAYear": 2,
"remindersOn": true,
"reminderDays": [
7,
3
],
"graceDays": 3,
"revokeOn": true,
"autoOn": true,
"cardChangeOn": true,
"chargeTries": 3
},
"meta": {
"plans": [
{
"variantId": "00e1d395-9ba2-4db3-900a-cb5e2811a2a9",
"productId": "f463e265-097a-4235-bc2f-5239b19a9874",
"productName": "Northwind Pro",
"variantName": "1 month",
"price": 9.99,
"every": 1,
"unit": "month",
"running": 0,
"automatic": 0
}
],
"limits": {
"maxPlans": 200,
"minDays": 7,
"maxDays": 365,
"maxReminders": 5,
"maxReminderDay": 30,
"maxGraceDays": 30,
"maxPauseDays": 365,
"maxPausesAYear": 12,
"maxChargeTries": 5
}
}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}Subscriptions
Get subscription settings
What a buyer may do for themselves from their customer panel, when renewal reminders go, how long a past due one is kept, and whether an ended one’s keys and files are taken back. meta.plans is the store’s plans and meta.limits the ceilings each setting is held to.
Needs the subscriptions.read permission (Read Subscriptions).
GET
/
stores
/
{storeId}
/
subscriptions
/
settings
Node.js
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.subscriptions.settings();<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->subscriptions->settings();
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.subscriptions.settings()
curl --request GET \
--url https://api.shoply.gg/v1/stores/{storeId}/subscriptions/settings \
--header 'Authorization: Bearer <token>'package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/subscriptions/settings"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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.shoply.gg/v1/stores/{storeId}/subscriptions/settings")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/subscriptions/settings")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": null,
"code": null,
"data": {
"cancelOn": true,
"cancelMode": "end",
"undoOn": true,
"pauseOn": true,
"pauseDays": 30,
"pausesAYear": 2,
"remindersOn": true,
"reminderDays": [
7,
3
],
"graceDays": 3,
"revokeOn": true,
"autoOn": true,
"cardChangeOn": true,
"chargeTries": 3
},
"meta": {
"plans": [
{
"variantId": "00e1d395-9ba2-4db3-900a-cb5e2811a2a9",
"productId": "f463e265-097a-4235-bc2f-5239b19a9874",
"productName": "Northwind Pro",
"variantName": "1 month",
"price": 9.99,
"every": 1,
"unit": "month",
"running": 0,
"automatic": 0
}
],
"limits": {
"maxPlans": 200,
"minDays": 7,
"maxDays": 365,
"maxReminders": 5,
"maxReminderDay": 30,
"maxGraceDays": 30,
"maxPauseDays": 365,
"maxPausesAYear": 12,
"maxChargeTries": 5
}
}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}Authorizations
A secret API key, made under Developers in the dashboard: Authorization: Bearer shoply_sk_...
Path Parameters
The store's ID. A key reaches the store it was made in: GET /key answers which.

