PUT
/
wallets
/
wallet
/
transaction
/
account-number
/
post
curl --request PUT \
  --url https://waas-staging.cafeone.ng/api/v1/wallets/wallet/transaction/account-number/post \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "id": 123,
  "productId": "<string>",
  "organizationId": "<string>",
  "amount": 123,
  "fee": 123,
  "postedDate": "<string>",
  "valueDate": "<string>",
  "transactionReference": "<string>",
  "walletId": "<string>",
  "customerId": "<string>",
  "isPosted": true,
  "direction": "<string>",
  "remarks": "<string>",
  "currency": "<string>",
  "batchReference": "<string>",
  "accountNumber": "<string>"
}'

Request Body

id
number

Internal identifier for the transaction. Example: 0

productId
string
required

Unique identifier for the product associated with the transaction. Example: “3fa85f64-5717-4562-b3fc-2c963f66afa6”

organizationId
string

Unique identifier for the organization processing the transaction. Example: “3fa85f64-5717-4562-b3fc-2c963f66afa6”

amount
number
required

The amount of the transaction. Example: 200

fee
number

The fee charged for the transaction. Example: 1.0

postedDate
string

The date and time when the transaction was posted. Example: “2025-03-20T18:28:13.015Z”

valueDate
string

The date and time when the transaction takes effect. Example: “2025-03-20T18:28:13.015Z”

transactionReference
string

A unique reference identifier for the transaction. Example: “Rf399596950”

walletId
string

Unique identifier for the wallet involved in the transaction. Example: “3fa85f64-5717-4562-b3fc-2c963f66afa6”

customerId
string

Unique identifier for the customer who owns the wallet. Example: “3fa85f64-5717-4562-b3fc-2c963f66afa6”

isPosted
boolean

Indicates whether the transaction has been posted. Example: true

direction
string
required

The direction of the transaction (CREDIT/DEBIT).

remarks
string

Additional notes or description for the transaction. Example: “Dog food”

currency
string
required

The currency code for the transaction. Example: “USD”

batchReference
string

Reference number for batch transactions. Example: “5869999”

accountNumber
string

The account number associated with the transaction. Example: “3025831129”

Sample Response

✅ Success Response

Status Code: 200 OK

{
  "code": "200",
  "success": true,
  "message": "Transaction posted successfully.",
  "data": {
    // Additional data fields if applicable
  }
}

❌ Error Responses

Status Code: 400 Bad Request

{
  "code": "400",
  "success": false,
  "message": "Invalid request data",
  "data": null
}

Status Code: 404 Not Found

{
  "code": "404",
  "success": false,
  "message": "Invalid account number and organization",
  "data": null
}

Status Code: 401 Unauthorized

{
  "code": "401",
  "success": false,
  "message": "Unauthorized access",
  "data": null
}

Status Code: 500 Internal Server Error

{
  "code": "500",
  "success": false,
  "message": "An unexpected error occurred",
  "data": null
}