curl -X GET "https://api.usegately.com/api/v1/user-plans/current" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-User-ID: user_123"
{
"subscription": {
"id": "sub_123",
"plan_id": "plan_456",
"plan_name": "Pro Plan",
"status": "active",
"current_period_start": "2024-01-01T00:00:00Z",
"current_period_end": "2024-02-01T00:00:00Z",
"cancel_at_period_end": false
}
}
Plans
Get Current Subscription
Get the current subscription for a user
GET
/
api
/
v1
/
user-plans
/
current
curl -X GET "https://api.usegately.com/api/v1/user-plans/current" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-User-ID: user_123"
{
"subscription": {
"id": "sub_123",
"plan_id": "plan_456",
"plan_name": "Pro Plan",
"status": "active",
"current_period_start": "2024-01-01T00:00:00Z",
"current_period_end": "2024-02-01T00:00:00Z",
"cancel_at_period_end": false
}
}
Retrieve the active subscription for a user.
string
required
The user ID to get subscription for
Response
object
The active subscription object, or null if none
curl -X GET "https://api.usegately.com/api/v1/user-plans/current" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "X-User-ID: user_123"
{
"subscription": {
"id": "sub_123",
"plan_id": "plan_456",
"plan_name": "Pro Plan",
"status": "active",
"current_period_start": "2024-01-01T00:00:00Z",
"current_period_end": "2024-02-01T00:00:00Z",
"cancel_at_period_end": false
}
}
Was this page helpful?