> 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/hosted-payment-page-integration/authorize-and-capture-a-payment-separately.md).

# Authorize And Capture A Payment Separately

By default, Codapay processes card payments as a single charge — the authorization and capture happen in one step. With authorization and capture separation, you can split this into two distinct stages:

1. **Authorization** — The cardholder's bank verifies the payment and places a hold on the funds, but no money is transferred yet.
2. **Capture** — You explicitly confirm the payment, and the funds are transferred from the cardholder to your account.

If you decide not to proceed with the payment after authorization, you can **cancel** the authorized transaction to release the hold on the cardholder's funds.

### When to use it

Authorization and capture separation is useful when you need to:

* Verify inventory or product availability before finalizing a charge
* Perform additional fraud or compliance checks after the user completes payment authentication
* Review high-value transactions manually before capturing

### Prerequisites

To use authorization and capture separation, the following must be enabled for your account:

1. **POST Notifications** — Auth and capture separation is only available with POST notifications. Refer to the [Auth & Capture Notifications](/codapay/hosted-payment-page-integration/authorize-and-capture-a-payment-separately/auth-and-capture-notifications.md) page for details on activating POST notifications.
2. **Auth & Capture Separation** — This feature must be activated separately for your account.

Please contact your Codapay account manager to enable both features.

### How it works

The authorization and capture flow works as follows:

1. You initiate a payment request as usual. Once the feature is activated, Codapay will authorize the payment without capturing it.
2. You receive an `AUTHORIZATION_SUCCESSFUL` or `AUTHORIZATION_FAILED` notification via your webhook endpoint.
3. If the authorization is successful, you decide whether to **capture** or **cancel** the payment:
   * **Capture** — Call the [Capture a Payment Request](https://claude.ai/chat/cb09ca98-8996-43b7-87cb-cd20a04c1dea#) endpoint to finalize the payment. You will receive `CAPTURE_INITIATED`, then `CAPTURE_SUCCESSFUL` or `CAPTURE_FAILED` notifications.
   * **Cancel** — Call the [Cancel a Payment Request](/codapay/hosted-payment-page-integration/authorize-and-capture-a-payment-separately/cancel-a-payment-request.md) endpoint to release the held funds. The authorization will be voided.

### Next steps

* [Auth & Capture Notifications](/codapay/hosted-payment-page-integration/authorize-and-capture-a-payment-separately/auth-and-capture-notifications.md) — Notification event types and payload structure for authorization and capture events
* [Capture a Payment Request](/codapay/hosted-payment-page-integration/authorize-and-capture-a-payment-separately/capture-a-payment-request.md) — API reference for capturing an authorized payment
* [Cancel a Payment Request](/codapay/hosted-payment-page-integration/authorize-and-capture-a-payment-separately/cancel-a-payment-request.md) — API reference for canceling an authorized payment


---

# 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/hosted-payment-page-integration/authorize-and-capture-a-payment-separately.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.
