Skip to main content

Error 402: Not Enough Credits

Issue

A 402 error (or a message indicating “Metered use” or “Not enough credits”) means that your account does not currently have enough credits to complete the operation.
This typically happens when:

  • Your credit balance has reached zero.

  • The request requires more credits than your current balance.


How to Troubleshoot

1. Check if you have multiple accounts

  • If you maintain more than one PDF.co account, make sure you are using the API key from the account that has sufficient credits.

  • Using an API key from an account with no credits will trigger a 402 error, even if another account has credits available.


2. Verify your credit balance

  • Log in to your dashboard: https://app.pdf.co

  • Check your remaining credits at the top right corner of the dashboard.

  • If needed, you can top up credits manually or upgrade your plan.


3. Check how many credits your request requires

  • Credits are deducted per page or per request, depending on the API endpoint used.

  • Some operations may require more credits, such as:

    • OCR (text recognition from scanned PDFs or images)

    • Async operations (for large or complex files)

    • Multi-page document processing

- If your request needs more credits than what’s available, it will fail with a 402 error.


Preventing Future Credit Shortages

To avoid workflow disruptions caused by running out of credits, we recommend enabling Smart Credit Refill.

Here’s how it works:

  • When your account credit balance drops below 2,000 credits, the system will automatically top up your account.

  • To enable this feature:

    1. Make sure you have an active paid plan.

    2. Go to your Billing Settings.

    3. Toggle the Smart Credit Refill button to “On”.

    4. Select the credit pack of your choice for automatic refills.

This ensures your account always has enough credits to process your requests without unexpected interruptions.


Recommended Next Steps

  • Confirm you’re using the correct API key.

  • Check your credit balance.

  • Review your API request and estimate its credit usage.

  • Enable Smart Credit Refill or purchase more credits to avoid future disruptions.


Additional Resources:

Did this answer your question?