Key and consecutive number
The numeric key (50 digits)
The numeric key is the document’s official unique identifier. It follows this structure:
506 15 01 26 003101123456 0010 0001 01 0000000123 4 56789012
└─┬─┘└┬─┘└┬─┘└┬─┘└────┬─────┘└─┬──┘└─┬──┘└┬─┘└──┬─────┘└┬─┘└──┬──┘
country day month year issuer ID branch POS type seq. no. stat sec. code| Position | Length | Meaning |
|---|---|---|
| 1–3 | 3 | Country code (506 Costa Rica) |
| 4–9 | 6 | Day, month, year of issuance (DDMMYY) |
| 10–21 | 12 | Issuer’s ID number (padded with zeros) |
| 22–24 | 3 | Headquarters |
| 25–28 | 4 | Point of sale |
| 29–30 | 2 | Document type |
| 31–40 | 10 | Consecutive number |
| 41 | 1 | Situation (1=normal, 2=contingency, 3=no internet) |
| 42–50 | 9 | Random security code |
LX CloudPos generates the key automatically. Do not build it from your system — only store it as a reference.
The consecutive number (20 digits)
It is the issuer’s internal portion (positions 22–40 of the key, excluding the country and date codes). Structure:
001 0001 01 0000000123
└┬─┘└─┬──┘└┬─┘└────┬────┘
branch POS type sequential numberThe consecutive number increases automatically by document type. Each tenant has its own sequence.
You can use
GET /api/v1/consecutivos/proximoto check what the next number will be without consuming it.