Errors

No Subscription

409 - User does not have an active subscription

Overview

The 409 No Subscription error occurs when attempting to access premium features or exceed free tier limits without an active paid subscription.

HTTP Status Code

409

Error Response

{
  "type": "https://scan-documents.com/docs/errors/no-subscription",
  "title": "No Subscription",
  "status": 409,
  "message": "User does not have an active subscription"
}

Common Causes

  • Attempting to use premium API features without a subscription
  • Subscription has expired or been cancelled
  • Payment failure causing subscription to be suspended
  • Exceeding free tier usage limits
  • Using premium endpoints without proper plan

How to Fix

  1. Check Subscription Status: Verify your current subscription status in your account dashboard:

  2. Upgrade Your Plan: If you don't have an active subscription, consider upgrading:

# Check your current usage and limits
curl -X GET https://api.scan-documents.com/v1/account/usage \
  -H "Authorization: Bearer YOUR_API_KEY"
  1. Update Payment Method: If your subscription is suspended due to payment failure:

    • Visit your billing settings
    • Update your payment method
    • Retry the failed payment
  2. Review API Usage: Ensure you're not exceeding your plan's limits:

// Example: Check if subscription is active before making requests
const checkSubscription = async () => {
  try {
    const response = await fetch('https://api.scan-documents.com/v1/account', {
      headers: {
        'Authorization': 'Bearer YOUR_API_KEY'
      }
    });

    const account = await response.json();

    if (!account.subscription.active) {
      console.log('Please upgrade your subscription to continue');
      // Redirect to billing page
    }
  } catch (error) {
    if (error.status === 409) {
      // Handle no subscription error
    }
  }
};

Subscription Tiers

Free Tier

  • 100 API calls per month
  • Basic image operations
  • Basic PDF operations
  • Community support

Pro Tier ($29/month)

  • 10,000 API calls per month
  • All image operations
  • All PDF operations
  • Priority support
  • Webhook support

Enterprise Tier (Custom pricing)

  • Unlimited API calls
  • All features
  • Dedicated support
  • Custom integrations
  • SLA guarantee

Examples

Attempting Premium Feature Without Subscription

Request:

# Trying to use OCR (premium feature) without subscription
curl -X POST https://api.scan-documents.com/v1/image-operations/extract-text \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "input=file_abc123"

Response:

{
  "type": "https://scan-documents.com/docs/errors/no-subscription",
  "title": "No Subscription",
  "status": 409,
  "message": "User does not have an active subscription"
}

Exceeding Free Tier Limits

Request:

# 101st API call in the month (exceeding free tier limit)
curl -X POST https://api.scan-documents.com/v1/image-operations/convert \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "input=file_xyz789" \
  -F "format=pdf"

Response:

{
  "type": "https://scan-documents.com/docs/errors/no-subscription",
  "title": "No Subscription",
  "status": 409,
  "message": "User does not have an active subscription. You have exceeded your free tier limit of 100 API calls per month."
}

Best Practices

  1. Monitor Usage: Regularly check your API usage to avoid hitting limits unexpectedly:
const getUsage = async () => {
  const response = await fetch('https://api.scan-documents.com/v1/account/usage', {
    headers: {
      'Authorization': 'Bearer YOUR_API_KEY'
    }
  });

  const usage = await response.json();
  console.log(`Used ${usage.calls} of ${usage.limit} API calls this month`);

  // Alert when approaching limit
  if (usage.calls >= usage.limit * 0.9) {
    console.warn('Approaching API call limit!');
  }
};
  1. Implement Graceful Degradation: Handle subscription errors gracefully in your application:
async function processDocument(fileId) {
  try {
    return await performPremiumOperation(fileId);
  } catch (error) {
    if (error.status === 409) {
      // Fall back to basic operation or prompt user to upgrade
      return showUpgradePrompt();
    }
    throw error;
  }
}
  1. Cache Results: Reduce API calls by caching results when possible to stay within limits.

  2. Plan Ahead: If you anticipate high usage, upgrade to a Pro or Enterprise plan before hitting limits.

Getting Help

If you believe you're receiving this error incorrectly or need help with your subscription: