Validation rules
Reference

Validation rules

This page covers consumer inputs. POS models and validation are documented in the POS API reference.

Invalid local inputs produce VALIDATION. Proof checks run before each HTTP attempt; state-dependent checks can follow earlier API reads. applySession also has distinct JWT parsing and claims errors, listed below.

InputRule
WolletteConfig.apiBaseUrlHTTPS origin
WolletteConfig.requestTimeoutMillisPositive
Phone.countryCode+ followed by 1 to 3 digits, nothing else
Phone.numberNon-blank
OTP codeExactly 6 digits
Email / username for availability checksNon-blank
CreateUserRequestAll required strings non-blank; email contains @; address required unless appType is NATIVE_WOLLETTE; a supplied address has all fields except secondLine non-blank
applySessionaccessToken and authorizationId non-blank; expirySeconds positive
setRegistrationToken tokenNon-blank
Top-up / pay-out amountvalue present, finite and greater than 0
Top-up / pay-out accountIdNon-blank
Balance-control minimumFinite, non-negative amount with an uppercase three-letter currency code; null clears
ProfileChangesAt least one field set; supplied strings non-blank
changePassword passwordsNon-blank
Transaction listfrom not after to; startingAfter a non-negative integer when supplied
pay (Android)accountId non-blank; device supports HCE; NFC on; PIS ready; FCM token present unless already associated
pay (iOS)Always VALIDATION
ApiContext.developerIdNon-empty, no leading or trailing whitespace; no control characters below U+0020 or U+007F
ApiContext.nonceCanonical 8-4-4-4-12 hex UUID, no extra characters
ApiContext.signatureStandard Base64 decoding to 384 through 512 bytes

Both implementations accept a decoded signature length of 384 through 512 bytes inclusive, including 448 bytes. They reject control characters below U+0020 and U+007F in every ApiContext field. They validate shape, not the cryptographic signature.

For applySession, malformed JWT structure/payload produces INVALID_RESPONSE; a decoded token with disallowed consumer/delegation claims produces UNAUTHORIZED. See Consumer sessions.

Currency checks and backend rules

For top-up/pay-out, local mapping checks a positive finite value and trims optional currency strings. It does not apply the POS currency-code regex. Minimum-balance settings and POS payments have their own currency checks. Use approved currency data even where the client accepts a value.

The core money model has confirmed two-place HALF_UP rounding. Operation-specific units, accepted precision, currencies and provider conversions still need approval. Local validation does not establish support in the deployed service.

Consumer Bluetooth (iOS)

Argument or requirementRule
accountIdNon-empty with no leading/trailing whitespace
minimumRSSI−127…0; default −65
discoveryMillis500…10,000; default 2,000
timeoutMillisGreater than discoveryMillis and at most 120,000; default 40,000
Profile UUIDsFour distinct UUIDs matching the POS
ApplicationActive and foreground, with Bluetooth usage description/permission
AccountCurrent device/account association and matching completed PIS consent
Developer proofRequired for consumer API preparation

No-terminal discovery repeats while the screen remains active. The exchange deadline starts after terminal selection. Before payer preparation, connection/GATT failures can rescan at most twice within that deadline; later or malformed exchanges require explicit retry.

The concrete provider also applies a 30-second monotonic preparation limit. It does not compare the POS expiry timestamp with the consumer's wall clock. The POS still enforces its own session deadline.