Skip to main content

Premium Content & Subscription Integration Guide

This guide provides a comprehensive workflow for integrating Cryptofuse payment processing into premium content platforms, subscription services, and creator platforms. Follow these steps to implement complete user journeys from registration to recurring payments and content access management.

Overview of Premium Content Integration

The Cryptofuse system is ideally suited for premium content business models, offering:

  • Flexible subscription management: Support for one-time purchases, recurring subscriptions, and pay-per-view models
  • Multi-tier account structure: Master account for the platform with individual creator and user wallets
  • Automated revenue sharing: Configurable splits between platform and content creators
  • Secure content access control: Token-based authentication integrated with payment verification

Account Structure for Content Platforms

For premium content platforms (similar to OnlyFans, Patreon, or educational services), Cryptofuse implements a three-tier account structure:

  1. Platform Master Account: Your main tenant account that manages all funds and fees
  2. Creator Wallets: Sub-accounts for content creators who receive payments
  3. User/Subscriber Wallets: Sub-accounts for users who make payments for content access

This structure enables seamless fund management between your platform, creators, and users while maintaining proper accounting and automatic fee distribution.

Implementation Steps

1. Platform Setup

Start by configuring your platform's master account and defining your fee structure:

POST /platform/configure

Request:

{
"platform_fee_percentage": 20,
"minimum_creator_payout": 50.00,
"default_currency": "USDT",
"default_blockchain": "TRX",
"auto_convert_currencies": true
}

Response:

{
"status": "success",
"platform_id": "platform-550e8400-e29b-41d4-a716-446655440000",
"configuration": {
"platform_fee_percentage": 20,
"minimum_creator_payout": 50.00,
"default_currency": "USDT",
"default_blockchain": "TRX",
"auto_convert_currencies": true
}
}

2. Creator Onboarding

When a creator registers on your platform:

POST /wallets

Request:

{
"name": "Creator123_Wallet",
"account_type": "creator",
"payout_address": "TYN2WuEqttM5JjGk4ynGkxcnMRR9SZcvVx",
"revenue_share": {
"platform_percentage": 20,
"creator_percentage": 80
}
}

Response:

{
"result": {
"id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Creator123_Wallet",
"account_type": "creator",
"payout_address": "TYN2WuEqttM5JjGk4ynGkxcnMRR9SZcvVx"
}
}

Store this wallet ID in your system, associated with the creator's account.

3. Subscriber Onboarding

When a user registers on your platform:

POST /wallets

Request:

{
"name": "User456_Wallet",
"account_type": "subscriber"
}

Response:

{
"result": {
"id": "661f9511-f29b-42d4-b826-557766551111",
"name": "User456_Wallet",
"account_type": "subscriber"
}
}

4. Subscription Plan Creation

Define subscription tiers for creators:

POST /subscriptions/plans

Request:

{
"creator_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Premium Monthly",
"description": "Full access to premium content for one month",
"price_amount": 29.99,
"price_currency": "USDT",
"billing_cycle": "monthly",
"features": [
"Full content library access",
"Exclusive live streams",
"Direct messaging with creator"
],
"trial_period_days": 7
}

Response:

{
"plan_id": "plan-9876543210",
"creator_id": "550e8400-e29b-41d4-a716-446655440000",
"name": "Premium Monthly",
"price_amount": 29.99,
"price_currency": "USDT",
"created_at": "2025-04-30T12:34:56.789Z",
"active": true
}

5. One-Time Purchase Flow

For pay-per-view or single content purchases:

POST /purchases/create

Request:

{
"user_id": "661f9511-f29b-42d4-b826-557766551111",
"creator_id": "550e8400-e29b-41d4-a716-446655440000",
"content_id": "content-123456",
"price_amount": 9.99,
"price_currency": "USDT",
"description": "Premium Video #123",
"callback_url": "https://your-platform.com/purchase/callback"
}

Response:

{
"purchase_id": "purchase-a1b2c3d4",
"payment_id": "payment-abcdef123456",
"status": "pending",
"pay_address": "TYN2WuEqttM5JjGk4ynGkxcnMRR9SZcvVx",
"pay_amount": 9.99,
"pay_currency": "USDT",
"expiry_time": "2025-04-30T13:34:56.789Z"
}

6. Subscription Flow

For recurring subscriptions:

POST /subscriptions/create

Request:

