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.
| Input | Rule |
|---|---|
WolletteConfig.apiBaseUrl | HTTPS origin |
WolletteConfig.requestTimeoutMillis | Positive |
Phone.countryCode | + followed by 1 to 3 digits, nothing else |
Phone.number | Non-blank |
| OTP code | Exactly 6 digits |
| Email / username for availability checks | Non-blank |
CreateUserRequest | All required strings non-blank; email contains @; address required unless appType is NATIVE_WOLLETTE; a supplied address has all fields except secondLine non-blank |
applySession | accessToken and authorizationId non-blank; expirySeconds positive |
setRegistrationToken token | Non-blank |
| Top-up / pay-out amount | value present, finite and greater than 0 |
Top-up / pay-out accountId | Non-blank |
| Balance-control minimum | Finite, non-negative amount with an uppercase three-letter currency code; null clears |
ProfileChanges | At least one field set; supplied strings non-blank |
changePassword passwords | Non-blank |
Transaction list | from 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.developerId | Non-empty, no leading or trailing whitespace; no control characters below U+0020 or U+007F |
ApiContext.nonce | Canonical 8-4-4-4-12 hex UUID, no extra characters |
ApiContext.signature | Standard 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 requirement | Rule |
|---|---|
accountId | Non-empty with no leading/trailing whitespace |
minimumRSSI | −127…0; default −65 |
discoveryMillis | 500…10,000; default 2,000 |
timeoutMillis | Greater than discoveryMillis and at most 120,000; default 40,000 |
| Profile UUIDs | Four distinct UUIDs matching the POS |
| Application | Active and foreground, with Bluetooth usage description/permission |
| Account | Current device/account association and matching completed PIS consent |
| Developer proof | Required 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.