Skip to contents

A GSTIN is 15 characters: a 2-digit state code, the holder's PAN, an entity number, the letter Z and a mod-36 check character. gstin_valid() checks structure and check character; gstin_check_char() computes the check character for the first 14 characters.

Usage

gstin_valid(x)

gstin_check_char(x)

Arguments

x

A character vector. Case is ignored.

Value

gstin_valid(): a logical vector. gstin_check_char(): a character vector (NA for invalid input).

Examples

gstin_check_char("27AAPFU0939F1Z")
#> [1] "V"