Platform Guides

Security Best Practices

Guidelines for secure integration, data handling, and compliance with ContentSellify.

Overview

Security is our top priority at ContentSellify. This guide outlines best practices for keeping your account, products, and customer data safe.

๐Ÿ”

API Security

Protect your API keys and tokens

๐Ÿ’ณ

Payment Security

PCI-compliant payment processing

๐Ÿ“Š

Data Protection

GDPR & data privacy compliance

1. API Security

Protect Your API Keys

โŒ Never Do This

  • โ€ขCommit API keys to Git repositories
  • โ€ขHard-code keys in frontend JavaScript
  • โ€ขShare keys in Slack, email, or chat
  • โ€ขUse production keys in development

โœ“ Best Practices

  • โ€ขStore keys in environment variables (.env)
  • โ€ขUse separate keys for development and production
  • โ€ขRotate keys every 90 days or after team member leaves
  • โ€ขUse read-only keys when write access isn't needed

Environment Variable Example

# .env (add to .gitignore)
CONTENTSELLIFY_API_KEY=csfy_live_abc123...
CONTENTSELLIFY_SECRET_KEY=sk_live_xyz789...
WEBHOOK_SECRET=whsec_def456...

# Never commit these!
# Add .env to your .gitignore:
echo ".env" >> .gitignore

2. Authentication & Authorization

๐Ÿ”‘ Use OAuth 2.0

OAuth provides secure, token-based authentication without exposing user passwords. Always use OAuth for integrations.

โฑ๏ธ Token Expiration

Access tokens expire after 1 hour. Refresh tokens are valid for 30 days. Implement automatic token refresh in your application.

๐Ÿšซ Revoke Compromised Tokens

If you suspect a token has been compromised, revoke it immediately from Dashboard โ†’ API Settings โ†’ Active Tokens.

3. Transport Security

๐Ÿ”’ Always Use HTTPS

All API requests must be made over HTTPS. HTTP requests are automatically rejected for security.

// โœ“ Good - HTTPS
fetch('https://api.contentsellify.com/products', {
  headers: {
    'Authorization': `Bearer ${apiKey}`,
    'Content-Type': 'application/json'
  }
});

// โŒ Bad - HTTP (will fail)
fetch('http://api.contentsellify.com/products', ...)

๐Ÿ“ฆ TLS 1.2+

Our API requires TLS 1.2 or higher. Older protocols (SSL, TLS 1.0, TLS 1.1) are disabled for security.

4. Payment Security

We handle PCI compliance for you. Customer payment information never touches your servers.

โœ“ We Store

  • โ€ข Credit card numbers (encrypted)
  • โ€ข CVV codes (temporarily)
  • โ€ข Billing addresses
  • โ€ข Payment tokens

โœ“ You Receive

  • โ€ข Order confirmation
  • โ€ข Customer email
  • โ€ข Transaction ID
  • โ€ข Payment status

5. Data Protection & Privacy

๐Ÿ‡ช๐Ÿ‡บ GDPR Compliance

We are GDPR compliant. Users can request data exports or account deletion. Data is stored in encrypted databases with regular backups.

๐Ÿ“ Data Minimization

Only collect customer data you need. Don't store sensitive information unnecessarily. Use ContentSellify's built-in customer management.

๐Ÿ—‘๏ธ Data Retention

Transaction records are kept for 7 years for legal compliance. User data is deleted within 30 days of account deletion request.

6. Webhook Security

Always verify webhook signatures to prevent spoofed events:

const crypto = require('crypto');

function verifyWebhook(payload, signature, secret) {
  const hash = crypto
    .createHmac('sha256', secret)
    .update(JSON.stringify(payload))
    .digest('hex');
    
  // Use timing-safe comparison
  return crypto.timingSafeEqual(
    Buffer.from(signature),
    Buffer.from(hash)
  );
}

// Reject unverified webhooks
if (!verifyWebhook(req.body, req.headers['x-webhook-signature'], secret)) {
  return res.status(401).json({ error: 'Invalid signature' });
}

Security Checklist

Report Security Issues

๐Ÿšจ Found a Vulnerability?

We take security seriously. If you discover a security vulnerability, please report it responsibly:

security@bittforge.in

Please do not publicly disclose the issue until we've had a chance to address it. We typically respond within 24 hours.

Related Resources

Questions About Security?

Our security team is here to help with implementation and compliance questions.

Contact Security Team