Skip to content

Withdrawal

Agents process cash withdrawals for users who want to convert their digital wallet balance to physical cash.

Overview

The withdrawal process involves:

  1. Customer requests withdrawal via User App
  2. Agent receives withdrawal code
  3. Agent verifies and dispenses cash
  4. Transaction completes

Withdrawal Methods

Method 1: Customer-Initiated (Code)

Customer generates a withdrawal code in User App:

User App                      Vendor App
─────────                    ───────────
Generate Code ──────────────▶ Enter Code
   E500                      Verify Code
   CODE: 847291         ────▶ Dispense Cash
                              Confirm

Method 2: Agent-Initiated (Direct)

Agent initiates withdrawal for customer:

Vendor App
───────────
Enter Phone ──▶ Find User ──▶ Enter Amount ──▶ User Approves (OTP) ──▶ Dispense

Code-Based Withdrawal

Step 1: Enter Code

Agent enters the 6-digit code provided by customer.

FieldValue
Code Length6 digits
Validity30 minutes
UsageSingle use only

Code Validation States

StateDescription
ValidProceed to details
ExpiredCode has expired
UsedAlready processed
InvalidCode not found

Step 2: Verify Details

System displays withdrawal details:

FieldDescription
Customer NameFull name
PhoneCustomer phone
Withdrawal AmountTotal amount
Your FeeAgent commission
Cash to GiveAmount to dispense
ExpiryCode expiration time

Step 3: Process Withdrawal

Agent confirms cash handover and completes transaction.

Confirmation: Agent must confirm they have given the cash to customer.

Direct Withdrawal

Agent-Initiated Flow

  1. Find customer by phone number
  2. Enter withdrawal amount (up to customer's balance)
  3. System sends OTP to customer
  4. Customer provides OTP to agent
  5. Agent enters OTP to complete

Fee Structure

Amount RangeCustomer FeeAgent Commission
E10 - E500E5E2
E501 - E2,0002%1%
E2,001+1.5%0.75%

Limits

Limit TypeValue
Min per transactionE20
Max per transactionE5,000
Daily per customerE10,000
Daily per agentE100,000

API Endpoints

EndpointMethodDescription
/withdrawal/verifyGETVerify withdrawal code
/withdrawal/completePOSTComplete code withdrawal
/withdrawal/initiatePOSTStart direct withdrawal
/withdrawal/verify-otpPOSTVerify OTP & complete

Error Handling

ErrorCauseAction
WITH_001Invalid codeCheck code
WITH_002Code expiredUser generates new code
WITH_003Already processedTransaction complete
WITH_004Insufficient balanceUser has not enough
WITH_005Agent limit reachedTry tomorrow
FilePurpose
lib/screens/withdrawal/code_entry_screen.dartCode entry
lib/screens/withdrawal/direct_withdrawal_screen.dartDirect withdrawal
lib/screens/withdrawal/otp_verification_screen.dartOTP verification
lib/screens/withdrawal/withdrawal_success_screen.dartSuccess screen
lib/controllers/withdrawal_controller.dartWithdrawal controller
lib/services/withdrawal_service.dartWithdrawal service

Internal use only - Keshless Payment Platform