Profile and balance controls
sdk.profile reads and edits the signed-in consumer's details. Balance controls live on the wallet (sdk.wollette). All calls use the consumer from the current session, never a caller-supplied id, and require a developer proof per request.
Read the profile
val profile = sdk.profile.retrieve(provider)let profile = try await sdk.profile.retrieve(provider: provider)Returns UserProfile: id, firstName, lastName, birthDate, gender, localeSettings, locationServiceEnabled, username, email and telephone. Everything except id can be absent. Safe to retry.
Update the profile
Set only the fields you want to change: first name, last name, gender, locale settings or the location-service preference. Omitted (null/nil) fields remain unchanged.
sdk.profile.update(ProfileChanges(firstName = "Anna"), provider)try await sdk.profile.update(ProfileChanges(firstName: "Anna"), provider: provider)- An empty change set or a blank supplied string is
VALIDATION. - The SDK reads the current consumer, preserves its version and unedited fields, and sends a full update.
- Not safe to auto-retry. After an ambiguous network failure, call
retrieveand decide whether another update is needed.
Email, telephone, username and postal address changes are not available through the SDK. See Limitations and scope.
Balance controls
Two settings control automatic top-ups: whether auto top-up is enabled and the minimum balance that triggers it. Read them from the wallet and write them together.
val wallet = sdk.wollette.retrieve(provider)
val current = wallet.balanceControlSettings // null if the server returns none
sdk.wollette.updateBalanceControlSettings(
BalanceControlSettings(
autoTopupEnabled = true,
minimumBalance = MonetaryAmount(value = 20.0, currencyCode = "GBP"),
),
provider,
)let wallet = try await sdk.wollette.retrieve(provider: provider)
let current = wallet.balanceControlSettings // nil if the server returns none
try await sdk.wollette.updateBalanceControlSettings(
BalanceControlSettings(
autoTopupEnabled: true,
minimumBalance: MonetaryAmount(value: 20, currencyCode: "GBP")
),
provider: provider
)- Both values are submitted together. Pass the current value for the one you want to keep.
- A null minimum balance explicitly clears it.
- A supplied amount must be finite, non-negative (zero is allowed) and carry an uppercase three-letter currency code.
- Success returns nothing. Call
retrieveagain to show the server's resulting values. - The SDK first resolves the wallet, then sends the update; each request uses its own proof.
Per-payment and per-day limits and a minimum top-up amount are not exposed. See Limitations and scope.