Skip to content

Enterprise Overview

Pocketbook Enterprise provides advanced features for organizations that need to issue certificates at scale, manage custom workflows, and integrate certificate issuance into their existing systems.

Core Enterprise Features

1. Custom Billing and Pricing

Enterprise customers benefit from flexible billing arrangements tailored to their needs:

  • Yearly Tiered Pricing: Volume discounts that scale with usage
  • Custom Contract Pricing: Negotiated rates for large enterprises
  • Batch Invoicing: Consolidated monthly/bi-weekly billing instead of per-transaction charges
  • Flexible Payment Terms: Support for net30, net60, and net90 payment schedules

2. API Access

Programmatic access to all Pocketbook features:

  • API Keys: Secure authentication for server-to-server integration
  • Granular Scopes: Fine-grained permission control
  • Custom Rate Limits: Higher throughput for enterprise needs
  • Webhooks: Real-time event notifications for your systems

3. Custom Templates

Standardized certificate creation for consistency:

  • Template Manager: Create and manage custom certificate templates
  • Warranty Presets: Built-in warranty fields for product certificates
  • Bulk Operations: Use templates with bulk minting for efficiency
  • Template Inheritance: Extend base templates for product lines

4. Analytics and Reporting

Comprehensive insights into your certificate operations:

  • Usage Tracking: Real-time certificate and voucher creation metrics
  • Cost Analytics: Detailed breakdown of costs by period
  • Usage History: Historical data for trend analysis
  • Custom Reports: EnterpriseReportingService for advanced analytics

5. Advanced Features

Additional capabilities for enterprise workflows:

  • Budget Management: Set spending limits with alerts
  • Bulk Minting: Process hundreds or thousands of certificates efficiently
  • Custom Branding: White-label certificate pages
  • Priority Support: Dedicated account management and SLA guarantees

Billing System

Yearly Tiered Pricing

All certificate production uses volume-based pricing that gets more affordable as you scale:

Yearly UnitsPrice per UnitAnnual Savings
1 - 10,000$0.65Base tier
10,001 - 100,000$0.4531% discount
100,001+$0.3546% discount

Key Points:

  • Both voucher creation and direct mints count toward the same yearly counter
  • Counters reset on January 1st each year
  • Invoices are generated monthly, but tier calculation uses cumulative yearly total
  • Vouchers are charged once at creation; subsequent minting is free

Batch Billing

Enterprise customers receive consolidated invoices instead of per-transaction charges:

typescript
// Usage events are recorded in real-time
const event = await BillingService.recordUsage(
  userId,
  'certificate_minted',
  quantity,
  'certificate'
);

// But invoicing happens at billing cycle end
// Monthly invoice includes all usage events from the period

Benefits:

  • Lower Stripe transaction fees
  • Easier accounting reconciliation
  • Predictable monthly billing
  • Better cash flow management

Custom Contract Pricing

Large enterprises can operate under custom contracts:

javascript
// Enable custom contract pricing for a customer
db.customerbilling.updateOne(
  { userId: "enterprise_user_id" },
  {
    $set: {
      "customContractPricing.enabled": true,
      "customContractPricing.description": "Enterprise Annual Contract 2025",
      "customContractPricing.contractId": "CONTRACT-2025-001",
      "customContractPricing.billingContact": "billing@company.com"
    }
  }
)

Features:

  • No credit card required
  • Manual invoicing
  • Negotiated pricing tiers
  • Flexible payment terms (net30/60/90)
  • Bypass standard payment gates

Usage Tracking

Monitor your usage in real-time:

http
GET /api/billing/usage
Authorization: Bearer <token>

Response:
{
  "certificatesThisPeriod": 150,
  "vouchersCreatedThisPeriod": 200,
  "currentPeriodCost": 97.50,
  "unitsThisYear": 350,
  "currentTier": "Tier 1",
  "costThisMonth": 125.00,
  "costThisYear": 850.00
}

Upcoming Invoice Preview

See what your next invoice will look like:

http
GET /api/billing/upcoming-invoice
Authorization: Bearer <token>

Response:
{
  "estimatedTotal": 103.59,
  "subtotal": 97.50,
  "tax": 6.09,
  "certificateCount": 150,
  "voucherCount": 25,
  "apiCallsThisPeriod": 50,
  "dueDate": "2025-02-01",
  "billingCycle": "monthly",
  "lineItems": [
    {
      "type": "certificates",
      "description": "Certificate Usage (150 certificates)",
      "amount": 97.50
    },
    {
      "type": "tax",
      "description": "Sales Tax (6.25%)",
      "amount": 6.09
    }
  ]
}

