Subscription Contracts
Update Subscription contract frequency by selling plan
The store’s Appstle plan must include billing frequency changes. API access alone isn’t enough, and scoped partner tokens need it too. Stores that choose a paid plan today get it, and the Free plan doesn’t include it. A store that chose its plan earlier, or is on a custom plan, may not have it: support@appstle.com can check. Without it, the call returns 400 with errorKey permissionDenied and the message UserGeneratedError:Upgrade your plan to modify billing interval.
PUT
/
api
/
external
/
v2
/
subscription-contracts-update-frequency-by-selling-plan
Update Subscription contract frequency by selling plan
curl --request PUT \
--url https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-frequency-by-selling-plan \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-frequency-by-selling-plan"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-frequency-by-selling-plan', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-frequency-by-selling-plan';
const options = {method: 'PUT', headers: {'X-API-Key': '<x-api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-frequency-by-selling-plan",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"X-API-Key: <x-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://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-frequency-by-selling-plan"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("X-API-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-frequency-by-selling-plan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"billingPolicy": {
"anchors": [],
"interval": "DAY",
"intervalCount": 5,
"maxCycles": 6,
"minCycles": 3
},
"customer": {
"displayName": "abc xyz",
"email": "abc@gmail.com",
"firstName": "abc",
"id": "gid://shopify/Customer/111111111111",
"lastName": "xyz"
},
"customerPaymentMethod": {
"id": "gid://shopify/CustomerPaymentMethod/1111111111111111111",
"instrument": {
"brand": "bogus",
"expiryMonth": 12,
"expiryYear": 2030,
"lastDigits": "1",
"name": "abc xyz"
}
},
"deliveryMethod": {
"address": {
"address1": "test",
"city": "Sunnyvale",
"country": "United States",
"province": "California",
"zip": "94087"
}
},
"deliveryPolicy": {
"anchors": [],
"interval": "DAY",
"intervalCount": 5
},
"id": "gid://shopify/SubscriptionContract/123456789",
"lines": {
"edges": [
{
"node": {
"currentPrice": {
"amount": "154.0",
"currencyCode": "USD"
},
"id": "gid://shopify/SubscriptionLine/49e73332-5dfc-4fba-9ee7-111111111",
"lineDiscountedPrice": {
"amount": "154.0",
"currencyCode": "USD"
},
"productId": "gid://shopify/Product/1111111111",
"quantity": 1,
"sellingPlanId": "gid://shopify/SellingPlan/691881211111",
"sellingPlanName": "4 Monthly Subscription",
"taxable": true,
"title": "Blub Indoor",
"variantId": "gid://shopify/ProductVariant/111111111111",
"variantImage": {
"transformedSrc": "https://cdn.shopify.com/s/files/1/0933/4738/1543/files/shopping_41111111111111111111111111111111111"
}
}
}
]
},
"nextBillingDate": "2025-08-08T13:00:00Z",
"status": "ACTIVE"
}Query Parameters
Response
Subscription contract frequency updated successfully
⌘I
Update Subscription contract frequency by selling plan
curl --request PUT \
--url https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-frequency-by-selling-plan \
--header 'X-API-Key: <x-api-key>'import requests
url = "https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-frequency-by-selling-plan"
headers = {"X-API-Key": "<x-api-key>"}
response = requests.put(url, headers=headers)
print(response.text)const options = {method: 'PUT', headers: {'X-API-Key': '<x-api-key>'}};
fetch('https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-frequency-by-selling-plan', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const url = 'https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-frequency-by-selling-plan';
const options = {method: 'PUT', headers: {'X-API-Key': '<x-api-key>'}};
fetch(url, options)
.then(res => res.json())
.then(json => console.log(json))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-frequency-by-selling-plan",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_HTTPHEADER => [
"X-API-Key: <x-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://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-frequency-by-selling-plan"
req, _ := http.NewRequest("PUT", url, nil)
req.Header.Add("X-API-Key", "<x-api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://subscription-admin.appstle.com/api/external/v2/subscription-contracts-update-frequency-by-selling-plan")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"billingPolicy": {
"anchors": [],
"interval": "DAY",
"intervalCount": 5,
"maxCycles": 6,
"minCycles": 3
},
"customer": {
"displayName": "abc xyz",
"email": "abc@gmail.com",
"firstName": "abc",
"id": "gid://shopify/Customer/111111111111",
"lastName": "xyz"
},
"customerPaymentMethod": {
"id": "gid://shopify/CustomerPaymentMethod/1111111111111111111",
"instrument": {
"brand": "bogus",
"expiryMonth": 12,
"expiryYear": 2030,
"lastDigits": "1",
"name": "abc xyz"
}
},
"deliveryMethod": {
"address": {
"address1": "test",
"city": "Sunnyvale",
"country": "United States",
"province": "California",
"zip": "94087"
}
},
"deliveryPolicy": {
"anchors": [],
"interval": "DAY",
"intervalCount": 5
},
"id": "gid://shopify/SubscriptionContract/123456789",
"lines": {
"edges": [
{
"node": {
"currentPrice": {
"amount": "154.0",
"currencyCode": "USD"
},
"id": "gid://shopify/SubscriptionLine/49e73332-5dfc-4fba-9ee7-111111111",
"lineDiscountedPrice": {
"amount": "154.0",
"currencyCode": "USD"
},
"productId": "gid://shopify/Product/1111111111",
"quantity": 1,
"sellingPlanId": "gid://shopify/SellingPlan/691881211111",
"sellingPlanName": "4 Monthly Subscription",
"taxable": true,
"title": "Blub Indoor",
"variantId": "gid://shopify/ProductVariant/111111111111",
"variantImage": {
"transformedSrc": "https://cdn.shopify.com/s/files/1/0933/4738/1543/files/shopping_41111111111111111111111111111111111"
}
}
}
]
},
"nextBillingDate": "2025-08-08T13:00:00Z",
"status": "ACTIVE"
}