Wallet SDK Models
Reference for models returned by the Wallet SDK across iOS, Android, and React Native.
All monetary amounts are decimal strings such as "25.00" and "0.50" to avoid floating-point rounding. Dates are ISO 8601 strings. IDs are UUIDs.
Returned inside every wallet handle after login, onboarding, or session restore.
| Field | Type | Required | Description |
|---|
id | string | Yes | Wallet user UUID |
mobile | string | No | Saudi mobile number |
firstName | string | No | First name |
lastName | string | No | Last name |
email | string | No | Email address |
nationalId | string | No | Saudi national ID |
fullNameAr | string | No | Full name in Arabic from Nafath |
dateOfBirth | string | No | ISO 8601 date |
identityVerifiedAt | string | No | ISO 8601 timestamp of Nafath verification |
Returned by getBalance() and embedded in TransferResult, TopUpResult, and WalletCardSpendResult.
| Field | Type | Required | Description |
|---|
totalBalance | string | Yes | Total wallet balance |
availableBalance | string | Yes | Spendable balance after holds |
holdBalance | string | Yes | Amount on hold |
A single ledger entry returned inside WalletTransactions.entries.
| Field | Type | Required | Description |
|---|
id | string | Yes | Transaction UUID |
journalReference | string | Yes | Ledger journal reference |
transactionType | string | No | Transaction type label |
amount | string | Yes | Decimal amount |
direction | "Debit" or "Credit" | Yes | Money direction from the wallet owner's view |
description | string | No | Human-readable note |
createdAt | string | No | ISO 8601 timestamp |
channel | string | No | CARD, SARIE, ONLINE, or absent |
Paginated wrapper returned by getTransactions() and beneficiaryTransfers().
| Field | Type | Required | Description |
|---|
entries | WalletTransaction[] | Yes | Page of transactions |
total | number | Yes | Total matching transactions |
page | number | Yes | Current 1-based page |
limit | number | Yes | Page size |
A saved transfer recipient returned by listBeneficiaries(), addBeneficiary(), and verifyBeneficiary().
| Field | Type | Required | Description |
|---|
id | string | Yes | Beneficiary UUID |
beneficiaryUserId | string | Yes | Recipient wallet user UUID |
mobile | string | Yes | Recipient mobile number |
displayName | string | No | Recipient profile name |
nickname | string | No | Custom label set by caller |
createdAt | string | No | ISO 8601 timestamp |
accountNumber | string | No | Wallet account number |
relation | string | No | Relationship label |
verificationRequired | boolean | No | true when OTP was sent after addBeneficiary() |
verificationExpiresIn | number | No | Seconds until verification code expires |
Returned by transfer().
| Field | Type | Required | Description |
|---|
transferId | string | Yes | Transfer UUID |
status | string | Yes | Transfer status, such as COMPLETED |
amount | string | Yes | Decimal amount transferred |
beneficiaryId | string | Yes | Recipient UUID |
balance | WalletBalance | Yes | Updated wallet balance |
Returned by topUp().
| Field | Type | Required | Description |
|---|
topUpId | string | Yes | Top-up UUID |
status | string | Yes | Top-up status, such as INITIATED or COMPLETED |
amount | string | Yes | Decimal amount loaded |
ncbReference | string | No | NCB bank reference when available |
balance | WalletBalance | Yes | Updated wallet balance |
Returned by issueCard() and listCards().
| Field | Type | Required | Description |
|---|
id | string | Yes | Card UUID |
brand | string | Yes | Card network, such as VISA or MADA |
cardType | string | Yes | CREDIT or DEBIT |
tier | string | No | Card tier |
status | string | Yes | Card status, such as ISSUED or ACTIVE |
cardholderName | string | No | Name printed on card |
last4 | string | Yes | Last four PAN digits |
expiryMonth | number | Yes | Month from 1 to 12 |
expiryYear | number | Yes | Four-digit year |
createdAt | string | No | ISO 8601 timestamp |
Returned by getCardDetails(). Extends WalletCard, except createdAt, with sensitive fields.
Never log, cache, or persist this object.
| Field | Type | Required | Description |
|---|
All WalletCard fields except createdAt | | | Card data |
number | string | Yes | Full PAN |
cvv | string | Yes | Card CVV |
Returned by spend().
| Field | Type | Required | Description |
|---|
spendId | string | Yes | Spend transaction UUID |
cardId | string | Yes | Card UUID used |
status | string | Yes | Spend status |
amount | string | Yes | Decimal amount spent |
balance | WalletBalance | Yes | Updated wallet balance |
Thrown by every SDK method on failure.
| Field | Type | Required | Description |
|---|
code | WalletSDKErrorCode | Yes | Stable machine-readable code |
message | string | Yes | Localized human-readable message |
messageAr | string | No | Arabic message from backend |
statusCode | number | No | HTTP status for API errors |
apiCode | string | No | Backend error code, such as INSUFFICIENT_FUNDS |
Error codes
| Code | When |
|---|
API | Backend rejected the request |
NETWORK | No connectivity or timeout |
DECODING | Response could not be parsed |
UNAUTHORIZED | Token expired or invalid |
INVALID_MOBILE_NUMBER | Mobile number failed validation |
CANCELLED | Operation cancelled programmatically |
USER_CANCELLED | User dismissed a native sheet |
NO_ACTIVE_SESSION | No stored session to restore |
UNSUPPORTED_PLATFORM | Platform not supported |
INVALID_ARGUMENT | Parameter failed client-side validation |
UNKNOWN | Unclassified error |
LoginOptions
| Field | Type | Required | Description |
|---|
mobile | string | Yes | Saudi mobile number |
OnboardingOptions
| Field | Type | Required | Description |
|---|
mobile | string | Yes | Saudi mobile number |
name | string | Yes | Full name. First word becomes first name; remaining words become last name |
email | string | No | Email address |
PageOptions
| Field | Type | Default | Description |
|---|
page | number | 1 | 1-based page number |
limit | number | 20 | Page size, up to 1000 |
AddBeneficiaryOptions
| Field | Type | Required | Description |
|---|
mobile | string | Yes | Recipient mobile number |
nickname | string | No | Custom recipient label |
TransferOptions
| Field | Type | Required | Description |
|---|
beneficiaryId | string | Yes | Verified beneficiary UUID |
amount | string | Yes | Decimal string, such as "25.00" |
note | string | No | Transfer note |
IssueCardOptions
| Field | Type | Required | Description |
|---|
cardType | "CREDIT" or "DEBIT" | Yes | Card type to issue |
tier | string | No | Card tier |
SpendOptions
| Field | Type | Required | Description |
|---|
cardId | string | Yes | Card UUID |
amount | string | Yes | Decimal amount |
description | string | No | Spend description |
wallet.show(kind) accepts these screen names:
| Screen | Description |
|---|
balance | Balance overview |
transactions | Transaction history |
beneficiaries | Saved recipients list |
transfer | Transfer flow |
topUp | Top-up flow |
cards | Card management |