API Keys

Creating API Keys

API keys provide secure, scoped access to Pocketbook APIs:

http
POST /api/enterprise/api-keys
Authorization: Bearer <jwt>
Content-Type: application/json

{
  "name": "Production API Key",
  "scopes": [
    "bulk:mint",
    "voucher:create",
    "certificate:read",
    "analytics:read"
  ],
  "rateLimit": 1000
}

Response:

json
{
  "success": true,
  "data": {
    "apiKey": {
      "id": "507f1f77bcf86cd799439014",
      "name": "Production API Key",
      "keyPrefix": "pk_00000000",
      "fullKey": "pk_0000000000000000000000000000000000000000000000000000000000000001",
      "scopes": ["bulk:mint", "voucher:create"],
      "createdAt": "2025-01-15T10:30:00Z"
    }
  }
}

Important: The full API key is only shown once. Store it securely.

Available Scopes

Control what each API key can access:

ScopeDescription
bulk:mintCreate bulk mint jobs
bulk:retryRetry failed bulk jobs
voucher:createCreate vouchers
voucher:readRead voucher details
certificate:readRead certificate data
analytics:readAccess analytics and reporting data

Using API Keys

Include the API key in the x-api-key header:

http
POST /api/bulk-mint
x-api-key: pk_0000000000000000000000000000000000000000000000000000000000000001
Content-Type: multipart/form-data

Managing API Keys

http
# List all API keys
GET /api/enterprise/api-keys

# Get specific key details (without full key)
GET /api/enterprise/api-keys/:keyId

# Update key name or scopes
PUT /api/enterprise/api-keys/:keyId

# Revoke a key
POST /api/enterprise/api-keys/:keyId/revoke

# Regenerate key (new value, same scopes)
POST /api/enterprise/api-keys/:keyId/regenerate

# Get usage statistics
GET /api/enterprise/api-keys/:keyId/usage?from=2025-01-01&to=2025-01-31

Rate Limits

Enterprise API keys have custom rate limits:

http
# Rate limit headers in responses
X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 998
X-RateLimit-Reset: 1640995200

Default limits:

  • Standard API Keys: 1000 requests/hour
  • Custom Limits: Configure per key based on needs
  • Burst Allowance: Short-term spikes allowed

Templates

Template System Overview

Templates standardize certificate creation and ensure consistency across your organization:

  • Custom Fields: Define exactly what information you need
  • Field Types: Text, number, date, select, textarea, URL, email, etc.
  • Validation: Mark fields as required and set validation rules
  • Presets: Built-in field sets for common use cases

Creating a Custom Template

  1. Navigate to your enterprise dashboard
  2. Click "Templates" → "Create Custom Template"
  3. Define your template:
    • Template name and description
    • Custom fields with types and validation
    • Default values
    • Help text for users
javascript
// Example template structure
{
  "name": "Employee Achievement Certificate",
  "description": "Standard certificate for employee achievements",
  "fields": [
    {
      "key": "employee_name",
      "label": "Employee Name",
      "type": "text",
      "required": true
    },
    {
      "key": "achievement_type",
      "label": "Achievement Type",
      "type": "select",
      "options": ["Excellence", "Innovation", "Leadership"],
      "required": true
    },
    {
      "key": "date_earned",
      "label": "Date Earned",
      "type": "date",
      "required": true
    }
  ]
}

Warranty Template Preset

Pocketbook includes a comprehensive warranty preset for product certificates:

Included Fields:

  • Warranty Period: 1 year, 2 years, 3 years, 5 years, 10 years, or Lifetime
  • Warranty Type: Manufacturer, Extended, Limited, Full Coverage, Parts Only, Labor Only
  • Warranty Start Date: When coverage begins (required)
  • Warranty End Date: Auto-calculated based on period
  • Coverage Details: What is covered under the warranty
  • Exclusions: What is NOT covered
  • Claim Process: How to file a warranty claim
  • Contact Information: Email or phone for warranty service
  • Terms & Conditions URL: Link to full warranty terms

Example Usage:

