Subscriptions upgrade
POST
https://app.sulus.ai/api/subscriptions/upgrade
Upgrade the active subscription to a higher-priced package
Authentication
Send a bearer token created on your dashboard's Developer page:
Authorization: Bearer <YOUR_API_KEY>
Request body
package_id
integer
Required
Target package; must cost more than the current package.
Validation:
required|exists:subscription_packages,idStored in
user_subscriptions.subscription_package_idErrors
| Status | Meaning | Body |
|---|---|---|
401 |
Missing or invalid bearer token | |
422 |
Validation failed | {"message":"The package id field is required.","errors":{"package_id":["The package id field is required."]}} |
403 |
Package belongs to another reseller | {"success":false,"message":"Package not available for your reseller"} |
404 |
No active subscription | {"success":false,"message":"No active subscription found"} |
400 |
Target package is not higher priced | {"success":false,"message":"You can only upgrade to a higher tier"} |
Notes
- Updates subscription_package_id only; does not create a new checkout session.
curl --request POST \
--url https://app.sulus.ai/api/subscriptions/upgrade \
--header 'Authorization: Bearer <YOUR_API_KEY>' \
--header 'Content-Type: application/json' \
--data '{
"package_id": 4
}'
import requests
url = "https://app.sulus.ai/api/subscriptions/upgrade"
headers = {"Authorization": "Bearer <YOUR_API_KEY>"}
payload = {
"package_id": 4
}
response = requests.post(url, json=payload, headers=headers)
print(response.json())
package main
import (
"fmt"
"io"
"net/http"
"strings"
)
func main() {
url := "https://app.sulus.ai/api/subscriptions/upgrade"
payload := strings.NewReader(`{
"package_id": 4
}`)
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <YOUR_API_KEY>")
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))
}
Response
200
{
"success": true,
"data": {
"id": 19,
"user_id": 12,
"reseller_id": "9f3c2a10-5b6d-4e8f-9a1b-2c3d4e5f6789",
"subscription_package_id": 3,
"status": "active",
"trial_ends_at": null,
"current_period_start": "2026-07-01T00:00:00.000000Z",
"current_period_end": "2026-08-01T00:00:00.000000Z",
"cancelled_at": null,
"ends_at": null,
"stripe_subscription_id": "sub_1PxExampleSubscriptionId",
"stripe_customer_id": "cus_1PxExampleCustomerId",
"stripe_checkout_session_id": null,
"custom_amount": null,
"billing_interval": "monthly",
"metadata": {
"billing_interval": "monthly"
},
"created_at": "2026-07-01T00:05:00.000000Z",
"updated_at": "2026-07-01T00:05:00.000000Z",
"package": {
"id": 3,
"name": "Growth",
"price": "99.00",
"yearly_price": "990.00",
"formatted_price": "$99.00"
}
},
"message": "Subscription upgraded successfully"
}
Response — POST
/subscriptions/upgrade
200
{
"success": true,
"data": {
"id": 19,
"user_id": 12,
"reseller_id": "9f3c2a10-5b6d-4e8f-9a1b-2c3d4e5f6789",
"subscription_package_id": 3,
"status": "active",
"trial_ends_at": null,
"current_period_start": "2026-07-01T00:00:00.000000Z",
"current_period_end": "2026-08-01T00:00:00.000000Z",
"cancelled_at": null,
"ends_at": null,
"stripe_subscription_id": "sub_1PxExampleSubscriptionId",
"stripe_customer_id": "cus_1PxExampleCustomerId",
"stripe_checkout_session_id": null,
"custom_amount": null,
"billing_interval": "monthly",
"metadata": {
"billing_interval": "monthly"
},
"created_at": "2026-07-01T00:05:00.000000Z",
"updated_at": "2026-07-01T00:05:00.000000Z",
"package": {
"id": 3,
"name": "Growth",
"price": "99.00",
"yearly_price": "990.00",
"formatted_price": "$99.00"
}
},
"message": "Subscription upgraded successfully"
}