Endpoint
Authentication
Requires a valid Supabase authentication token in the request headers.Response
Indicates whether the user has an active subscription
Subscription details (only present if
hasActiveSubscription is true)Unique subscription identifier (UUID)
The subscription plan type. Possible values:
PLAN_BASICO- Basic plan (1 month, $49.900 COP)PLAN_PRO- Pro plan (1 month, $89.900 COP)PLAN_PREMIUM- Premium plan (1 month, $149.900 COP)
Current subscription status. Possible values:
active- Subscription is active and validexpired- Subscription has expiredcancelled- Subscription was cancelled by user
ISO 8601 timestamp when the subscription started
ISO 8601 timestamp when the subscription expires
Number of days remaining until subscription expires
Payment provider used. Possible values:
mercadopagowompi
Amount paid in Colombian pesos (COP)
Example Request
Example Response
Active Subscription
No Active Subscription
Error Responses
401 Unauthorized
Returned when the user is not authenticated.500 Internal Server Error
Returned when there’s a server error retrieving the subscription.Subscription Expiration Logic
The endpoint automatically filters out expired subscriptions by checking:statusmust beactiveend_datemust be greater than the current timestamp
expire_old_subscriptions() function, which:
- Updates subscriptions with
end_date < NOW()tostatus = 'expired' - Updates the user’s profile to reflect no active subscription
Usage Example
Typically used in the dashboard to display subscription information:Related Endpoints
- Create Subscription - Create a new subscription after payment