Developer authentication
Concepts

Developer authentication

Developer proof applies to consumer API calls, including consumer Bluetooth preparation. Native POS calls use merchant Bearer credentials; see Merchant sessions and terminals.

Wollette identifies your organisation on every API request through a signature your app creates with its own RSA private key. The SDK transports that proof; it never holds the key, never sees the public certificate, and cannot verify the signature itself. Wollette's service does the verification.

The proof

An ApiContext is one proof for one HTTP attempt:

FieldValue
developerIdThe developer id Wollette issued to you, trimmed, no line breaks
nonceA new canonical UUID, 8-4-4-4-12, upper or lower case hex
signatureStandard Base64 (padded, no line breaks) of SHA512withRSA(privateKey, UTF8(nonce))
Text
nonce     = UUID in canonical 8-4-4-4-12 form
signature = Base64(SHA512withRSA(privateKey, UTF8(nonce)))

SHA512withRSA is RSA PKCS#1 v1.5 with SHA-512 over the exact UTF-8 bytes of the nonce string. The signature covers only the nonce, not the method, URL, body or user. The header value must be the exact string that was signed; the SDK sends it unchanged and does not rewrite case.

The SDK sends the proof in three headers, always together:

HeaderValue
X-Wollette-DeveloperIddeveloperId
X-Wollette-Noncenonce
X-Wollette-Signaturesignature

Implement the provider

You implement ApiContextProvider with one method, nextContext. Return a new context every time; never reuse a nonce.

Use the complete provider from the Android quickstart or iOS quickstart. Prepare and import the key first with Developer key setup.

For each nextContext call:

  1. Generate a UUID in canonical string form.
  2. Sign its exact UTF-8 bytes using RSA PKCS#1 v1.5 with SHA-512.
  3. Encode the signature as standard Base64 without line breaks.
  4. Return ApiContext(developerId, nonce, signature).

When the SDK asks for a proof

CallAsks for a context
Every Wollette API HTTP attempt, including the retry after a 401 token refreshYes, once per attempt
Multi-request operations (for example, finding the wallet and then updating it)Yes, once per request
Polling during wallet activation and top-up reconciliationYes, once per poll
Hosted login exchange and token refreshNo
login, applySession, clear, stop, completeLogin, state, clearRegistrationNo. These take no provider
setRegistrationTokenOptional. With no session there is no HTTP and the provider is not called. With a session and no valid provider, the call fails with VALIDATION and the token is kept

What the SDK checks before sending

The SDK validates the shape of the context and refuses to send a request with a missing or malformed proof. It never sends a partial set of the three headers.

FieldRule
developerIdNon-empty, no leading or trailing whitespace; no control characters below U+0020 or U+007F
nonceCanonical 8-4-4-4-12 hex UUID, nothing else
signatureStandard Base64 that decodes to between 384 and 512 bytes inclusive (RSA 3072 to 4096 bits; 448 bytes for RSA-3584)

The SDK rejects control characters below U+0020 and U+007F in all three fields. A failing proof check throws VALIDATION before that HTTP attempt. The SDK does not check the key size exactly, and it cannot detect a well-formed signature made with the wrong key. Both are service-side rejections.

The SDK never logs the signature. toString() on Android and description on iOS omit it.

What the proof is not

A valid developer signature identifies your organisation. It does not authorise a consumer action. Consumer authorisation comes from the session established by login or applySession. Both are required for protected calls.

Protected clients do not follow HTTP redirects.

Verify local shape and server enrolment separately

CheckWhat it establishesIf it fails
Provider returns a fresh UUID and correctly sized Base64 signatureLocal proof formatCheck the installed key, nonce bytes and signer before an API attempt
Signature verifies with the matching public keyLocal cryptographic pairingCorrect the key/signature implementation
Approved API call accepts the enrolled DeveloperId/keyServer enrolment, credentials and environment work togetherUse Wollette's approved verification/support process

A well-formed proof can still use the wrong enrolled key. The public vector checks local verification; Wollette must confirm the deployed enrolment and accepted-proof contract. The first wallet read is an integration checkpoint after access has been approved, not a replacement for enrolment.

Check the public signing vector

Download the public signing test, extract it and open its wollette-developer-proof-vector folder. With Python 3 and OpenSSL available, run:

Shell
python3 scripts/verify_signing_vector.py

Expected:

Text
PASS: exact nonce verifies; changed nonce is rejected. No server request made.

The fixture (docs/developer-proof-vector.json) and verifier (scripts/verify_signing_vector.py) in the download are exact files from b32cc73. The fixture contains a throwaway 3072-bit RSA public key in DER SubjectPublicKeyInfo, a fixed UUID nonce and its RSA PKCS#1 v1.5 / SHA-512 signature. It contains no private key or account. It checks verification of those fixed bytes; it cannot generate new signatures with that throwaway key.

Use your own matching test key to check the signer/provider. Repeating this local verification should succeed. Server enrolment and replay policy require a separate accepted-proof test against your approved environment; see key enrolment.