Kaching Subscriptions
Connect Kaching Subscriptions so your Python actions can look up and manage customer subscriptions.
Connect Kaching Subscriptions to let your Python actions, condition providers and recurring jobs call the Kaching API: find a customer's subscriptions, then pause, resume, skip or cancel them. Octocom stores your API token and hands it to your Python code. It does not sync subscriptions on its own.
Connect Kaching
- In Shopify admin, open the Kaching Subscriptions app.
- Go to Settings -> Integrations -> API and create an API token. Choose Full access. A Custom token also works if it grants every permission your actions need.
- Copy the token.
- In Octocom, open Settings -> Integrations -> Kaching Subscriptions, paste the token and click Save.
Treat the token like a password. To replace it, create a new token in Kaching, paste it into the same window and save. To stop access, disconnect Kaching Subscriptions in Octocom and delete the token in Kaching.
Use it in Python
Read the token with get_integration_credentials and send it as a Bearer token to https://subscriptions.kachingappz.app/shop-api. Fetch it each time your code runs rather than storing it.
import requests
KACHING_API = "https://subscriptions.kachingappz.app/shop-api"
def find_kaching_subscriptions(context, email):
slug = context["conversation"]["businessSlug"]
kaching = get_integration_credentials(context).get(slug, {}).get("kaching")
if not kaching:
raise ValueError("Connect Kaching Subscriptions in Settings -> Integrations first.")
response = requests.get(
f"{KACHING_API}/contracts",
headers={"Authorization": f"Bearer {kaching['apiToken']}"},
params={"email": email},
timeout=30,
)
response.raise_for_status()
return [edge["node"] for edge in response.json()["data"]]This example reads the business from the conversation. In a recurring job, use your business slug instead.
GET /contracts also filters by customerId or orderId and returns up to 50 contracts per page; pass the returned cursor to read the next page.
You can also ask Copilot to build these actions for you. It can see that Kaching is connected and read the token the same way.
Kaching allows 60 API requests per minute per shop and returns HTTP 429 above that. See Kaching's API documentation for the available endpoints, their parameters and response formats.