Memberships API
The Memberships API provides a flexible system for managing user, organization, and project memberships. Memberships link your entities (User, Organization, or Project) to a Membership Tier and manage their access rights, auto-renewals, and feature entitlements.
These maps directly to your Products via the metadata.membership_type_id attribute, automatically granting access when a subscription is purchased.
Base URLs
All public endpoints are mounted under /bridge-payment/memberships.
https://your-instance.pubflow.com/bridge-payment/membershipsAdmin routes are mounted under /bridge-payment/admin/memberships.
https://your-instance.pubflow.com/bridge-payment/admin/membershipsImportant Routing Note
Do not use the /api/memberships prefix. The Bridge server uses /bridge-payment/memberships as its root for this module.
Core Concepts
Understanding these elements gives you full control over the Bridge Memberships system:
- Membership Tier (
membership_types): Determines the available plans (e.g., Free, Premium) along with their price, duration (recurring, fixed, lifetime), and the features included. - Entity Membership (
user_memberships/project_memberships/organization_memberships): The active record showing a customer owns a specific tier. Includes expiration dates, cancellation reasons, and subscription linking. - Project Tier Resolution: Extremely useful for platforms like Pubflow Flowfull tracking per-project quotas (e.g.,
pubflow_freeVSa1_starter).
Membership Tiers (Public)
Tiers are the base definitions of your subscription levels.
List active membership tiers
Responses
Tier list
Get membership tier
Current User Memberships (/me)
The /me shortcut routes allow the current authenticated flowless user to view and manage their subscriptions directly without providing a User ID.
List current user's memberships
Get current user's membership
Cancel current user membership
Authorizations
Session ID from Flowless authentication
Parameters
Path Parameters
Request Body
Responses
Cancelled membership
User Memberships
For managing a specific user's memberships (requires ownership check).
List memberships for user (ownership enforced)
Get membership for user
Cancel membership for user
Authorizations
Session ID from Flowless authentication
Parameters
Path Parameters
Request Body
Responses
Cancelled membership
Organization Memberships
Organization memberships assign tiers to an entire organization, unlocking features for all its active members.
List organization memberships
Requires org permission canManageSubscriptions (via organization access middleware).
Authorizations
Session ID from Flowless authentication
Parameters
Path Parameters
Responses
Memberships
Get organization membership
Cancel organization membership
Authorizations
Session ID from Flowless authentication
Parameters
Path Parameters
Request Body
Responses
Cancelled membership
Project Memberships
Project-level memberships bind subscription limits and quotas to a specific workspace project.
List memberships for project
Get project membership
Cancel project membership
Authorizations
Session ID from Flowless authentication
Parameters
Path Parameters
Request Body
Responses
Cancelled membership
Feature Access Verification
The handiest route for frontends and microservices to ask: "Can this user do X?"
Verify feature access for current user
Admin Management
Administrative endpoints allow team members to create new tiers, issue compensatory memberships, analyze churn, and manually extend expiration dates.
Managing Tiers
Create membership tier
Update membership tier
Deactivate membership tier
Managing Entity Memberships (Admin)
List all memberships (paginated)
List memberships for user (admin)
Create user membership (admin)
Update membership record
Extend membership by days
Analytics
Gain insights into how your memberships are performing.
Membership analytics overview
Membership churn analytics
Integrating Subscriptions & Memberships
Memberships seamlessly integrate with Subscriptions:
- Admin creates a Product with
metadata: { "membership_type_id": "premium_monthly" }. - A customer subscribes to the Product.
- Bridge Payment's webhooks detect the successful payment and automatically generate (or extend) the membership.
- Your application runs
GET /bridge-payment/memberships/access?feature=hd_videoto verify access.