Skip to main content

Wallet Transfer Money API

Overview

Transfer money between different wallets within the GafaPay system. This API allows users to transfer funds from one wallet to another, supporting various wallet types and including comprehensive transaction tracking and fee management.

API Details

Endpoint

POST https://api.gafapay.com:8443/gafapay/v3/transaction/wallet_transfer

Headers

authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJmYjhmMDkyMTBlMGY0NmI3YjQyNjJkNzdmNWI2YzI3MyIsInJvbGVzIjpbIlJPTEVfQ1VTVE9NRVIiXSwiZXhwIjoxNzU5MTU4Mzg4fQ.Ex6uzhttvM7dxt52q9lfejQm86uI3EMJ_U8iChGQZqM
companyid: 59388167894b4d10a04fe5da3b8a2104
requestid: b1910650-f892-496a-b5a3-b0560845c4a1

Request Body

{
"charges_info": null,
"txn_amount": 10,
"payment_mode": 3,
"note": null,
"txn_code": "SWW",
"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"
},
"credit_user_info": {
"currency_id": "1f1519903ed240578f071aa45cb479f2",
"credit_type": 1,
"credit_type_id": "4010122e9d604e798b9a6e961df3e5b4",
"credit_account_type": 2,
"credit_account_type_id": "fb8f09210e0f46b7b4262d77f5b6c273",
"username": "Suresh Raina"
},
"debit_user_info": {
"currency_id": "1f1519903ed240578f071aa45cb479f2",
"debit_type": 3,
"debit_type_id": "3a3d4e585aeb49e8bf3f3996fca0f82f",
"debit_account_type": 2,
"debit_account_type_id": "fb8f09210e0f46b7b4262d77f5b6c273",
"username": "Suresh Raina"
},
"txn_device_info": {
"device_name": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36",
"os_name": "MacIntel",
"location": {},
"host_name": "localhost",
"url": "http://localhost:8000"
},
"meta_data": {
"source_wallet_name": "Vault+",
"destination_wallet_name": "Gafa Wallet"
}
}

Request Parameters

Core Transaction Fields

  • txn_amount (number, required): Amount to be transferred
    • Example: 10
  • payment_mode (integer, required): Payment mode identifier
    • Example: 3
  • txn_code (string, required): Transaction code
    • Example: "SWW" (Send Wallet to Wallet)
  • note (string, optional): Transaction note
    • Example: "Transfer to savings wallet"

User Information Objects

debit_user_info (object, required): Source wallet user information
  • currency_id (string, required): Currency identifier
    • Example: "1f1519903ed240578f071aa45cb479f2"
  • debit_type (integer, required): Type of debit account
    • Example: 3 (Wallet type)
  • debit_type_id (string, required): Debit wallet ID
    • Example: "3a3d4e585aeb49e8bf3f3996fca0f82f"
  • debit_account_type (integer, required): Debit account type
    • Example: 2 (User account)
  • debit_account_type_id (string, required): Debit user ID
    • Example: "fb8f09210e0f46b7b4262d77f5b6c273"
  • username (string, required): Debit user name
    • Example: "Suresh Raina"
credit_user_info (object, required): Destination wallet user information
  • currency_id (string, required): Currency identifier
    • Example: "1f1519903ed240578f071aa45cb479f2"
  • credit_type (integer, required): Type of credit account
    • Example: 1 (Wallet type)
  • credit_type_id (string, required): Credit wallet ID
    • Example: "4010122e9d604e798b9a6e961df3e5b4"
  • credit_account_type (integer, required): Credit account type
    • Example: 2 (User account)
  • credit_account_type_id (string, required): Credit user ID
    • Example: "fb8f09210e0f46b7b4262d77f5b6c273"
  • username (string, required): Credit user name
    • Example: "Suresh Raina"
company_admin_user_info (object, optional): Admin user information
  • currency_id (string, required): Currency identifier
  • credit_type (integer, required): Type of credit account
  • credit_type_id (string, required): Credit wallet ID
  • credit_account_type (integer, required): Credit account type
  • credit_account_type_id (string, required): Credit user ID
  • username (string, required): Admin user name

Additional Information Objects

