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
}
}
Get the current subscription for a user
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
}
}
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?