Skip to main content
GET
/
api
/
v1
/
wallets
/
fiat
/
account
/
{accountNumber}
Get Wallet by Account Number
curl --request GET \
  --url https://api.example.com/api/v1/wallets/fiat/account/{accountNumber} \
  --header 'x-api-key: <x-api-key>'
{
  "status": true,
  "message": "wallet retrieved successfully",
  "data": {
    "id": "wal_abc123xyz",
    "customerId": "cus_123456789",
    "availableBalance": "10000.00",
    "ledgerBalance": "10000.00",
    "walletName": "Main Wallet",
    "customerType": "individual",
    "virtualAccount": {
      "accountNumber": "1234567890",
      "bankCode": "035",
      "bankName": "Wema Bank"
    }
  }
}

Path Parameters

accountNumber
string
required
The account number of the wallet

Request

x-api-key
string
required
API Key for authentication

Request Example

curl https://api-staging.fossapay.com/api/v1/wallets/fiat/account/1234567890 \
  -H "x-api-key: fp_live_sk_xxxxxxxx"
const wallet = await client.wallets.getByAccountNumber('1234567890');
wallet = client.wallets.get_by_account_number('1234567890')

Response

status
boolean
Response status
message
string
Human-readable response message
data
object

Response Example

{
  "status": true,
  "message": "wallet retrieved successfully",
  "data": {
    "id": "wal_abc123xyz",
    "customerId": "cus_123456789",
    "availableBalance": "10000.00",
    "ledgerBalance": "10000.00",
    "walletName": "Main Wallet",
    "customerType": "individual",
    "virtualAccount": {
      "accountNumber": "1234567890",
      "bankCode": "035",
      "bankName": "Wema Bank"
    }
  }
}

Error Codes

CodeDescription
WALLET_NOT_FOUNDWallet with this account number does not exist
UNAUTHORIZEDInvalid API key or insufficient permissions