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

# Base URL

> Learn the Pasteaza API base URL and how request environments are selected.

Pasteaza has one public API base URL. All public API routes are served under the `/v1` path.

<Info>
  Test and live mode are selected by your secret key prefix, not by a separate sandbox URL.
</Info>

## Base URL

Use this base URL for all Pasteaza API requests:

```http theme={null}
https://api.oyapasteaza.com/v1
```

For example, the List Banks endpoint is:

```http theme={null}
https://api.oyapasteaza.com/v1/banks
```

## Environments

Pasteaza determines the request environment from the secret key you send in the `Authorization` header.

| Secret key prefix | Environment | Use                                                                   |
| ----------------- | ----------- | --------------------------------------------------------------------- |
| `sk_test_`        | Test mode   | Build and test your integration without processing live transactions. |
| `sk_live_`        | Live mode   | Process real transactions after you are ready to go live.             |

<Warning>
  Never use a live secret key while testing. Requests authenticated with `sk_live_` are treated as live requests.
</Warning>

## Authentication example

```http theme={null}
GET /v1/banks HTTP/1.1
Host: api.oyapasteaza.com
Authorization: Bearer sk_test_xxxxxxxxxxxxxxxxx
Content-Type: application/json
Accept: application/json
```

The request above runs in test mode because the key starts with `sk_test_`.

## Versioning

Pasteaza includes the API version in the URL path.

```http theme={null}
https://api.oyapasteaza.com/v1
```

Future breaking changes will use new versions, such as `/v2`, while keeping existing integrations working.

## Request headers

All API requests should include these headers:

```http theme={null}
Content-Type: application/json
Accept: application/json
```

## HTTPS

Always send requests over HTTPS.

Requests sent over unsecured HTTP are rejected.

## Standard response format

Successful responses usually look like this:

```json theme={null}
{
  "status": true,
  "message": "Request completed successfully.",
  "data": {}
}
```

Failed responses usually look like this:

```json theme={null}
{
  "status": false,
  "message": "Invalid API key.",
  "code": "authentication_failed"
}
```

## Next step

After you set your base URL, continue to the authentication guide to learn how to authorize requests.