{
"user_id": "661f9511-f29b-42d4-b826-557766551111",
"plan_id": "plan-9876543210",
"payment_method": {
"type": "crypto",
"currency": "USDT",
"blockchain": "TRX"
},
"callback_url": "https://your-platform.com/subscription/callback"
}

Response:

{
"subscription_id": "sub-1a2b3c4d",
"user_id": "661f9511-f29b-42d4-b826-557766551111",
"plan_id": "plan-9876543210",
"status": "pending_payment",
"current_period_start": "2025-04-30T12:34:56.789Z",
"current_period_end": "2025-05-30T12:34:56.789Z",
"payment_id": "payment-abcdef123456",
"pay_address": "TYN2WuEqttM5JjGk4ynGkxcnMRR9SZcvVx",
"pay_amount": 29.99,
"pay_currency": "USDT",
"expiry_time": "2025-04-30T13:34:56.789Z"
}

7. Monitoring Subscription Status

Check the status of subscriptions:

GET /subscriptions/{subscription_id}

Response:

{
"subscription_id": "sub-1a2b3c4d",
"user_id": "661f9511-f29b-42d4-b826-557766551111",
"creator_id": "550e8400-e29b-41d4-a716-446655440000",
"plan_id": "plan-9876543210",
"status": "active",
"current_period_start": "2025-04-30T12:34:56.789Z",
"current_period_end": "2025-05-30T12:34:56.789Z",
"cancel_at_period_end": false,
"created_at": "2025-04-30T12:34:56.789Z",
"trial_end": "2025-05-07T12:34:56.789Z",
"latest_payment": {
"payment_id": "payment-abcdef123456",
"status": "completed",
"amount": 29.99,
"currency": "USDT",
"transaction_hash": "0x1234...",
"paid_at": "2025-04-30T12:45:12.456Z"
}
}

8. Creator Earnings and Payouts

View creator earnings:

GET /earnings/{creator_id}

Response:

{
"creator_id": "550e8400-e29b-41d4-a716-446655440000",
"total_earnings": 2450.75,
"available_for_withdrawal": 1950.75,
"pending_earnings": 500.00,
"lifetime_earnings": 12500.50,
"currency": "USDT",
"earnings_by_period": [
{
"period": "current_month",
"amount": 650.25,
"currency": "USDT"
},
{
"period": "previous_month",
"amount": 1800.50,
"currency": "USDT"
}
]
}

Process creator withdrawal:

POST /earnings/withdrawal

Request:

{
"creator_id": "550e8400-e29b-41d4-a716-446655440000",
"amount": 1000.00,
"currency": "USDT",
"blockchain": "TRX"
}

Response:

{
"withdrawal_id": "withdraw-1234567890",
"creator_id": "550e8400-e29b-41d4-a716-446655440000",
"amount": 1000.00,
"fee": 2.50,
"net_amount": 997.50,
"currency": "USDT",
"blockchain": "TRX",
"address": "TYN2WuEqttM5JjGk4ynGkxcnMRR9SZcvVx",
"status": "processing",
"created_at": "2025-04-30T14:34:56.789Z"
}

9. Verifying User Access

Check if a user has access to content:

POST /access/verify

Request:

{
"user_id": "661f9511-f29b-42d4-b826-557766551111",
"creator_id": "550e8400-e29b-41d4-a716-446655440000",
"content_id": "content-123456"
}

Response:

