01
Cluster types
// Before building, decide how your cluster works — this affects everything
user_generated
simpler
✓ User creates their own Match ID (username) at payment time
✓ No setup required on your end
✗ Trial period not supported
→ Good for straightforward paid-only apps
admin_generated
trials ✓
✓ You control who gets access
✓ Trial periods work (201 Trial Active)
✓ Good for onboarding before payment
✗ You must pre-create every Match ID via API
02
Check & assign access level
// Call this every time a user logs in or your app starts
pseudocode
FUNCTION get_access_level(username): response = HTTP_GET( url = "https://api.solsub.online/check-match-id/", params = { match_id: username }, headers = { "api-key": "sk_your_key" } ) IF response.status == 200: RETURN FULL // paid_active — works in BOTH cluster types ELSE IF response.status == 201: RETURN TRIAL // trial_active — ONLY in admin_generated clusters ELSE IF response.status == 410: RETURN NO_ACCESS // expired ELSE IF response.status == 422: RETURN NO_ACCESS // not found / never paid ELSE: RETURN NO_ACCESS // safe default — always deny on error
Status 201 Trial Active will only ever appear if your cluster type is admin_generated. With user_generated clusters, you will never receive a 201 response.
status reference
| HTTP status | Detail | Access level | Cluster type |
|---|---|---|---|
| 200 | Paid Active | ● FULL | Both types |
| 201 | Trial Active | ● TRIAL | admin_generated only |
| 410 | Expired | ● NO ACCESS | — |
| 422 | Not Found | ● NO ACCESS | — |
03
Pre-create users (admin_generated only)
// Skip this section if you're using user_generated clusters
With admin_generated clusters, you create Match IDs via API before the user pays. This is what enables the trial flow — the user exists in your cluster in trial mode, then upgrades to paid once they pay on SolSub.
pseudocode
// Call this when a new user signs up in your app FUNCTION setup_user(username): response = HTTP_POST( url = "https://api.solsub.online/create-match-id/", headers = { "api-key": "sk_your_key", "Content-Type": "application/json" }, body = { match_id: username } ) IF response.status == 201: // Match ID created in trial mode automatically // valid_till is set based on your cluster's trial_period PRINT "User registered, trial until:", response.valid_till // What happens next: // User pays on SolSub using their username as the Match ID // → trial upgrades to paid // → your app now sees 200 instead of 201
04
Gate features based on access level
// Run this after every login or app launch
pseudocode
FUNCTION load_app(username): level = get_access_level(username) IF level == FULL: ENABLE all features SHOW "Full access active." ELSE IF level == TRIAL: // ⚠ Only reachable if cluster is admin_generated ENABLE basic features only DISABLE premium features SET usage_limit = 10 SHOW "Trial active. Pay on SolSub to unlock everything." ELSE: // NO_ACCESS — expired or never paid DISABLE all features SHOW "No active subscription." SHOW "Pay on SolSub with username: {username}"
05
Response summary by cluster type
// Quick reference — what responses you will and won't see
user_generated cluster
422
→
NO ACCESS
not paid
410
→
NO ACCESS
expired
200
→
FULL
paid
201
→
never appears
admin_generated cluster
422
→
NO ACCESS
not pre-created
410
→
NO ACCESS
expired
201
→
TRIAL
pre-created, unpaid
200
→
FULL
pre-created + paid