Account Management

Add, update, and manage your BaridiMob accounts. These endpoints allow you to connect new accounts and manage existing ones.

Important

Adding a new account requires OTP verification via SMS. The process is: Create Account → Receive OTP → Confirm OTP.

GET

/mobilebank/accounts

List all connected BaridiMob accounts with their details.

Response

{
  "success": true,
  "message": "Accounts retrieved successfully.",
  "message_ar": "تم استرجاع الحسابات بنجاح.",
  "data": {
    "accounts": [
      {
        "rip": "00799999001234567890",
        "username": "0799123456",
        "balance": "15000.00",
        "card": {
          "id": "6280344",
          "number": "6280 34** **** 7890",
          "category": "CLASSIC",
          "brand": "ALGERIE_POSTE",
          "embossed_name": "MOHAMMED AMINE",
          "exp_date": "2028-08-31"
        },
        "label": "Primary Account",
        "is_active": true,
        "session": {
          "is_valid": true,
          "expires_at": "2025-12-05T23:30:00+00:00"
        },
        "created_at": "2025-11-01T10:00:00+00:00"
      }
    ],
    "count": 1
  }
}

Your API key is saved locally in your browser.

GET
POST

/mobilebank/accounts

Add a new BaridiMob account. This will initiate the setup process and may require OTP verification.

Request Body

Parameter Type Required Description
username string Yes BaridiMob phone number (e.g., 0799123456)
password string Yes BaridiMob password (min 6 characters)
label string No Custom label for the account
{
  "username": "0799123456",
  "password": "your_baridimob_password",
  "label": "My Primary Account"
}

Response (Success - No OTP Required)

Status: 201 Created

{
  "success": true,
  "message": "Account created successfully.",
  "message_ar": "تم إنشاء الحساب بنجاح.",
  "data": {
    "account": {
      "rip": "00799999001234567890",
      "username": "0799123456",
      "label": "My Primary Account",
      "session_valid": true
    }
  }
}

Response (OTP Required)

Status: 202 Accepted

{
  "success": true,
  "message": "OTP verification required. Please check your SMS.",
  "message_ar": "مطلوب التحقق من OTP. يرجى التحقق من الرسائل القصيرة.",
  "data": {
    "requires_otp": true,
    "setup_token": "eyJhbGciOiJIUzI1NiIs...",
    "next_step": "POST /api/v1/mobilebank/accounts/confirm-otp"
  }
}

Your API key is saved locally in your browser.

username
password
label
POST
POST

/mobilebank/accounts/confirm-otp

Complete account setup or device re-confirmation by verifying the OTP sent via SMS. This endpoint handles both new account setup and device re-confirmation.

Request Body

{
  "token": "eyJhbGciOiJIUzI1NiIs...",
  "otp": "123456",
  "label": "My Primary Account"
}

Response

Status: 201 Created

{
  "success": true,
  "message": "Account created successfully.",
  "message_ar": "تم إنشاء الحساب بنجاح.",
  "data": {
    "account": {
      "rip": "00799999001234567890",
      "username": "0799123456",
      "label": "My Primary Account",
      "session_valid": true
    }
  }
}

Your API key is saved locally in your browser.

token
otp
label
POST
POST

/mobilebank/accounts/resend-otp

Resend OTP if the previous one expired or was not received.

Request Body

{
  "setup_token": "eyJhbGciOiJIUzI1NiIs..."
}

Response

{
  "success": true,
  "message": "OTP resent successfully.",
  "message_ar": "تم إعادة إرسال رمز التحقق بنجاح.",
  "data": {
    "setup_token": "eyJhbGciOiJIUzI1NiIs...",
    "resent_at": "2025-12-05T14:30:00+00:00"
  }
}

Your API key is saved locally in your browser.

setup_token
POST
GET

/mobilebank/accounts/{rip}

Get detailed information about a specific account.

Response

{
  "success": true,
  "message": "Account retrieved successfully.",
  "data": {
    "account": {
      "rip": "00799999001234567890",
      "username": "0799123456",
      "balance": "15000.00",
      "card": { ... },
      "label": "Primary Account",
      "is_active": true,
      "session": {
        "is_valid": true,
        "expires_at": "2025-12-05T23:30:00+00:00"
      }
    }
  }
}

Your API key is saved locally in your browser.

rip
GET
PUT

/mobilebank/accounts/{rip}

Update account settings like label, active status, or password.

Request Body

{
  "label": "New Account Name",
  "is_active": true,
  "password": "new_password"
}

Response

{
  "success": true,
  "message": "Account updated successfully.",
  "message_ar": "تم تحديث الحساب بنجاح.",
  "data": {
    "account": {
      "rip": "00799999001234567890",
      "username": "0799123456",
      "label": "New Account Name",
      "is_active": true
    }
  }
}

Your API key is saved locally in your browser.

rip
label
is_active
password
PUT
DELETE

/mobilebank/accounts/{rip}

Remove an account from your connected accounts.

Response

{
  "success": true,
  "message": "Account deleted successfully.",
  "message_ar": "تم حذف الحساب بنجاح.",
  "data": {
    "deleted_rip": "00799999001234567890"
  }
}

Your API key is saved locally in your browser.

rip
DELETE
POST

/mobilebank/accounts/{rip}/confirm-device

Re-confirm device when getting error code 106 or 107. This happens when the device needs re-verification.

Response

Status: 202 Accepted

{
  "success": true,
  "message": "OTP sent to your phone.",
  "message_ar": "تم إرسال رمز التحقق إلى هاتفك.",
  "data": {
    "token": "eyJhbGciOiJIUzI1NiIs...",
    "next_step": "POST /api/v1/mobilebank/accounts/confirm-otp"
  }
}

Your API key is saved locally in your browser.

rip
POST

Account Setup Flow

1

POST /mobilebank/accounts

Send username and password

2

Receive OTP via SMS

If requires_otp is true, wait for SMS

3

POST /mobilebank/accounts/confirm-otp

Send token and OTP to complete setup