javascript
// Create certificate with warranty preset
{
  "name": "Product Warranty Certificate",
  "templateId": "warranty_template_id",
  "fields": {
    "warranty_period": "2 years",
    "warranty_type": "Manufacturer",
    "warranty_start_date": "2025-01-15",
    "warranty_coverage": "Covers defects in materials and workmanship",
    "warranty_exclusions": "Does not cover accidental damage",
    "warranty_claim_process": "Contact customer service within 30 days",
    "warranty_contact": "support@company.com",
    "warranty_terms_url": "https://company.com/warranty"
  }
}

Auto-calculation:

  • End date automatically calculates: start date + period
  • "Lifetime" warranties set to 100 years from start
  • Manual override available if needed

Status Indicators:

  • Active: Current date is between start and end dates
  • Expired: Current date is past end date
  • Not Yet Active: Current date is before start date

Using Templates with Bulk Operations

Templates work seamlessly with bulk minting:

csv
name,description,imageUrl,category,template_field_1,template_field_2
Certificate 1,Description 1,https://example.com/img1.png,achievement,Value1,Value2
Certificate 2,Description 2,https://example.com/img2.png,achievement,Value3,Value4

Analytics and Reporting

Usage Analytics

Track certificate creation and usage patterns:

http
GET /api/billing/usage-history
Authorization: Bearer <token>

Query Parameters:
  - from: 2025-01-01 (ISO 8601)
  - to: 2025-01-31 (ISO 8601)

Response:
{
  "success": true,
  "data": {
    "period": {
      "start": "2025-01-01T00:00:00Z",
      "end": "2025-01-31T23:59:59Z"
    },
    "usage": {
      "certificates": {
        "direct": 150,
        "vouchers": 200,
        "bulk": 500,
        "total": 850
      },
      "costs": {
        "tier1": 325.00,  // 500 units @ $0.65
        "tier2": 157.50,  // 350 units @ $0.45
        "total": 482.50
      }
    },
    "daily": [
      {
        "date": "2025-01-01",
        "certificates": 25,
        "cost": 16.25
      }
      // ... more days
    ]
  }
}

EnterpriseReportingService

Advanced analytics for enterprise customers:

Available Metrics:

  • Certificate creation volume over time
  • Voucher lifecycle (creation, minting, deletion)
  • Cost aggregations by resource type
  • API usage patterns
  • Template usage statistics
  • Tier progression tracking

Key Features:

  • Automatic incorporation of voucher costs
  • Real-time usage aggregations
  • Historical trend analysis
  • Export capabilities for external analysis

Cost Preview

Estimate costs before committing:

http
GET /api/billing/cost-preview/1000
Authorization: Bearer <token>

Response:
{
  "certificates": 1000,
  "currentYearlyUsage": 350,
  "breakdown": [
    {
      "tier": 1,
      "units": 650,
      "pricePerUnit": 0.65,
      "subtotal": 422.50
    },
    {
      "tier": 2,
      "units": 350,
      "pricePerUnit": 0.45,
      "subtotal": 157.50
    }
  ],
  "estimatedCost": 580.00,
  "estimatedWithTax": 616.25
}

Webhooks

Setting Up Webhooks

Receive real-time notifications when events occur:

http
POST /api/enterprise/webhooks
Authorization: Bearer <token>

{
  "url": "https://your-domain.com/webhook",
  "events": [
    "certificate.created",
    "certificate.minted",
    "voucher.created",
    "voucher.minted",
    "bulk_job.completed"
  ],
  "active": true
}

Available Events

  • certificate.created - New certificate created
  • certificate.minted - Certificate minted on blockchain
  • certificate.transferred - Certificate transferred to new owner
  • certificate.burned - Certificate burned (destroyed)
  • voucher.created - New voucher created
  • voucher.minted - Voucher redeemed/minted
  • voucher.expired - Voucher expired without minting
  • bulk_job.started - Bulk job processing started
  • bulk_job.completed - Bulk job completed
  • bulk_job.failed - Bulk job failed

Webhook Payload

json
{
  "id": "evt_1234567890",
  "type": "certificate.created",
  "created": 1640995200,
  "data": {
    "certificateId": "507f1f77bcf86cd799439011",
    "name": "Certificate Name",
    "owner": "0x1234...",
    "metadata": { ... }
  }
}

Signature Verification

Verify webhook authenticity:

javascript
const crypto = require('crypto');

