Memberships
Zing Protocol's membership system allows creators to monetize their content through tiered access. Members pay USDC to access premium content from their favorite creators.
Membership Tiers
Creators can configure up to 3 membership tiers:
| Tier | Storage | Typical Price | Purpose |
|---|---|---|---|
| Basic | ~5 GB | Free or low cost | Casual supporters |
| Premium | ~20 GB | $5-20/mo | Active fans |
| Ultra | ~100 GB | $20-100/mo | Super fans |
The Membership Model
Properties
- Name
id- Type
- string
- Description
Unique identifier for the membership.
- Name
member- Type
- string
- Description
Sui address of the member.
- Name
creator- Type
- string
- Description
Sui address of the content creator.
- Name
tier- Type
- enum
- Description
Membership tier:
basic,premium, orultra.
- Name
price- Type
- string
- Description
Membership price in USDC (e.g., "5.00").
- Name
created_at- Type
- timestamp
- Description
Timestamp when membership started.
- Name
expired_at- Type
- timestamp
- Description
Timestamp when membership expires.
- Name
status- Type
- enum
- Description
Status:
active,expired, orcancelled.
Subscribe to Creator
Subscribe to a creator at a specific tier. This creates a recurring membership.
Required attributes
- Name
creator- Type
- string
- Description
The Sui address of the creator to subscribe to.
- Name
tier- Type
- enum
- Description
Membership tier:
basic,premium, orultra.
Transaction fees
A small transaction fee (~$0.001) applies for the Sui blockchain transaction.
Request
curl https://api.zing.protocol/v1/subscribe \
-H "Authorization: Bearer {jwt_token}" \
-d creator="0x123...creator" \
-d tier="premium"
List My Memberships
Get all memberships for the authenticated user (as member).
Query parameters
- Name
status- Type
- enum
- Description
Filter by status:
active,expired,cancelled.
- Name
limit- Type
- integer
- Description
Number of results to return (default: 10).
Request
curl https://api.zing.protocol/v1/memberships \
-H "Authorization: Bearer {jwt_token}" \
-d status="active"
List Creator's Members
Get all members for a creator (creator only).
Path parameters
- Name
address- Type
- string
- Description
The creator's Sui address.
Query parameters
- Name
tier- Type
- enum
- Description
Filter by tier:
basic,premium,ultra.
Request
curl https://api.zing.protocol/v1/creators/0x123.../members \
-H "Authorization: Bearer {jwt_token}"
Cancel Membership
Cancel a membership. The membership remains active until the expiration date.
Request
curl -X DELETE https://api.zing.protocol/v1/memberships/sub_abc123 \
-H "Authorization: Bearer {jwt_token}"
Membership Flow
User views locked content
↓
Content shows paywall with tier badge
↓
User clicks "Subscribe" button
↓
Membership dialog shows available tiers
↓
User selects tier and confirms
↓
Transaction: USDC deducted from wallet
↓
Membership created on Sui blockchain
↓
Access granted to content
↓
User can view full content
Membership Pricing
Creators set their own prices for each tier:
// Example pricing configuration
const pricing = {
basic: {
storage_gb: 5,
price_usdc: '1.00', // $1/month
},
premium: {
storage_gb: 20,
price_usdc: '10.00', // $10/month
},
ultra: {
storage_gb: 100,
price_usdc: '50.00', // $50/month
},
}
Revenue Model
| Stream | Fee Structure |
|---|---|
| Memberships | 95% Creator / 5% Platform |
| Donations | 95% Creator / 5% Platform |
| Referrals | 5-10% commission to referrer |
Platform Fee: Zing Protocol takes a 5% platform fee on all transactions to support platform development.
Checking Membership Access
// Check if user has access to content
const { data: memberInfo } = useZingQuery({
method: 'getMember',
params: [creatorAddress, suiAddress],
})
const hasAccess =
memberInfo &&
Number(memberInfo.expired_at) > Date.now() &&
memberInfo.level >= requiredLevel