> For the complete documentation index, see [llms.txt](https://docs.coda.co/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.coda.co/codapay/direct-api-integration/direct-api-integration-for-cards.md).

# Direct API Integration for Cards

## <mark style="color:purple;">Overview</mark>

This section provide a comprehensive guide to the Coda Direct API for cards, enabling you to seamlessly integrate card payment processing capabilities into your applications.

**Implementing this API entails a pure backend integration for card payments – customers will not be redirected to Coda's payment pages.**\
\
This option is suitable for implementation in any environment, web or app, and allows partners to maintain their own branding throughout the whole payment flow.

Backend Flow will take more time to implement and maintain as compared to using Coda's payment pages.

{% hint style="info" %}
🚧 To use Direct API for cards, your site needs to have **PCI-DSS certification** if your site collects card number information.
{% endhint %}

## <mark style="color:purple;">APIKEY</mark>

Please contact publisher support team to obtain an API key to use the Coda Direct API for cards.

## <mark style="color:purple;">Endpoint Base URLs</mark>

The only way for the publisher to integrate with Coda Direct API for cards endpoints is to send the requests to the following Base URL:

Refer to our sample messages for examples.

<table><thead><tr><th width="180">Environment</th><th>Endpoint Base URL</th></tr></thead><tbody><tr><td>Sandbox</td><td><a href="https://tc-api-card-sandbox.codapayments.com/v1/direct/charges">https://tc-api-card-sandbox.codapayments.com/v1/</a></td></tr><tr><td>Production</td><td><a href="https://api-tc.codapayments.com/v1/direct/charges">https://api-tc.codapayments.com/v1/</a></td></tr></tbody></table>

{% hint style="warning" %}
🚧 <mark style="color:orange;">**Please ensure that requests to Codapay API must be sent over**</mark>

1. HTTPS
2. TLS 1.2 or higher
3. Include an Authorization header, API Key, and Partner ID
   {% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://docs.coda.co/codapay/direct-api-integration/direct-api-integration-for-cards.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
