---
description: Withdraw funds from wallet to your main account
---

# Withdraw Funds

## Withdraw Funds

<mark style="color:green;">`POST`</mark> `https://sandbox.temboplus.com/tembo/v1/transaction/withdraw`

Transfers money from a wallet to your main account.

#### Headers

| Name                                           | Type   | Description                          |
| ---------------------------------------------- | ------ | ------------------------------------ |
| x-account-id<mark style="color:red;">\*</mark> | string | Partner account id                   |
| x-secret-key<mark style="color:red;">\*</mark> | string | Partner secret key                   |
| x-request-id<mark style="color:red;">\*</mark> | string | A unique id identifying this request |

#### Request Body

| Name                                              | Type        | Description                                               |
| ------------------------------------------------- | ----------- | --------------------------------------------------------- |
| amount<mark style="color:red;">\*</mark>          | number      | Amount to be deposited to a wallet                        |
| accountNo<mark style="color:red;">\*</mark>       | string      | Account number of the wallet to withdraw from             |
| transactionDate<mark style="color:red;">\*</mark> | date string | The date of the transaction in the YYYY-MM-DD format      |
| narration<mark style="color:red;">\*</mark>       | string      | Narration for this transaction                            |
| externalRef<mark style="color:red;">\*</mark>     | string      | External reference to be associated with this transaction |

{% tabs %}
{% tab title="200 Transfer was successful" %}
```javascript
{
   "paymentRef":"",
   "transactionId":"TEMBO-001",
   "transactionRef":"TEMBO-001"
}
```
{% endtab %}

{% tab title="401: Unauthorized Unauthorized request" %}

{% endtab %}

{% tab title="400: Bad Request Validation error" %}
```javascript
{
    "statusCode": 400,
    "reason": "VALIDATION_ERROR",
    "details": {
        "walletId": "walletId is required",
        "amount": "amount must be greater than zero"
    }
}
```
{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Curl" %}
```shell
curl --request POST \
  --url https://sandbox.temboplus.com/tembo/v1/transaction/withdraw \
  --header 'content-type: application/json' \
  --header 'x-account-id: ff6IfxxVceIMM6oFAc9Zig' \
  --header 'x-secret-key: HYX5X4is3a4bnJJo4lXM936bFD6B8iMeAtXijNvHXMI==' \
  --header 'x-request-id: 546d7a200cd8cb45d8ac' \
  --data  '{
     "amount": 1000,
     "accountNo": "70089773",
     "externalRef": "TEMBO-CUSTOMER-003",
     "narration": "Withdrawing for purchase: PJ9383",
     "transactionDate": "2022-11-30"
  }'

```
{% endtab %}
{% endtabs %}

