import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.subscriptions.pause("SUBSCRIPTION_ID", {
days: 14,
});<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->subscriptions->pause('SUBSCRIPTION_ID', [
'days' => 14,
]);
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.subscriptions.pause("SUBSCRIPTION_ID", days=14)
curl --request POST \
--url https://api.shoply.gg/v1/stores/{storeId}/subscriptions/{subscriptionId}/pause \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"days": 14
}'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/subscriptions/{subscriptionId}/pause"
payload := strings.NewReader("{\n \"days\": 14\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.shoply.gg/v1/stores/{storeId}/subscriptions/{subscriptionId}/pause")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"days\": 14\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/subscriptions/{subscriptionId}/pause")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"days\": 14\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": null,
"code": null,
"data": {
"id": "d5b2ae58-5363-4806-bcaf-7fc939e2c948",
"email": "grace@example.com",
"customerId": null,
"productId": "f463e265-097a-4235-bc2f-5239b19a9874",
"variantId": "00e1d395-9ba2-4db3-900a-cb5e2811a2a9",
"productName": "Northwind Pro",
"variantName": "1 month",
"quantity": 1,
"price": 9.99,
"currency": "USD",
"every": 1,
"unit": "month",
"status": "paused",
"periodEnd": "2026-11-29T16:20:19Z",
"graceEnd": null,
"renewalOrderId": null,
"renewalUrl": null,
"firstOrderId": "bc44febe-0f25-4076-92eb-03a5045a57e7",
"cycles": 1,
"remindedAt": null,
"endedAt": null,
"revoked": true,
"pausedAt": "2026-10-22T16:20:19Z",
"resumeAt": "2026-11-05T16:20:19Z",
"pausedBy": "merchant",
"renewsWith": null,
"autoRenews": false,
"chargeTried": 0,
"chargeNextAt": null,
"createdAt": "2026-10-22T16:20:19Z"
},
"meta": {
"history": [
{
"kind": "paused",
"detail": "Paused by the store until Nov 5, 2026. Nothing renews meanwhile, and the 38 days left of what was paid for run on once it resumes. Access was taken back until then.",
"actor": "merchant",
"orderId": null,
"at": "2026-10-22T16:20:19Z"
},
{
"kind": "undone",
"detail": "The cancellation was undone by the store. It renews on Nov 29, 2026.",
"actor": "merchant",
"orderId": null,
"at": "2026-10-22T16:20:19Z"
}
],
"orders": [
{
"id": "bc44febe-0f25-4076-92eb-03a5045a57e7",
"status": "completed",
"amount": 9.99,
"currency": "USD",
"renewal": false,
"createdAt": "2026-10-22T16:20:19Z",
"paidAt": "2026-10-22T16:20:19Z"
}
]
}
}{
"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": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}Pause a subscription
Starts at once: nothing renews, a renewal waiting to be paid is cancelled, and where the store takes access back its keys and files are hidden until it resumes. The days left of what was paid for are kept: it renews that much later. It resumes by itself after days. The buyer is emailed. The subscription as data, with meta.history (what happened to it, newest first) and meta.orders (its first order and every renewal).
Needs the subscriptions.write permission (Change Subscriptions).
import Shoply from "@shoplygg/node";
const shoply = new Shoply({ apiKey: process.env.SHOPLY_API_KEY });
const result = await shoply.subscriptions.pause("SUBSCRIPTION_ID", {
days: 14,
});<?php
require 'vendor/autoload.php';
$shoply = new Shoply\Client(['apiKey' => getenv('SHOPLY_API_KEY')]);
$result = $shoply->subscriptions->pause('SUBSCRIPTION_ID', [
'days' => 14,
]);
import shoply
client = shoply.Client() # reads SHOPLY_API_KEY
result = client.subscriptions.pause("SUBSCRIPTION_ID", days=14)
curl --request POST \
--url https://api.shoply.gg/v1/stores/{storeId}/subscriptions/{subscriptionId}/pause \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"days": 14
}'package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.shoply.gg/v1/stores/{storeId}/subscriptions/{subscriptionId}/pause"
payload := strings.NewReader("{\n \"days\": 14\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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.shoply.gg/v1/stores/{storeId}/subscriptions/{subscriptionId}/pause")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"days\": 14\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.shoply.gg/v1/stores/{storeId}/subscriptions/{subscriptionId}/pause")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"days\": 14\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": null,
"code": null,
"data": {
"id": "d5b2ae58-5363-4806-bcaf-7fc939e2c948",
"email": "grace@example.com",
"customerId": null,
"productId": "f463e265-097a-4235-bc2f-5239b19a9874",
"variantId": "00e1d395-9ba2-4db3-900a-cb5e2811a2a9",
"productName": "Northwind Pro",
"variantName": "1 month",
"quantity": 1,
"price": 9.99,
"currency": "USD",
"every": 1,
"unit": "month",
"status": "paused",
"periodEnd": "2026-11-29T16:20:19Z",
"graceEnd": null,
"renewalOrderId": null,
"renewalUrl": null,
"firstOrderId": "bc44febe-0f25-4076-92eb-03a5045a57e7",
"cycles": 1,
"remindedAt": null,
"endedAt": null,
"revoked": true,
"pausedAt": "2026-10-22T16:20:19Z",
"resumeAt": "2026-11-05T16:20:19Z",
"pausedBy": "merchant",
"renewsWith": null,
"autoRenews": false,
"chargeTried": 0,
"chargeNextAt": null,
"createdAt": "2026-10-22T16:20:19Z"
},
"meta": {
"history": [
{
"kind": "paused",
"detail": "Paused by the store until Nov 5, 2026. Nothing renews meanwhile, and the 38 days left of what was paid for run on once it resumes. Access was taken back until then.",
"actor": "merchant",
"orderId": null,
"at": "2026-10-22T16:20:19Z"
},
{
"kind": "undone",
"detail": "The cancellation was undone by the store. It renews on Nov 29, 2026.",
"actor": "merchant",
"orderId": null,
"at": "2026-10-22T16:20:19Z"
}
],
"orders": [
{
"id": "bc44febe-0f25-4076-92eb-03a5045a57e7",
"status": "completed",
"amount": 9.99,
"currency": "USD",
"renewal": false,
"createdAt": "2026-10-22T16:20:19Z",
"paidAt": "2026-10-22T16:20:19Z"
}
]
}
}{
"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": {}
}{
"success": false,
"message": "<string>",
"code": "<string>",
"data": null,
"errors": {}
}Authorizations
A secret API key, made under Developers in the dashboard: Authorization: Bearer shoply_sk_...
Headers
A word of your own for this one change, up to 180 letters, digits, dots, dashes, underscores and colons. Sent again with the same key, the request is not carried out twice: the first answer comes back, with Idempotent-Replay: true.
Path Parameters
The store's ID. A key reaches the store it was made in: GET /key answers which.
The subscription.
Body
How long, from 1 to 365 days.
14

