Skip to main content

Update User Wallet Lock API

Overview

Update an existing user wallet lock record. This API allows you to modify wallet lock details such as maturity date, locked amount, and other properties. The API uses a flexible Map-based approach to update only the fields that are provided in the request.

API Details

Endpoint

PUT https://api.gafapay.com:8443/gafapay/v3/transaction/user_wallet_lock

Headers

companyid: 59388167894b4d10a04fe5da3b8a2104
requestid: b1910650-f892-496a-b5a3-b0560845c4a1
authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlNDk0Njg3N2YxODk0NmIyOTlmZGRmMGYyMTMzZGNiYSIsInJvbGVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNzU4OTY2OTAzfQ.4e8MwJFrhoh2-vSvyR-s828TmEbgpYp-ocHlfo3Fnu4
Content-Type: application/json

Request Body

{
"id": "ceef44967b924390a6c2e911049a55a1",
"maturity_date": 1759157657
}

Request Parameters

ParameterTypeRequiredDescription
idstringYesUnique identifier of the wallet lock to update
wallet_idstringNoNew wallet ID
wallet_typeintegerNoNew wallet type (1=Main, 2=Category, 3=Saving, 4=Revenue, 5=Commission)
user_wallet_idstringNoNew user wallet ID
currency_idstringNoNew currency ID
locked_amountdoubleNoNew locked amount
maturity_datelongNoNew maturity date (Unix timestamp)
is_activebooleanNoNew active status

cURL Request

curl --location --request PUT 'https://api.gafapay.com:8443/gafapay/v3/transaction/user_wallet_lock' \
--header 'authorization: Token eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJlNDk0Njg3N2YxODk0NmIyOTlmZGRmMGYyMTMzZGNiYSIsInJvbGVzIjpbIlJPTEVfQURNSU4iXSwiZXhwIjoxNzU4OTY2OTAzfQ.4e8MwJFrhoh2-vSvyR-s828TmEbgpYp-ocHlfo3Fnu4' \
--header 'companyid: 59388167894b4d10a04fe5da3b8a2104' \
--header 'requestid: b1910650-f892-496a-b5a3-b0560845c4a1' \
--header 'Content-Type: application/json' \
--data '{
"id": "ceef44967b924390a6c2e911049a55a1",
"maturity_date": 1759157657
}'

Response

{
"success": 1,
"error": [],
"data": {
"message": "Wallet lock updated successfully"
}
}

Response Fields

FieldTypeDescription
successintegerStatus indicator (1 = success, 0 = failure)
errorarrayArray of error messages (empty on success)
data.messagestringSuccess message

Error Responses

{
"success": 0,
"error": ["Wallet lock not found"],
"data": null
}
{
"success": 0,
"error": ["Invalid wallet lock ID provided"],
"data": null
}

Update Examples

Update Maturity Date Only

{
"id": "ceef44967b924390a6c2e911049a55a1",
"maturity_date": 1759157657
}

Update Multiple Fields

{
"id": "ceef44967b924390a6c2e911049a55a1",
"locked_amount": 1500.0,
"maturity_date": 1759157657,
"is_active": true
}

Deactivate Wallet Lock

{
"id": "ceef44967b924390a6c2e911049a55a1",
"is_active": false
}

Use Cases

  • Extend Lock Period: Update the maturity date to extend the lock period
  • Modify Lock Amount: Change the locked amount (if business rules allow)
  • Deactivate Lock: Set is_active to false to deactivate the lock
  • Correct Data: Fix incorrect information in existing wallet locks
  • Administrative Updates: Make administrative changes to wallet locks