---
id: "bankcard_unionpay"
kind: "pattern"
status: "draft"
is_pii: true
categories: ["pii", "finances"]
langs: ["common"]
quality: 85
url: "https://registry.apicrafter.io/datatype/bankcard_unionpay"
---

# UnionPay card number (`bankcard_unionpay`)

> **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.

Primary account number of a China UnionPay card: 16 to 19 digits that start with 62. Numbers from 622126 to 622925 are co-branded with Discover and also match bankcard_discover. The pattern sets no check digit because not all UnionPay numbers are documented to pass the Luhn check. It accepts the number without spaces or hyphens.

- Pattern of: `bankcard`
- Personal data (PII): yes
- Categories: Personally identifiable information (pii), Finances and banking (finances)
- Countries: global
- Languages: Common to most languages (common)
- Classification: identifier

## Detection

Regular expression (Python `re`):

```
^62[0-9]{14,17}$
```

## Examples

- `6200000000000005` — Stripe test card number
- `6205500000000000004` — Stripe test card number (19 digits)
- `6011111111111117` (invalid example) — Discover test number

## Supported by tools

- `cloudflaredlp`
- `validatorjs`

## Sources

- wikipedia: <https://en.wikipedia.org/wiki/Payment_card_number>
- doc: <https://docs.stripe.com/testing>

## Quality

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

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