> 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/direct-card-api-call-flow.md).

# Direct Card API Call Flow

<figure><img src="/files/a5n2vdIaxIurwrn1q2oM" alt=""><figcaption><p>Direct Card API Call Flow</p></figcaption></figure>

1. The user navigates to the checkout page when ready to make a purchase.\ <br>
2. The user enters their card details and submits them. Upon submission, call the [/direct/charges endpoint ](/codapay/direct-api-integration/direct-api-integration-for-cards/submit-a-charge.md)to request the payment via the vault proxy. This returns the charge object in the response, which includes details about the next step related to 3DS. The charge object acts as a comprehensive record of your payment request, tracking details such as the payment status throughout the checkout experience. After calling the /direct/charges endpoint, the payment status will be either processing or failed if the request was unsuccessful.\ <br>
3. Use the url and inputs from the charge.shopper\_action object to initiate the 3DS workflow and display the 3DS page to the user to complete the authorization. This step is bypassed if no authorization is necessary.\ <br>
4. Once the authorization step is completed, you will be notified of the result through an [authorization notification](/codapay/direct-api-integration/direct-api-integration-for-cards/get-notified-of-a-charge-status-change.md#payment-notifications). If the authorization is successful, a fraud check will be conducted, [payment status](/codapay/references/direct-api-charge-statuses.md) in this case would be updated to authorized. If the authorization is not successful, you will receive an error in the [authorization notification](/codapay/direct-api-integration/direct-api-integration-for-cards/get-notified-of-a-charge-status-change.md#payment-notifications) and the payment status would be failed.\ <br>
5. If both the authorization and the fraud check are successful and you have sent us a pre\_capture\_ack\_url parameter in /direct/charges endpoint, you will receive a [capture approval request](/codapay/direct-api-integration/direct-api-integration-for-cards/get-notified-of-a-charge-status-change.md#capture-approval-notification) to decide whether to proceed to capture the payment. If you decide to proceed, the payment will be captured. Otherwise, the transaction will be canceled.\ <br>
6. After the payment capture is successful, you will receive a corresponding [notification](/codapay/direct-api-integration/direct-api-integration-for-cards/get-notified-of-a-charge-status-change.md). Note that the capture success notification may take a few minutes to be delivered. The payment status will be updated to captured.<br>
7. In the meantime, you can check the status of your transaction by using the [check status API call ](/codapay/direct-api-integration/direct-api-integration-for-cards/get-charge-data.md)which will return the current state of the charge object.<br>


---

# 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/direct-card-api-call-flow.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.
