# Create A Client

The `McePaymentClient` is your primary interface for all checkout and settlement operations. It expects a `clientId` and `clientSecret` issued by the MCE provider, and optionally accepts a custom `baseUrl` for production or sandbox targeting.

tsx

```
import { McePaymentClient } from "@cityprotocol/core";

const paymentClient = new McePaymentClient({
  clientId: process.env.MCE_CLIENT_ID!,
  clientSecret: process.env.MCE_CLIENT_SECRET!,
  // baseUrl: MCE_PRODUCTION_BASE_URL, // optional
});
```

By default, the client points to the MCE sandbox environment. Pass `MCE_PRODUCTION_BASE_URL` to `baseUrl` when deploying to production.


---

# 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/payment/create-a-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.
