Security

Security is not a feature.
It's the foundation.

Financial data demands the highest standard of protection. Every layer of aiPay.sh is designed with security as the default, not an afterthought.


Security Architecture

Six layers of protection.

Card data at rest
AES-256-GCM

PAN and CVV are encrypted with AES-256-GCM using a random initialization vector per field. Card data is never stored in plaintext. Decryption occurs only on your explicit request through the CLI, MCP, or API. Encryption keys are rotated on a regular schedule.

Authentication
Magic links + API keys

Authentication uses 32-byte cryptographically random tokens delivered via magic link. Tokens are single-use with a 15-minute expiry. No passwords are stored. API keys are generated with sufficient entropy and scoped to your organization.

Session tokens
JWT HS256

Session tokens are signed with a 256-bit secret using HMAC-SHA256. Tokens are stored locally with file permissions restricted to mode 0600 (owner read/write only). Sessions expire after 30 days and can be revoked manually.

MCP access
Per-request JWT

Every MCP request is authenticated with your JWT. No shared credentials between users or agents. Destructive actions (card creation, payments) require human approval. Read-only actions execute without prompting.

Agent isolation
Scoped credentials

Each registered agent receives its own API key with scoped permissions. One compromised agent cannot access another agent's cards, IBANs, or funds. Agent credentials can be rotated independently without affecting other agents.

Audit trail
Full compliance log

Every action is logged with timestamp, actor (user or agent), resource affected, and context. Audit logs are immutable and retained for 7+ years. Exportable as CSV or JSON. Stream live with the audit log command.


Compliance

Standards and certifications.

PCI DSS
Compliant

Card data handling follows PCI DSS requirements. Encryption at rest, tokenization in transit, and strict access controls.

GDPR
Compliant

Full compliance with EU data protection regulations. Data minimization, right to erasure, and data portability supported.

SOC 2 Type II
In progress

Security, availability, and confidentiality controls independently audited. Comprehensive controls for financial data handling.


Responsible Disclosure

Found a vulnerability?

We take security reports seriously. If you've found a vulnerability in our platform, please report it responsibly. We commit to acknowledging reports within 24 hours and providing a resolution timeline within 72 hours.