charges_info (object, optional): Fee and charges information
  • is_included (boolean): Whether charges are included in amount
  • total_charges (number): Total charges amount
  • charge_breakdown (object): Detailed charge breakdown
txn_device_info (object, optional): Device and location information
  • device_name (string): User agent string
  • os_name (string): Operating system name
  • location (object): Location information
  • host_name (string): Host name
  • url (string): Source URL
meta_data (object, optional): Additional transaction metadata
  • source_wallet_name (string): Name of source wallet
  • destination_wallet_name (string): Name of destination wallet
  • transfer_reason (string): Reason for transfer
  • reference_number (string): External reference number

Response

{
"success": 1,
"error": [],
"data": {
"message": "TRANSACTION_WALLET_TRANSFER_SUCCESS",
"transaction": {
"txn_number": "55080514",
"txn_id": "cb5c8d9ed83e4a27803dfca1018ef52d",
"txn_status": 3
}
}
}

Response Fields

  • success (integer): Response status indicator
    • 1 = Success
    • 0 = Failure
  • error (array): Array of error messages (empty on success)
  • data (object): Response data object
    • message (string): Success message indicating transfer completion
    • transaction (object): Transaction details
      • txn_number (string): Transaction number for reference
      • txn_id (string): Unique transaction identifier
      • txn_status (integer): Transaction status
        • 1 = Pending
        • 2 = Processing
        • 3 = Completed
        • 4 = Failed
        • 5 = Cancelled

Example Usage

curl --location 'https://api.gafapay.com:8443/gafapay/v3/transaction/wallet_transfer' \
--header 'accept: application/json, text/plain, */*' \
--header 'authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJmYjhmMDkyMTBlMGY0NmI3YjQyNjJkNzdmNWI2YzI3MyIsInJvbGVzIjpbIlJPTEVfQ1VTVE9NRVIiXSwiZXhwIjoxNzU5MTU4Mzg4fQ.Ex6uzhttvM7dxt52q9lfejQm86uI3EMJ_U8iChGQZqM' \
--header 'companyid: 59388167894b4d10a04fe5da3b8a2104' \
--header 'content-type: application/json' \
--header 'requestid: b1910650-f892-496a-b5a3-b0560845c4a1' \
--header 'signature: nGRz07Kh/KwLVDMGp2f9hdHMQMQGHYBNuLsPjzP494I=' \
--data '{
"charges_info": null,
"txn_amount": 10,
"payment_mode": 3,
"note": null,
"txn_code": "SWW",
"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"
},
"credit_user_info": {
"currency_id": "1f1519903ed240578f071aa45cb479f2",
"credit_type": 1,
"credit_type_id": "4010122e9d604e798b9a6e961df3e5b4",
"credit_account_type": 2,
"credit_account_type_id": "fb8f09210e0f46b7b4262d77f5b6c273",
"username": "Suresh Raina"
},
"debit_user_info": {
"currency_id": "1f1519903ed240578f071aa45cb479f2",
"debit_type": 3,
"debit_type_id": "3a3d4e585aeb49e8bf3f3996fca0f82f",
"debit_account_type": 2,
"debit_account_type_id": "fb8f09210e0f46b7b4262d77f5b6c273",
"username": "Suresh Raina"
},
"txn_device_info": {
"device_name": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36",
"os_name": "MacIntel",
"location": {},
"host_name": "localhost",
"url": "http://localhost:8000"
},
"meta_data": {
"source_wallet_name": "Vault+",
"destination_wallet_name": "Gafa Wallet"
}
}'

Transaction Codes

Common transaction codes for wallet transfers:

  • SWW: Sub Wallet Withdraw
  • IWT: Inter Wallet Transfer
  • P2P: Peer to Peer transfer
  • P2M: Pay to Merchant transfer
  • M2M: Merchant to Merchant transfer

For a complete list of transaction product codes and other constants, see Constants.

Notes

  • The API supports transfers between different wallet types
  • Transaction status can be tracked using the returned txn_id
  • The txn_number provides a human-readable transaction reference
  • Meta data can include additional context about the transfer
  • The API supports both same-user and cross-user wallet transfers