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

# POST /api-service/card/login — Get Authorization Token

> Authenticate with the Wasl Cards API using your merchant credentials and receive a session token required for all subsequent requests.

The Get Token endpoint authenticates your account and returns a session token that you must include in the `Authorization` header of every subsequent API call. Tokens are issued per session, so you should store the returned value securely and re-authenticate whenever your token expires or is rejected.

## Endpoint

```
POST /api-service/card/login
```

| Environment | Base URL |
| - | - |
| Development | `https://development.payzah.net` |
| Production | `https://Payzah.net/production770` |

## Request Headers

| Header | Value |
| - | - |
| `Content-Type` | `application/json` |
| `Token` | `token` |

<Note>
  The `Authorization` header is **not** required for this endpoint — you are requesting the token here. Include it in all subsequent calls once you have received your token.
</Note>

## Request Body

<ParamField body="user_name" type="string" required>
  Your registered Wasl account username.
</ParamField>

<ParamField body="password" type="string" required>
  The password associated with your Wasl account.
</ParamField>

### Example Request

```json Request theme={null}
{
  "user_name": "your_username",
  "password": "your_password"
}
```

## Response

### Response Fields

<ResponseField name="status" type="boolean">
  Indicates whether the request succeeded. Returns `true` on a successful authentication.
</ResponseField>

<ResponseField name="code" type="string">
  A status code for the response. `"11111"` indicates success.
</ResponseField>

<ResponseField name="token" type="string">
  Your session token. Pass this value in the `Authorization` header of every subsequent API request.
</ResponseField>

### Example Response

```json Response theme={null}
{
  "status": true,
  "code": "11111",
  "token": "unique token"
}
```

## Usage Notes

<Note>
  Copy the `token` value from the response and include it as the `Authorization` header in all further requests:

  ```
  Authorization: <your token>
  ```
</Note>

<Warning>
  If any subsequent API call returns error code `10000` (Incorrect Token Access), your token has expired or is invalid. Call this endpoint again to obtain a fresh token before retrying.
</Warning>

<Tip>
  Avoid re-authenticating on every request. Store the token securely in your application's session or secret store and reuse it until it is rejected.
</Tip>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.