function verifyWebhookSignature(payload, signature, secret) {
  const [timestamp, hash] = signature.split(',').map(p => p.split('=')[1]);

  // Check timestamp (prevent replay attacks)
  const currentTime = Math.floor(Date.now() / 1000);
  if (Math.abs(currentTime - parseInt(timestamp)) > 300) {
    throw new Error('Webhook timestamp too old');
  }

  // Verify signature
  const signedPayload = `${timestamp}.${JSON.stringify(payload)}`;
  const expectedHash = crypto
    .createHmac('sha256', secret)
    .update(signedPayload)
    .digest('hex');

  return hash === expectedHash;
}

Budget Management

Setting Budget Limits

Prevent unexpected costs with budget controls:

javascript
// Set monthly budget limit
db.customerbilling.updateOne(
  { userId: "user_id" },
  {
    $set: {
      "budgetLimit": 500.00,  // $500/month limit
      "budgetAlertThreshold": 0.80  // Alert at 80%
    }
  }
)

Budget Alerts

Automatic notifications when approaching limits:

  • 80% threshold: Warning email sent
  • 90% threshold: Alert email sent
  • 100% threshold: Operations blocked, requires approval

Getting Started with Enterprise

1. Upgrade to Enterprise

Contact sales to upgrade your account:

  • Email: enterprise@pocketbook.studio
  • Discuss your needs and usage estimates
  • Receive custom pricing proposal

2. Initial Setup

Once upgraded:

  1. Set up billing information (or custom contract)
  2. Create your first API key
  3. Configure webhooks for your systems
  4. Create custom templates

3. Integration

Start integrating Pocketbook into your workflows:

javascript
// Example: Create certificates via API
const response = await fetch('https://api.pocketbook.studio/api/bulk-mint', {
  method: 'POST',
  headers: {
    'x-api-key': process.env.POCKETBOOK_API_KEY
  },
  body: formData  // CSV + images
});

const { jobId } = await response.json();
console.log(`Bulk job created: ${jobId}`);

4. Monitor Usage

Track your usage and costs:

  • View real-time usage in dashboard
  • Set up budget alerts
  • Review monthly invoices
  • Analyze trends with analytics

Best Practices

Security

  • API Keys: Rotate regularly, use different keys for different environments
  • Webhooks: Always verify signatures, use HTTPS endpoints
  • Scopes: Follow principle of least privilege

Cost Optimization

  • Batch Operations: Use bulk minting for large volumes
  • Vouchers: Use vouchers for future claims to control timing
  • Templates: Standardize to reduce errors and rework
  • Monitor: Set budget alerts to avoid surprises

Operations

  • Templates: Create templates before bulk operations
  • Testing: Use development API keys for testing
  • Monitoring: Set up webhook listeners for critical events
  • Documentation: Keep track of your custom fields and workflows

Support

Enterprise Support Channels

  • Priority Email: enterprise-support@pocketbook.studio
  • Dedicated Account Manager: Assigned on upgrade
  • SLA: 4-hour response time for critical issues
  • Integration Assistance: Custom integration support available

Documentation

Status and Updates

  • Status Page: status.pocketbook.studio
  • Changelog: changelog.pocketbook.studio
  • API Updates: Subscribe to webhook api.updated events

Migration Guide

From Standard to Enterprise

When upgrading from a standard account:

  1. Existing Usage: All historical data preserved
  2. Billing Transition: New pricing applied from upgrade date
  3. API Access: API keys activated immediately
  4. Templates: Migrate existing patterns to templates
  5. Zero Downtime: No service interruption during upgrade

Data Migration

All existing certificates and vouchers:

  • Remain accessible
  • Count toward new yearly tiers
  • Can be bulk-exported if needed
  • Integrate with new webhook events

FAQs

Q: How does yearly tiered pricing work with mid-year onboarding? A: Your yearly counter starts from your first usage and resets every January 1st. If you join mid-year, you'll benefit from tier discounts for usage from your start date until year-end.

Q: Can I use both vouchers and direct minting? A: Yes! Both count toward the same yearly counter. Vouchers are charged once at creation, and direct mints are charged when created.

Q: What happens if I exceed my budget limit? A: You'll receive alerts at 80% and 90%. At 100%, additional certificate creation requires manual budget approval or limit increase.

Q: Can I have multiple API keys? A: Yes! Create different keys for different environments (dev, staging, production) or different applications.

Q: How long are webhook events retained? A: Webhook delivery is attempted for 24 hours with exponential backoff. Event logs are retained for 30 days.

Q: Can I export my usage data? A: Yes, use the usage history API endpoint or contact support for bulk exports.

Released under the MIT License.