---
id: "stripe_api_key"
kind: "datatype"
status: "draft"
is_pii: false
categories: ["secrets"]
langs: ["common"]
quality: 70
url: "http://registry.apicrafter.io/datatype/stripe_api_key"
---

# Stripe secret or restricted API key (`stripe_api_key`)

> **Draft.** Draft records have not been reviewed yet and may be incomplete or wrong; do not treat them as authoritative for legal or compliance decisions.

Server-side API key of Stripe. Secret keys start with sk_ and restricted keys with rk_, followed by test_ for a sandbox or live_ for live mode. Publishable keys (pk_) are meant to be public and are not covered.

- Parent datatype: `api_key`
- Personal data (PII): no
- Categories: Secrets and credentials (passwords, keys, tokens) (secrets)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^(?:sk|rk)_(?:test|live)_[0-9A-Za-z]{10,99}$
```

## Examples

- `pk_test_ExampleKeyExampleKeyExam` (invalid example) — Publishable key

## Supported by tools

- `amazonmacie`
- `detectsecrets`
- `gitleaks`
- `nightfall`
- `semgrep`
- `trufflehog`

## Sources

- doc: <https://docs.stripe.com/keys>
- other: <https://github.com/gitleaks/gitleaks/blob/master/config/gitleaks.toml>

## Quality

Score 70/100. Missing: examples, mapping (Wikidata, Schema.org, ...), translation.

JSON: <http://registry.apicrafter.io/api/v1/datatypes/stripe_api_key.json> · Edit: <https://github.com/apicrafter/metacrafter-registry/edit/main/data/datatypes/any/secrets/stripe_api_key.yaml>
