Withdraw from Savings
POST/savings/:id/withdraw
Withdraw from locked savings to wallet
Body Params
amountstringrequired |
amount to be withdrawn |
base url
import requests
url = "{{BASE_URL}}/savings/383370a7f0b94667b859a554820ddd78/withdraw"
payload={'amount': '500000',
files=[]
headers = {
'Authorization': 'Bearer AVZZmf9NkKU0qz3hu6k1nqvBejs8cw'
}
response = requests.request("POST", url, headers=headers, data=payload,
files=files)
print(response.text),
Response JSON
{ "data": {
"id": "b98291cad58849189485d97ede702e45",
"amount": {
"value": "20000.00000",
"currency_code": "NGN"
},
"fee": {
"value": "0.00000",
"currency_code": "NGN"
},
"reference": "TRF5EF40BACC1818888",
"description": "",
"source_asset": {
"id": "120f89f0-e9c8-4aa2-8dc5-879b9697d69d",
"name": "Naira Savings - 111 days",
"custom_name": "",
"account_id": "a1b2c3d4e5f6",
"account_name": "John Doe",
"account_email": "johndoe@example.com",
"product_code": "PRCDE4544783923",
"asset_type": "savings",
"current_value": "2012209.5263",
"old_balance": 2032209.5263,
"new_balance": 2012209.5263
},
"destination_asset": {
"id": "c9c85288-9eb4-4c09-bbb1-f616615f6899",
"name": "Naira Wallet",
"custom_name": "",
"account_id": "a1b2c3d4e5f6",
"account_name": "John Doe",
"account_email": "johndoe@example.com",
"product_code": "PRCDE6456393123",
"asset_type": "wallet",
"current_value": "15689056.9320",
"old_balance": 0,
"new_balance": 0
},
"transfer_type": "asset-liquidation",
"status": "Pending",
"transaction_date": "2024-08-08T09:28:21.386475+00:00",
"updated_on": "2024-08-08T10:28:21.396197+01:00",
"meta": {}
},
"errors": null,
"message": "Request successful",
"status": "success"
}
base url
import requests
url = "{{BASE_URL}}/savings/383370a7f0b94667b859a554820ddd78/withdraw"
payload={'amount': '500000',
files=[]
headers = {
'Authorization': 'Bearer AVZZmf9NkKU0qz3hu6k1nqvBejs8cw'
}
response = requests.request("POST", url, headers=headers, data=payload,
files=files)
print(response.text),
Response JSON
{ "data": {
"id": "b98291cad58849189485d97ede702e45",
"amount": {
"value": "20000.00000",
"currency_code": "NGN"
},
"fee": {
"value": "0.00000",
"currency_code": "NGN"
},
"reference": "TRF5EF40BACC1818888",
"description": "",
"source_asset": {
"id": "120f89f0-e9c8-4aa2-8dc5-879b9697d69d",
"name": "Naira Savings - 111 days",
"custom_name": "",
"account_id": "a1b2c3d4e5f6",
"account_name": "John Doe",
"account_email": "johndoe@example.com",
"product_code": "PRCDE4544783923",
"asset_type": "savings",
"current_value": "2012209.5263",
"old_balance": 2032209.5263,
"new_balance": 2012209.5263
},
"destination_asset": {
"id": "c9c85288-9eb4-4c09-bbb1-f616615f6899",
"name": "Naira Wallet",
"custom_name": "",
"account_id": "a1b2c3d4e5f6",
"account_name": "John Doe",
"account_email": "johndoe@example.com",
"product_code": "PRCDE6456393123",
"asset_type": "wallet",
"current_value": "15689056.9320",
"old_balance": 0,
"new_balance": 0
},
"transfer_type": "asset-liquidation",
"status": "Pending",
"transaction_date": "2024-08-08T09:28:21.386475+00:00",
"updated_on": "2024-08-08T10:28:21.396197+01:00",
"meta": {}
},
"errors": null,
"message": "Request successful",
"status": "success"
}