> ## Documentation Index
> Fetch the complete documentation index at: https://docs.integrateledger.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Security and reliability

> Your money stays in your Stripe account, every use is charged exactly once, and your product keeps running when something fails. How Ledger protects money, data and keys.

Ledger keeps balances and usage exact, charges your customers through your own Stripe account, and keeps your product answering when something fails. This page covers what that means for your money, your data and your uptime. The legal terms are in the [Terms of Service](https://docs.integrateledger.com/terms), the [Merchant Terms](https://docs.integrateledger.com/merchant-terms), the [Privacy Policy](https://docs.integrateledger.com/privacy) and the [Data Processing Addendum](https://docs.integrateledger.com/dpa).

## How your money moves

* **Stripe holds the money.** In Live, your customers pay into your own Stripe account, under your agreement with Stripe. Ledger never holds or moves funds and never starts payouts.
* **You are the seller.** Ledger isn't a payment processor or the merchant of record.
* **Ledger never sees card details.** Customers enter them on Stripe's pages.
* **Grants follow confirmed payments.** Ledger grants a paid plan's credits and allowances only from Stripe's signed webhook, never from a browser redirect ([Stripe](https://docs.integrateledger.com/stripe.md#the-webhook)).
* **Refunds only when you ask.** Ledger issues a refund only when you request one, for example with a `refund` option on an endpoint.
* **Sandbox runs on test money.** Sandbox uses a Stripe test account, with its own keys, catalog and customers ([Sandbox](https://docs.integrateledger.com/test/sandbox.md)).

You can connect your Stripe account with **Connect with Stripe**, in which case Ledger never holds your Stripe key, or with a secret key ([Stripe](https://docs.integrateledger.com/stripe.md#the-stripe-account-in-each-environment)). Rolling the key in Stripe or disconnecting it in Ledger withdraws Ledger's access.

## Data and encryption

| | |
| - | - |
| In transit | TLS for the dashboard, the API and webhooks |
| At rest | The database is encrypted at rest by its hosting provider |
| Stripe secret keys | Encrypted with a key held outside the database, and never shown again after you save them |
| Ledger API keys | Stored only as hashes |
| Where data lives | The United States: the application on AWS and the database on PlanetScale, both in N. Virginia (us-east-1), with standby hosting on Render in Oregon |
| Logs | Request logs leave out secrets and email addresses and record IDs instead. Error reports strip query strings |
| Backups | Database backups, with a tested restore process |

Live financial records (subscriptions, credit grants, usage and invoices) are kept for 7 years, for accounting and tax. Request logs and error reports are kept for 30 days. Sandbox data is deleted with the workspace. The [Privacy Policy](https://docs.integrateledger.com/privacy#how-long-we-keep-information) has the full retention table.

## Access and keys

* **Secret keys only.** Every Ledger API key is secret and belongs on your server. There are no publishable keys.
* **One environment per key.** A `ledger_test_` key reaches only Sandbox and a `ledger_live_` key only Live; nothing in a request can switch it ([API keys](https://docs.integrateledger.com/api-keys.md)).
* **Restricted keys.** Give each service only the permissions it calls. A key without a permission gets `403 insufficient_permissions`, naming the scope it lacks ([Permissions](https://docs.integrateledger.com/api-keys.md#permissions)).
* **Failed sign-in attempts are throttled.** About 30 `401`s in a row from one IP address block further requests from it for a short time, while keys that worked recently keep working ([Limits](https://docs.integrateledger.com/limits.md#failed-requests)).
* **Dashboard sign-in** goes through Clerk, with verified sessions, protection against cross-site request forgery, and a fresh verification before sensitive actions such as creating a key.
* **Ledger's own access.** Production access is limited to the people who need it, with multi-factor authentication on infrastructure accounts. The source repository has dependency updates and secret scanning.

## Correctness guarantees

* **Each use is charged once.** `track` records a `request_id` once per customer, and it never expires: a retry next month is still a replay, not a second charge ([Usage events](https://docs.integrateledger.com/concepts/usage-events.md)). Plan changes and balance adjustments take an `idempotencyKey` that matches for 24 hours.
* **All or nothing.** A use is charged in full or not at all. If the balance and overage together can't cover it, `track` refuses it and charges nothing ([Balances](https://docs.integrateledger.com/concepts/balances.md)).
* **Retries are safe.** A `429` records nothing, and sending `track` again with the same `request_id` never charges twice ([Limits](https://docs.integrateledger.com/limits.md#when-you-hit-a-limit)).
* **Signed webhooks.** Every webhook Ledger sends carries a `Ledger-Signature` HMAC-SHA256 header with a timestamp, so you can reject forged and replayed deliveries ([Webhooks](https://docs.integrateledger.com/webhooks.md#verify-the-signature)).
* **Prices don't change under subscribers.** Publishing new plan terms creates a new version with new Stripe Prices. Existing Prices are never edited, so current subscribers keep what they bought ([Plan versions](https://docs.integrateledger.com/billing/plan-versions.md)).
* **Nightly reconciliation.** Every night Ledger compares each connected Stripe account with its own records: every payment Stripe took has its grant, every grant names a paid Stripe object, every refund was applied, and each grant's spent credits match its usage records. Any difference alerts Ledger's team.

If you find a balance, usage record or charge you think is wrong, email [support@integrateledger.com](mailto:support@integrateledger.com) within 30 days ([Merchant Terms](https://docs.integrateledger.com/merchant-terms#7-checking-your-records)).

## Availability and failure behaviour

* **Published latency and limits.** `check` answers in under 25 ms and `track` in under 100 ms at p99, at 1,000 requests a second. Rate limits are per key, and Sandbox has its own, so testing never uses production capacity ([Limits](https://docs.integrateledger.com/limits.md)).
* **The SDKs fail open.** When Ledger can't answer `check` or `track`, the TypeScript and Python SDKs allow the check and queue the usage, then replay it with the same `request_id`, so it is charged once. Business answers, such as a spent allowance, are never failed open, and you can turn fail open off ([Fail open](https://docs.integrateledger.com/fail-open.md)).
* **Expensive work fails closed.** A check that [reserves](https://docs.integrateledger.com/customers/reservations.md) credits never fails open: if Ledger can't answer, you don't start the work.
* **Stripe keeps billing.** Subscriptions live in your Stripe account and renew there.
* **New live charges can be stopped without stopping your product.** You can turn Live off in **Settings › Workspace**, and Ledger can pause new live charges for every workspace during an incident. Either way, Checkouts and upgrades are refused while existing subscriptions keep renewing and `check` and `track` keep working ([Merchant Terms](https://docs.integrateledger.com/merchant-terms#3-activation-and-live-charge-controls)).
* **Deploys don't drop requests.** A new release starts and passes a health check before the old one stops, and database changes stay compatible with the release still serving traffic.

## Compliance

**SOC 2 Type I: in progress.** We're preparing for a SOC 2 Type I audit (Security criteria) with Vanta, and have engaged an audit firm. We expect the report in January 2027. To request our security documentation in the meantime, email [security@integrateledger.com](mailto:security@integrateledger.com).

**GDPR.** For data about your customers, you are the controller and Ledger is your processor. The [Data Processing Addendum](https://docs.integrateledger.com/dpa) covers that processing, including the Standard Contractual Clauses for transfers from the EEA, the UK and Switzerland, and notice of a personal data breach within 72 hours. You accept it with the Terms of Service; no signature is needed.

## Subprocessors

| Subprocessor | What it does |
| - | - |
| Amazon Web Services | Hosts the application |
| PlanetScale | Hosts the database and its backups |
| Render | Standby hosting |
| Cloudflare | DNS, network proxy, access control and bot protection |
| Clerk | Dashboard sign-in |
| Sentry | Error monitoring |
| Axiom | Request logs |
| Resend | Account and notification email |
| Stripe | Stripe test accounts for Sandbox workspaces |

The [DPA's subprocessor list](https://docs.integrateledger.com/dpa#annex-3-subprocessors) has locations, and changes are posted there at least 30 days before a new subprocessor starts. In Live, Stripe processes payments as your provider, not as Ledger's subprocessor.

## Reporting a vulnerability

Email **[security@integrateledger.com](mailto:security@integrateledger.com)** with what you found and how to reproduce it. The address is also in [security.txt](https://www.integrateledger.com/.well-known/security.txt). Don't test against other customers' data or degrade the service. If you suspect a key has leaked, revoke it in **Settings › API keys** and roll any Stripe key in Stripe.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.