Skip to main content

Cash Transfer Request Flow

📋 Overview​

Complete workflow for processing cash transfer requests in the GafaPay system. This flow allows users to initiate cash transfer requests between accounts, involving wallet transfers and request tracking through a comprehensive API integration process.

🔄 Workflow Steps​

Step 1: Enter Receiver Details​

  • User enters receiver's information including:
    • Phone number with dial code
    • First name and last name
    • User type (if applicable)
  • System validates receiver details and format

Step 2: Enter Amount​

  • User enters the transfer amount
  • System validates the amount format and range
  • Amount should be a positive numeric value

Step 3: Check Product and Calculate Charges​

  • System checks if the CTA (Cash Transfer Request) product is allowed for the user
  • Call the Get User Profile API to get user profile
  • Call the Get Profile Product API and pass product_code: "CTA" to check if cash transfer product is allowed
  • If no record found in profile product API → Product is not allowed, show toast message and stop the process
  • If record exists → Continue with charges calculation
  • Call the Calculate Charges API and pass product_code: "CTA" to get final charges

Step 4: Execute Wallet Transfer API​

  • Prepare wallet transfer request with CTA product code
  • In the credit_user_info, pass the admin details (company admin user information)
  • Call the Wallet Transfer API with the following payload structure:
{
"charges_info": {
"is_included": false,
"total_charges": 15,
"charges": [
{
"charge_name": "Customer new charge",
"charge_type": 1,
"charge_value_type": 2,
"charge_id": "f1448399ca024457b150003c70477c6f",
"charge_value": 10,
"final_charge": 15
}
]
},
"note": null,
"txn_amount": 10,
"txn_code": "CTA",
"payment_mode": 3,
"company_admin_user_info": {
"currency_id": "1f1519903ed240578f071aa45cb479f2",
"credit_type": 1,
"credit_type_id": "4010122e9d604e798b9a6e961df3e5b4",
"credit_account_type": 1,
"credit_account_type_id": "640b793d04e2428dbf19ab10399f4edb",
"username": "Mouhamad Amine"
},
"txn_device_info": {
"device_name": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/139.0.0.0 Safari/537.36",
"os_name": "MacIntel",
"location": {},
"host_name": "localhost",
"url": "http://localhost:8000"
},
"debit_user_info": {
"currency_id": "1f1519903ed240578f071aa45cb479f2",
"debit_type": 1,
"debit_type_id": "4010122e9d604e798b9a6e961df3e5b4",
"debit_account_type": 2,
"debit_account_type_id": "fb8f09210e0f46b7b4262d77f5b6c273",
"username": "Suresh Raina"
},
"credit_user_info": {
"currency_id": "1f1519903ed240578f071aa45cb479f2",
"credit_type": 1,
"credit_type_id": "4010122e9d604e798b9a6e961df3e5b4",
"credit_account_type": 1,
"credit_account_type_id": "640b793d04e2428dbf19ab10399f4edb",
"username": "test user"
}
}

Step 5: Save Cash Transfer Request​

  • On successful wallet transfer, call the Save Cash Transfer Request API
  • Pass all the receiver details, amount, and transaction information
  • The API generates a unique reference number for the cash transfer request
  • Store the cash_transfer_request_id from the response for future reference

Step 6: Display Cash Transfer Request in Transaction Details​

  • To display the cash transfer request in transaction details:
    • First check if the transaction code is "CTA"
    • If transaction code is CTA, call the Get All Cash Transfer Requests API
    • Pass the sender_txn_id as a filter parameter to retrieve the specific cash transfer request
    • Display the cash transfer request details including reference number and status

📡 API References​

Check Product and Calculate Charges​

Execute Wallet Transfer​

  • API: Wallet Transfer API
  • Purpose: Process the wallet transfer with CTA product code and admin details in credit user info

Save Cash Transfer Request​

Retrieve Cash Transfer Request​

Note: For complete API details, request/response formats, and error codes, please refer to the individual API documentation pages linked above.

🔄 Flow Logic​

  1. Enter receiver details → Validate receiver information format
  2. Enter amount → Validate amount format and range
  3. Check product and calculate charges → Validate CTA product and calculate applicable charges
  4. Execute wallet transfer → Process wallet transfer with CTA code and admin details in credit user info
  5. Save cash transfer request → Create request record with generated reference number
  6. Display in transaction details → Check transaction code and retrieve request details using sender transaction ID
  7. If any step fails → Show error message and stop the process

🎯 Key Points​

  • Product Code: Always use "CTA" for cash transfer request transactions
  • Admin Details: Pass company admin user information in the credit_user_info of wallet transfer
  • Reference Number: Generated automatically by the Save Cash Transfer Request API
  • Transaction Code Check: Always verify transaction code is "CTA" before displaying cash transfer request details
  • Sender Transaction ID: Use this to filter and retrieve specific cash transfer requests