View Source QRNBU.Types.RecipientCode (NBU payment QR v0.3.3)
Recipient identification code for V003 QR codes.
Format Specification (NBU V003)
- Length: Exactly 14 alphanumeric characters
- Format: NNNNNNNNTTTTTT where:
- N (8 chars): Tax/registration number
- T (6 chars): Terminal/account identifier
Examples
iex> QRNBU.Types.RecipientCode.new("12345678TERM01")
{:ok, %QRNBU.Types.RecipientCode{}}
iex> QRNBU.Types.RecipientCode.new("123")
{:error, "Recipient code must be exactly 14 characters"}
iex> QRNBU.Types.RecipientCode.new("12345678TERM-1")
{:error, "Recipient code must contain only alphanumeric characters"}
Summary
Functions
Creates a new RecipientCode with validation.
Extracts the string value from a RecipientCode.
Types
@opaque t()
Functions
Creates a new RecipientCode with validation.
Returns {:ok, code} if valid, {:error, reason} otherwise.
Extracts the string value from a RecipientCode.