# Create a Card Client

### Supported Providers

Card issuance and lifecycle is provider-backed, but integrators build against the stable City surface. The SDK follows a dependency-injection pattern: you instantiate a provider, then pass it into `CityCardClient`.

Supported providers include `ReapCardProvider`, `InterlaceCardProvider`, and `URCardProvider`. Each provider encapsulates its own authentication scheme, endpoint routing, and payload normalization so that the methods exposed on `CityCardClient` remain identical regardless of which provider is active.

***

### Create A Card Client

The `CityCardClient` is your primary interface for all card operations. It expects a configured provider instance.

```
import { CityCardClient, ReapCardProvider } from "@cityprotocol/core";

const provider = new ReapCardProvider({
  apiKey: process.env.REAP_API_KEY!,
});

const cardClient = new CityCardClient({ provider });
```

Swapping to a different provider requires only changing the provider constructor — every downstream call through `cardClient` stays the same.

```
import { CityCardClient, InterlaceCardProvider } from "@cityprotocol/core";

const provider = new InterlaceCardProvider({
  apiKey: process.env.INTERLACE_API_KEY!,
});

const cardClient = new CityCardClient({ provider });
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://city-protocol.gitbook.io/docs/software-development-kit/card/create-a-card-client.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
