> For the complete documentation index, see [llms.txt](https://eyowo.gitbook.io/eyowo-developer-apis/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://eyowo.gitbook.io/eyowo-developer-apis/api-resources/transfers.md).

# Transfers

To perform monetary transactions with a user's eyowo account or wallet `<X-App-Wallet-Access-Token>`, you must obtain the user's access wallet token. See the previous chapter on [Authentications](/eyowo-developer-apis/api-resources/authentication.md).

You can perform two types of transactions:

**Transfer to Phone or Phone Transfer:** this transfer is from a user's Eyowo account to another user's eyowo account or wallet.

**Transfer to Bank or Bank Transfer:** this transfer is from a user's Eyowo account to any bank account.

## Phone Transfers

<mark style="color:green;">`POST`</mark> `https://api.console.eyowo.com/v1/users/transfers/phone`

`Request Body: { "mobile" : "234000000000", "amount": "4000" }`

#### Headers

| Name                      | Type   | Description              |
| ------------------------- | ------ | ------------------------ |
| X-App-Key                 | string | `X-App-Key`              |
| X-App-Wallet-Access-Token | string | `X-App-Wallet-Access-To` |

#### Request Body

| Name    | Type    | Description                                                      |
| ------- | ------- | ---------------------------------------------------------------- |
| sendSms | boolean | `default to true <sends sms on successful transfer. N5 per sms>` |
| mobile  | string  | `23480123456789 <valid Nigerian num>`                            |
| amount  | number  | `10000 = 1,000.00 <in kobo>`                                     |

{% tabs %}
{% tab title="200 Sucessfully made the transfer" %}

```
{
  "success": true,
  "data": {
    "transaction": {
      "reference": "5c4f2d205d73fe5abe0a4393",
      "amount": 10000
    }
  },
  "message": "Transaction successful"
}
```

{% endtab %}

{% tab title="404 Could not find a cake matching this query." %}

```
{    "message": "Ain't no cake like that."}
```

{% endtab %}
{% endtabs %}

## Bank Transfers

<mark style="color:green;">`POST`</mark> `https://api.console.eyowo.com/v1/users/transfers/bank`

`Request Body:  { "accountName" : "EYOWO DEVELOPER",  "accountNumber": "393082038494",    "bankCode": "00004", "amount" : "40000" }`<br>

#### Headers

| Name                      | Type   | Description                 |
| ------------------------- | ------ | --------------------------- |
| X-App-Key                 | string | `X-App-Key`                 |
| X-App-Wallet-Access-Token | string | `X-App-Wallet-Access-Token` |

#### Request Body

| Name          | Type   | Description               |
| ------------- | ------ | ------------------------- |
| accountName   | string | recipients account name   |
| accountNumber | string | recipients account number |
| bankCode      | string | recipients bank code      |
| amount        | number | amount in kobo            |

{% tabs %}
{% tab title="200 Bank transfer was successful" %}

```
{
    "success": true,
    "data": {
        "transaction": {
            "amount": 100000,
            "accountName": "DAMBATTA MARYAM LAMI",
            "transactionReference": "5ec58e1f084c634901127b75",
            "statusCode": "000002"
        }
    },
    "message": "Transaction successful"
}
```

{% endtab %}
{% endtabs %}

## Requery Bank Transfer

<mark style="color:blue;">`GET`</mark> `https://api.console.eyowo.com/v1/users/transfers/requery/bank/:transactionRef`

The endpoint validates the current status of  a bank transfer initated using your Eyowo developer app.

#### Path Parameters

| Name           | Type   | Description                          |
| -------------- | ------ | ------------------------------------ |
| transactionRef | string | `5d1a8..... <valid transaction ref>` |

#### Headers

| Name                      | Type   | Description                 |
| ------------------------- | ------ | --------------------------- |
| X-App-Key                 | string | X-App-Key                   |
| X-App-Wallet-Access-Token | string | `X-App-Wallet-Access-Token` |

{% tabs %}
{% tab title="200 " %}

```
{
    "success": true,
    "data": {
        "transaction": {
            "statusMessage": "success",
            "statusCode": "000001"
        }
    }
} 
```

{% endtab %}
{% endtabs %}

| Status Code | Status Message |
| ----------- | -------------- |
| 000000      | Failed         |
| 000001      | Success        |
| 000002      | Pending        |

{% hint style="info" %}
The transactionRefrenece in the request must belong to the X-App-Key provided in the header.
{% endhint %}
