How CardAPI handles security

CardAPI does not yet hold a SOC 2 report and has not yet had a third-party penetration test. This page describes how the service is built and run today.

Last reviewed November 6, 2026.

Hosting and infrastructure

  • API (api.cardapi.dev): runs on Railway.
  • Website and developer portal (cardapi.dev): hosted on Vercel.
  • Database and sign-in: Supabase (managed PostgreSQL and Supabase Auth).
  • Payments: Stripe.
  • Transactional email: Resend.
  • Where information is stored and processed is stated in the privacy policy.

Encryption

  • In transit: the website and the API are served over HTTPS (TLS). Our SDKs default to https://api.cardapi.dev, and customer webhook endpoints must use HTTPS.
  • Backups: any database backups we take are encrypted with AES-256 before they are stored.

API key handling

  • Keys are generated from 32 bytes of cryptographically secure randomness and carry a ck_live_ prefix.
  • We store only a SHA-256 hash of each key, plus its first few characters so you can tell keys apart. The full key is shown once, when it is created, and cannot be retrieved later.
  • Keys are only issued to accounts with a confirmed email address. Each account can have up to 5 active keys.
  • Rotation and revocation: you can create and revoke keys at any time in the developer portal. A revoked key stops working within about 30 seconds.
  • Keys are sent as a Bearer token in the Authorization header.
  • Rate limiting: every key has daily and monthly quotas set by its plan. Quotas apply per account across all of its keys. Responses include X-RateLimit-* headers, and requests over quota get a 429 with Retry-After.
  • Abuse controls: registering for a key through the API (POST /v1/auth/register) is rate-limited per IP address. Request bodies are capped at 1 MB and requests time out after 30 seconds. The GraphQL endpoint limits query depth and the number of root fields. Accounts that abuse the service can be suspended, which blocks all of their keys.

Developer portal sign-in

  • Sign-in is handled by Supabase Auth: email and password, an emailed sign-in link, Google (including One Tap), or GitHub.
  • Passwords go from your browser straight to Supabase Auth. Our own servers never receive them.
  • Portal API routes check your Supabase session token on every request, and they only read or change keys and webhooks that belong to the signed-in user.

Access controls

  • Row-level security is enabled on every table we create, and no policy lets anonymous or signed-in users write to any table. The tables that hold billing events, account plans and suspensions are closed to both roles.
  • Data access goes through our own server code, which runs the authorization checks. Browsers use Supabase only for authentication.
  • Internal admin tools need separate credentials, which are checked with constant-time comparison. Admin paths reject encoded or disguised spellings.
  • The website sends X-Frame-Options: DENY, X-Content-Type-Options: nosniff, Referrer-Policy: strict-origin-when-cross-origin and a Permissions-Policy that turns off camera, microphone and location.
  • Cross-origin (CORS) access to the API is limited to an allowlist of origins.

Webhooks (Enterprise)

  • Each webhook gets its own random signing secret. Every delivery is signed with HMAC-SHA256 in the X-CardAPI-Signature header so you can verify it came from us.
  • Webhook URLs must be public HTTPS addresses. Private, loopback and link-local addresses are refused, and that check is repeated against DNS at delivery time.

Customer data we hold

  • Account: your email address and, if you sign in with Google or GitHub, the basic profile that provider shares.
  • API keys: hashes and prefixes only, never the full key.
  • Usage logs: for each call, which key made it, the endpoint path, the page size and offset, the status code, the response time and the timestamp. Usage logs do not include IP addresses, headers, request bodies or other query parameters. They are deleted automatically once they are 90 days old (the cleanup job runs weekly).
  • Billing: Stripe customer and subscription IDs and your plan status. Card numbers and payment details go directly to Stripe through Stripe Checkout and the Stripe billing portal. We never see or store them. Stripe webhooks are verified by signature.
  • Webhooks: endpoint URL, chosen events, signing secret and a delivery log.
  • Contact messages and feature requests (including the IP addresses used to vote): see the privacy policy.
  • Deletion: deleting an account removes its sign-in, keys, usage logs, webhooks and delivery logs. How to ask is in the privacy policy.
  • The CardAPI catalogue itself contains public credit card product information, not personal data.

Logging and monitoring

  • The API writes structured JSON logs. Failed key lookups, database errors and accounts nearing their quota are all logged.
  • Automated email alerts tell us about data-pipeline failures and about usage patterns that look like bulk copying of the dataset.

Development practices

  • The API and the website are written in TypeScript with strict type checking.
  • Automated test suites cover the API, the website and both SDKs, including tests that guard the security-relevant behaviour described here.
  • Dependabot is configured to check our npm and GitHub Actions dependencies weekly.
  • Secrets are kept in our hosting providers' environment configuration and are not committed to source code.

Security contact

Report a security concern or vulnerability to support@cardapi.dev.