> ## Documentation Index
> Fetch the complete documentation index at: https://primer.io/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Capture payment Action

## What does this Action do?

The "Capture payment" Action is responsible for sending the capture request. It enables you to define rules where you wish to perform an automatic capture of funds.

Learn more about capturing payments [here](https://primer.io/docs/manage-payments/capture-payment.md).

![Workflow example](https://mintcdn.com/primer-cc826789/xLgoTOSuc1hi-Q-M/images/workflows/capture-payment/action-in-workflow.png?fit=max\&auto=format\&n=xLgoTOSuc1hi-Q-M\&q=85\&s=051059c481a81f36f4db34b4cfb053ad)

Workflow example

> [!WARNING]
>
> If the payment is not in the AUTHORIZED state, you will not be able to perform a capture.

## How to use the Action

* Assign a `payment ID` - this will usually be the "Payment ID" from the ["Payment created" Trigger](https://primer.io/docs/workflows/apps/native-apps/primer-payments-app/payment-created-trigger.md) output or ["Payment status updated" Trigger](https://primer.io/docs/workflows/apps/native-apps/primer-payments-app/payment-status-updated-trigger.md) output
* \[Optional] Set `amount` input if you wish to [partial capture](https://primer.io/docs/manage-payments/capture-payment.md#partial-capture)
* \[Optional] Uncheck `final` input if you wish to do multiple automated partial captures

> [!NOTE]
>
> Capture can be asynchronous i.e. once the capture call is sent to the processor, it can take some time for the payment to become SETTLED. Learn more [here](https://primer.io/docs/manage-payments/capture-payment.md#handle-asynchronous-capture) and how to handle these scenarios.

## Use cases

All your payments must be captured to charge the customer’s account and transfer the funds to your merchant account. Based on your needs, you can utilize this action in a few ways. Below are some examples for inspiration:

> [!TIP]
>
> Simple payment flow that if authorized, shows the success screen then captures, else it shows the failure screen to the customer.

![Use Case 1](https://mintcdn.com/primer-cc826789/xLgoTOSuc1hi-Q-M/images/workflows/capture-payment/auth_success.png?fit=max\&auto=format\&n=xLgoTOSuc1hi-Q-M\&q=85\&s=dbacadf5a9484b7b4c7e06c2bab01dd4)

Use Case 1

> [!TIP]
>
> Separate workflow using the "Payment status updated" Trigger to always automatically capture if the status becomes AUTHORIZED. This is very useful if you have multiple workflows using the "Payment created" Trigger but you want to handle authorized payments in one way (in this case, always capture).

![Use Case 2](https://mintcdn.com/primer-cc826789/xLgoTOSuc1hi-Q-M/images/workflows/capture-payment/trigger-set-up.png?fit=max\&auto=format\&n=xLgoTOSuc1hi-Q-M\&q=85\&s=334605311978b82ca108527fdde847b4)

Use Case 2

> [!TIP]
>
> Single workflow to determine whether to capture the payment or not based on the results of the CVV and AVS checks.

![Use Case 3](https://mintcdn.com/primer-cc826789/xLgoTOSuc1hi-Q-M/images/workflows/capture-payment/capture_check.png?fit=max\&auto=format\&n=xLgoTOSuc1hi-Q-M\&q=85\&s=d0f2c03965212572774c551a3cfddc20)

Use Case 3


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.