> ## Documentation Index
> Fetch the complete documentation index at: https://docs.splashpay.co.tz/llms.txt
> Use this file to discover all available pages before exploring further.

# Bank Short Names

> Retrieve the list of supported banks and their short codes for bank transfers.

# Bank Short Names

Retrieve the list of supported banks and their corresponding short codes. The returned `code` should be used when initiating bank transfer or bank payout requests.

## Endpoint

```http theme={null}
GET /bank-shortnames
```

## Authentication

Include your API credentials in the request headers.

| Header       | Required | Description               |
| ------------ | -------- | ------------------------- |
| X-API-KEY    | Yes      | Your SplashPay API Key    |
| X-API-SECRET | Yes      | Your SplashPay API Secret |

## Example Request

<CodeGroup>
  ```bash cURL theme={null}
  curl --request GET \
    --url https://api.splashpay.co.tz/api/v1/bank-shortnames \
    --header "Accept: application/json" \
    --header "X-API-KEY: pk_live_xxxxxxxxxxxxx" \
    --header "X-API-SECRET: sk_live_xxxxxxxxxxxxx"
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    'https://api.splashpay.co.tz/api/v1/bank-shortnames',
    {
      method: 'GET',
      headers: {
        Accept: 'application/json',
        'X-API-KEY': process.env.SPLASHPAY_KEY,
        'X-API-SECRET': process.env.SPLASHPAY_SECRET,
      },
    }
  );

  const banks = await response.json();

  console.log(banks);
  ```

  ```python Python theme={null}
  import requests

  response = requests.get(
      "https://api.splashpay.co.tz/api/v1/bank-shortnames",
      headers={
          "Accept": "application/json",
          "X-API-KEY": "YOUR_API_KEY",
          "X-API-SECRET": "YOUR_API_SECRET",
      },
  )

  print(response.status_code)
  print(response.json())
  ```

  ```php PHP theme={null}
  use Illuminate\Support\Facades\Http;

  $response = Http::withHeaders([
      'Accept' => 'application/json',
      'X-API-KEY' => env('SPLASHPAY_KEY'),
      'X-API-SECRET' => env('SPLASHPAY_SECRET'),
  ])->get(
      'https://api.splashpay.co.tz/api/v1/bank-shortnames'
  );

  return $response->json();
  ```

  ```dart Dart theme={null}
  import 'dart:convert';
  import 'package:http/http.dart' as http;

  Future<void> getBanks() async {
    final response = await http.get(
      Uri.parse(
        'https://api.splashpay.co.tz/api/v1/bank-shortnames',
      ),
      headers: {
        'Accept': 'application/json',
        'X-API-KEY': 'YOUR_API_KEY',
        'X-API-SECRET': 'YOUR_API_SECRET',
      },
    );

    print(jsonDecode(response.body));
  }
  ```
</CodeGroup>

## Successful Response

```json theme={null}
{
  "status": "success",
  "code": "SUCCESS",
  "message": "Bank shortnames retrieved successfully.",
  "data": [
    {
      "id": 1,
      "name": "ABSA Bank",
      "code": "ABSA"
    },
    {
      "id": 2,
      "name": "CRDB Bank",
      "code": "CRDB"
    },
    {
      "id": 3,
      "name": "NMB Bank",
      "code": "NMB"
    }
  ]
}
```

## Response Fields

| Field | Type    | Description                                                     |
| ----- | ------- | --------------------------------------------------------------- |
| id    | integer | Unique bank identifier.                                         |
| name  | string  | Full bank name.                                                 |
| code  | string  | Bank short code used when initiating bank transfers or payouts. |

## Notes

* Use the `code` value when making bank transfer or payout requests.
* The list may change over time as banks are added, removed, or temporarily disabled.

```
```
