# Card Method

The Card Method resource is used to query the card purchase methods available in the Stark Bank API.

Card Method codes are used to define purchase method filters in Corporate Rules.

**Note:** Card Methods are never created by you. They are an enum served by the API, so this resource is query-only.

### The Card Method object

**Attributes**

| Name | Type | Description |
| --- | --- | --- |
| `code` | STRING | Method's code. Options: "chip", "token", "server", "manual", "magstripe", "contactless". Example: "token". |
| `name` | STRING | Method's name, translated to the language of the Accept-Language header. Example: "token". |
| `number` | STRING | Method's number. Example: "81". |

### List Card Methods

`GET /v2/card-method`

Use this route to list the card purchase methods available in the Stark Bank API.

**NOTE:** This route returns the full enum in a single response. It is not paginated, so it accepts no limit or cursor parameters and returns no cursor.

**Parameters**

| Name | Required | Description |
| --- | --- | --- |
| `search` | OPTIONAL | Keyword to search for code, name or number. The match is case- and accent-insensitive. Example: "token" |
| `fields` | OPTIONAL | List of strings to filter response JSON keys. Not available in the SDKs. |

**Request**

```python
import starkbank

methods = starkbank.cardmethod.query(search="token")

for method in methods:
    print(method)
```

**Response**

```python
CardMethod(
    code=token,
    name=token,
    number=81
)
```

## Available Languages

Code samples on this page are in Python. The same content is available with samples in:

- [Python](https://docs.starkbank.com/api/v2/card-method-python.md)
- [Node.js](https://docs.starkbank.com/api/v2/card-method-node.md)
- [PHP](https://docs.starkbank.com/api/v2/card-method-php.md)
- [Java](https://docs.starkbank.com/api/v2/card-method-java.md)
- [Ruby](https://docs.starkbank.com/api/v2/card-method-ruby.md)
- [Elixir](https://docs.starkbank.com/api/v2/card-method-elixir.md)
- [.NET](https://docs.starkbank.com/api/v2/card-method-dotnet.md)
- [Go](https://docs.starkbank.com/api/v2/card-method-go.md)
- [Clojure](https://docs.starkbank.com/api/v2/card-method-clojure.md)
- [cURL](https://docs.starkbank.com/api/v2/card-method-curl.md)
