Security Best Practices
Protect your ClapPay account and your customers' data. These steps help you stay safe and meet compliance requirements.
How ClapPay Keeps You Safe
ClapPay is built with security from the ground up. Here's what we do:
PCI Level 1 Certified
We meet the highest level of payment card security standards. When you use ClapPay, you don't handle raw card numbers.
Data Encryption
All data is encrypted when sent (TLS) and when stored. Card numbers are tokenized so they're never stored in plain text.
Fraud Detection
Our machine learning system analyzes every transaction to catch fraud before it happens.
3D Secure
Extra verification for risky transactions. The customer's bank confirms it's really them.
Protect Your API Keys
Your secret API key is like a password. If someone gets it, they can use your account. Keep it safe:
Do
- Store keys in environment variables
- Keep secret keys on your server only
- Use different keys for test and production
- Rotate (change) keys every few months
- Use restricted keys when possible
Don't
- Put secret keys in JavaScript that runs in browsers
- Commit keys to Git or other version control
- Send keys in emails or chat
- Share keys with people outside your team
- Log keys in your application logs
Tip: Use a secrets manager (like AWS Secrets Manager or HashiCorp Vault) to store API keys securely.
Secure Your Account
Turn On Two-Factor Authentication (2FA)
2FA adds an extra step when logging in. Even if someone gets your password, they can't log in without your phone.
- Go to Settings → Security
- Click Enable 2FA
- Scan the QR code with an authenticator app (Google Authenticator, Authy)
- Enter the code to confirm
Use Strong Passwords
- At least 12 characters
- Mix of letters, numbers, and symbols
- Don't reuse passwords from other sites
- Use a password manager (like 1Password or Bitwarden)
Review Team Access
Regularly check who has access to your account:
- Remove people who no longer need access
- Give people only the permissions they need
- Use roles to limit what team members can do
Secure Your Webhooks
Anyone can send fake webhooks to your server. Always verify that webhooks came from ClapPay:
Verify Signatures
Every webhook includes a signature. Check it before processing:
const sig = request.headers['clappay-signature'];
const endpointSecret = 'whsec_...';
try {
const event = clappay.webhooks.constructEvent(
request.body,
sig,
endpointSecret
);
// Safe to process
} catch (err) {
// Invalid signature - reject!
return response.status(400).send('Invalid signature');
}Warning: Never skip signature verification! Without it, attackers could send fake webhooks to steal money or data.
Frontend Security
Use ClapPay.js
Our JavaScript library (ClapPay.js) handles card data securely. Card numbers never touch your servers - they go straight to ClapPay.
Content Security Policy
Add ClapPay domains to your Content Security Policy (CSP):
frame-src https://js.clappay.com https://hooks.clappay.com;Prevent Clickjacking
Make sure your payment pages can't be loaded in a malicious iframe:
X-Frame-Options: DENYPCI Compliance
PCI DSS is a set of rules for handling card data. When you use ClapPay correctly, you're already following most of them.
What ClapPay Handles
- Card number storage and encryption
- Secure transmission to card networks
- Tokenization of payment data
- Fraud monitoring
What You Need to Do
- Use our SDKs - don't build your own card forms
- Use HTTPS on your website
- Keep your systems updated
- Complete the SAQ (Self-Assessment Questionnaire) annually
Most ClapPay users only need to complete SAQ-A, the simplest form. We'll help you fill it out.
Monitor Your Account
Keep an eye on your account for anything unusual:
- Check your API logs - Look for requests from unknown IPs or unusual patterns
- Review payments - Watch for test payments in live mode or strange amounts
- Set up alerts - Get notified for large transactions or many failed payments
- Check team activity - Review login history and changes made to settings
If Something Goes Wrong
If you think your account was compromised:
- Roll your API keys immediately - Dashboard → Settings → API Keys → Roll Key
- Change your password - Use a new, strong password
- Review recent activity - Check for unauthorized payments or refunds
- Contact us - Our security team can help investigate
- Check your code - Make sure you didn't expose keys accidentally
Security Checklist
- Two-factor authentication enabled
- API keys stored in environment variables
- Secret keys never in frontend code
- Webhook signatures verified
- HTTPS on all pages
- Team permissions reviewed
- Old API keys rotated
- Login alerts enabled