Three lines of Python to check any user's subscription. Works with Django, Flask, FastAPI, and any Python framework.
Start Free# Install
pip install paylio# Check subscription
import paylio
paylio.api_key = "sk_live_xxx"
sub = paylio.get_subscription("user_123")
print(sub.status) # "active"
print(sub.plan.name) # "Pro"
print(sub.features) # {"can_export": True, "seats": 10}# Gate features
if sub.status == "active" and sub.features.get("can_export"):
export_data(user_id)
else:
return {"error": "Upgrade to Pro to export"}Run pip install paylio to add the Python SDK. It supports Python 3.8+ with zero runtime dependencies beyond requests.
Set the PAYLIO_SECRET_KEY environment variable or pass it directly when initializing the client. Get your key from the Paylio dashboard.
Call paylio.get_subscription(user_id) to get the full subscription state including status, plan name, billing period, and entitlements.
Read the features dict from the subscription response to conditionally enable premium functionality in your application logic.
Install the paylio package with pip, set your API key, and call paylio.get_subscription(user_id). It returns the subscription status, plan details, and entitlements in a single call. The entire setup takes under 2 minutes.
Yes. The SDK is a standard Python package with no framework dependencies. It works with Django, Flask, FastAPI, Starlette, or any Python application. Import it and call the API from your views, routes, or endpoints.
It returns a Subscription object with status (active, trialing, past_due, canceled, none), plan details (name, interval, amount), the current billing period (start and end dates), and a features dictionary mapping entitlement keys to their values.
Create an endpoint that accepts POST requests at your webhook URL. Use paylio.verify_webhook(payload, signature) to validate authenticity, then handle events like subscription.created, subscription.renewed, and subscription.canceled.