{
"has_access": true,
"access_type": "subscription",
"subscription_id": "sub-1a2b3c4d",
"expires_at": "2025-05-30T12:34:56.789Z",
"content": {
"id": "content-123456",
"title": "Premium Content",
"creator_id": "550e8400-e29b-41d4-a716-446655440000",
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
}

10. Token-Based Content Access

Secure content delivery using access tokens:

GET /content/{content_id}

Headers:

Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...

Response:

{
"content_id": "content-123456",
"title": "Premium Content",
"creator_id": "550e8400-e29b-41d4-a716-446655440000",
"content_url": "https://secure-cdn.your-platform.com/content/123456?token=xyz",
"mime_type": "video/mp4",
"duration": 1850,
"created_at": "2025-04-15T10:30:00.000Z"
}

Complete Implementation Flow

graph TD
%% Main Entities
User((User/Subscriber))
Creator((Content Creator))
Platform[Platform]
API{Cryptofuse API}
MasterWallet[(Platform Master Wallet)]
CreatorWallet[(Creator Wallet)]
UserWallet[(User Wallet)]
Content[(Content)]

%% Platform Setup
subgraph "1. PLATFORM SETUP"
1A[Configure Platform]
1B[Set Fee Structure]
end

%% Creator Onboarding
subgraph "2. CREATOR ONBOARDING"
2A[Creator Signs Up]
2B[Create Creator Wallet]
2C[Define Subscription Plans]
end

%% User Onboarding
subgraph "3. USER ONBOARDING"
3A[User Signs Up]
3B[Create User Wallet]
end

%% Payment Flows
subgraph "4. PAYMENT & SUBSCRIPTION FLOWS"
4A[One-Time Purchase]
4B[Subscribe to Creator]
4C[Recurring Billing]
4D[Revenue Distribution]
end

%% Access Management
subgraph "5. ACCESS MANAGEMENT"
5A[Verify Access Rights]
5B[Generate Access Token]
5C[Secure Content Delivery]
end

%% Creator Payouts
subgraph "6. CREATOR PAYOUTS"
6A[Calculate Earnings]
6B[Process Withdrawal]
6C[Creator Receives Funds]
end

%% Flow Connections

%% Platform Setup Flow
Platform --> 1A
1A --> API
1B --> MasterWallet

%% Creator Onboarding Flow
Creator --> 2A --> Platform
Platform -- "POST /wallets" --> 2B --> API
API --> CreatorWallet
Platform -- "POST /subscriptions/plans" --> 2C --> API

%% User Onboarding Flow
User --> 3A --> Platform
Platform -- "POST /wallets" --> 3B --> API
API --> UserWallet

%% Payment Flow
User -- "Views Content" --> Platform
Platform -- "Display Subscription Options" --> User
User -- "Purchases/Subscribes" --> Platform
Platform -- "POST /purchases/create or /subscriptions/create" --> 4A --> API
4A --> UserWallet
Platform -- "Check Subscription Status" --> 4B --> API
4B --> CreatorWallet
API -- "Recurring Charge" --> 4C --> UserWallet
API -- "Split Revenue" --> 4D
4D -- "Platform Fee" --> MasterWallet
4D -- "Creator Share" --> CreatorWallet

%% Access Management Flow
User -- "Request Content" --> Platform
Platform -- "POST /access/verify" --> 5A --> API
5A -- "Generate JWT" --> 5B
5B -- "Return Access Token" --> Platform
Platform -- "Secure URL with Token" --> 5C
5C -- "Content Delivery" --> User

%% Creator Payout Flow
Creator -- "Request Withdrawal" --> Platform
Platform -- "GET /earnings/{creator_id}" --> 6A --> API
6A --> CreatorWallet
Platform -- "POST /earnings/withdrawal" --> 6B --> API
API --> MasterWallet
6B -- "Process Withdrawal" --> 6C
6C --> Creator

%% Styling
classDef user fill:#f9d5e5,stroke:#333,stroke-width:2px;
classDef creator fill:#d4f7d9,stroke:#333,stroke-width:2px;
classDef platform fill:#eeeeee,stroke:#333,stroke-width:2px;
classDef api fill:#d5e8f9,stroke:#333,stroke-width:2px;
classDef wallet fill:#bbdefb,stroke:#333,stroke-width:2px;
classDef content fill:#e2f0cb,stroke:#333,stroke-width:2px;
classDef section1 fill:#bbdefb,stroke:#333,stroke-width:1px;
classDef section2 fill:#d4f7d9,stroke:#333,stroke-width:1px;
classDef section3 fill:#f9d5e5,stroke:#333,stroke-width:1px;
classDef section4 fill:#fff9c4,stroke:#333,stroke-width:1px;
classDef section5 fill:#e2f0cb,stroke:#333,stroke-width:1px;
classDef section6 fill:#ffd6cc,stroke:#333,stroke-width:1px;

class User user;
class Creator creator;
class Platform platform;
class API api;
class MasterWallet,CreatorWallet,UserWallet wallet;
class Content content;

class 1A,1B section1;
class 2A,2B,2C section2;
class 3A,3B section3;
class 4A,4B,4C,4D section4;
class 5A,5B,5C section5;
class 6A,6B,6C section6;

Subscription Lifecycle

The subscription lifecycle shows the progression from initial signup to renewal or cancellation:

stateDiagram-v2
[*] --> pending_payment: User Subscribes
pending_payment --> active: Payment Confirmed
pending_payment --> failed: Payment Failed

active --> past_due: Renewal Payment Failed
past_due --> active: Payment Recovered
past_due --> canceled: Grace Period Expired

active --> trial: Free Trial Period
trial --> active: Trial Converted
trial --> canceled: Trial Ended Without Conversion

active --> canceled: User Cancels
active --> active: Successful Renewal

canceled --> [*]
failed --> [*]

Revenue Flow

This diagram illustrates how money flows through the system:

flowchart LR
A([User Payment]) --> B{Platform Fee Split}
B -- 20% --> C[Platform Revenue]
B -- 80% --> D[Creator Revenue]

D --> E{Payout Threshold}
E -- Below Minimum --> F[Held in System]
E -- Above Minimum --> G[Eligible for Payout]

G --> H{Payout Request}
H -- Creator Requests --> I[Withdrawal Processing]
I --> J[Blockchain Transaction]
J --> K([Creator Receives Funds])

H -- Automatic Payout --> I

F -- Accumulates --> E

Implementation Considerations

1. Subscription Management

  • Trial Periods: Offer free trials with access tokens that expire after the trial period
  • Renewal Handling: Set up automatic renewal notifications before charging
  • Grace Periods: Configure customizable grace periods for failed payments
  • Cancellation Logic: Allow cancellation that takes effect at the end of the billing period

2. Content Protection

  • Token-Based Access: Use JWT tokens with short expiration times for content access
  • DRM Integration: Support for industry-standard DRM solutions
  • Watermarking: Implement dynamic watermarking with subscriber information
  • Access Revocation: Immediately revoke access when subscriptions end or payments fail

3. Revenue Sharing

  • Flexible Fee Structure: Configure different fee percentages for different creators or content types
  • Multi-Currency Support: Allow creators to receive funds in their preferred cryptocurrency
  • Tax Reporting: Generate earnings reports for tax compliance
  • Instant vs. Delayed Payouts: Configure holding periods for fraud prevention

4. User Experience

  • Subscription Management Portal: Provide users with tools to manage their subscriptions
  • Payment Method Management: Allow users to update payment methods without disrupting subscriptions
  • Content Discovery: Implement recommendation systems based on subscription history
  • Access Level Indicators: Clearly show users what content they can access based on their subscriptions

Technical Integration

API Authentication

All API requests must include OAuth authentication:

Authorization: Bearer {access_token}

Obtain access tokens through the standard OAuth 2.0 flow:

POST /oauth/token

Request:

{
"grant_type": "client_credentials",
"client_id": "your_client_id",
"client_secret": "your_client_secret",
"scope": "read write subscriptions"
}

Webhooks for Real-Time Updates

Set up webhooks to receive real-time updates about:

  1. Subscription Events: Creation, cancellation, renewal success/failure
  2. Payment Events: Successful payments, failed payments, refunds
  3. Creator Events: Payout processing, earnings updates
  4. Content Access Events: Access attempts, potential abuse

Configure your webhook endpoint:

POST /webhooks/configure

Request:

{
"url": "https://your-platform.com/webhooks/cryptofuse",
"events": [
"subscription.created",
"subscription.updated",
"subscription.canceled",
"payment.succeeded",
"payment.failed",
"payout.processed",
"access.revoked"
],
"secret": "your_webhook_secret"
}

Implementation Checklist

  1. ✅ Configure platform settings and fee structure
  2. ✅ Implement creator onboarding flow
  3. ✅ Implement user registration and wallet creation
  4. ✅ Set up subscription plan management
  5. ✅ Implement payment flows (one-time and recurring)
  6. ✅ Configure revenue sharing rules
  7. ✅ Implement content access verification
  8. ✅ Set up secure content delivery
  9. ✅ Implement creator earnings and payouts
  10. ✅ Configure webhooks for real-time updates

Security Considerations

  1. Payment Security:

    • All transactions are secured by blockchain technology
    • Payment addresses are unique to each transaction
    • All API communications use TLS/SSL encryption
  2. Content Security:

    • Access tokens use short expiration times (5-15 minutes)
    • Content URLs are signed and expire quickly
    • Implement IP-based access controls as an additional layer
  3. Account Security:

    • Require 2FA for creator accounts
    • Implement IP-based login monitoring
    • Set withdrawal limits and waiting periods for large withdrawals
  4. Data Protection:

    • All personal data is encrypted at rest
    • Payment and subscription details are encrypted with platform-specific keys
    • Implement data retention policies compliant with regulations

Further Resources