> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.mangopay.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.mangopay.com/_mcp/server.

# 30-day preauth

**Availability:**

* `CB_VISA_MASTERCARD`
* `AMEX`

> **Note**
>
> **Note - Multi-capture not possible with 30-day preauthorization**
>
> Multi-capture is only available for 7-day preauthorization.

Mangopay's 30-day preauthorization feature is a two-step process, and uses two API objects:

* The Extended Preauthorization to request the card authorization, which involves the user completing 3DS
* The Extended Preauthorized PayIn to capture the funds without the user present and based on the authorization

## How to process a 30-day card preauthorization

> **Info**
>
> **Prerequisites**
>
> * A `ClientId` and an API key – if you don't have these, [contact Sales](https://mangopay.com/contact) to get access to the [Mangopay Dashboard](https://hub.mangopay.com/)
> * A User object created for your end user, and their associated Wallet
> * A [registered card](/guides/payment-methods/card) (Visa, Mastercard, CB, or AMEX), which is `VALID` or registered less than 24 hours ago, to make the payments
> * The URL of a page on your platform to return the end user to after authentication

### 1. Secure the funds

Create an extended preauthorization to hold funds for 30 days:

> [**POST** /v2.01/\{ClientId}/extended-preauthorizations/card/direct](/api-reference/extended-preauthorizations/create-card-extended-preauthorization)

In the information returned, retain the `Id` of the Extended Preauthorization for the next steps.

### 2. Redirect the user to 3DS protocol (if required)

Redirect the user to the `SecureModeRedirectURL` value to complete strong customer authentication, unless it is `null`. If `SecureModeRedirectURL` is `null`, this means that 3DS is not required and no redirection is needed.

You can also use the `SecureModeNeeded` boolean to determine this redirection behavior.

For more information on how to handle 3DS redirection, see Steps 4, 6, and 7 of the [How to process a card payment](/guides/payment-methods/card/direct/how-to) guide.

### 3. Capture the funds

Once the Extended Preauthorization's `PaymentStatus` is `WAITING`, the funds are authorized to be captured within 29.5 days.

> **Note**
>
> **Note - Multiple captures not possible**
>
> Capturing the preauthorized amount can only be done once. It is possible to do a partial capture (for an amount less than the preauthorized amount).

To capture the funds, create the pay-in using the `Id` of the Extended Preauthorization obtained previously as the `ExtendedPreauthorizationId`.

Specify the `Amount` values of debited funds and fees. The amount of the `DebitedFunds` must be less than or equal to the preauthorized amount.

> [**POST** /v2.01/\{ClientId}/payins/extended-preauthorized/direct/full-capture](/api-reference/extended-preauthorizations/create-extended-preauthorized-payin)

If the preauthorized pay-in is successful, the extended preauthorization's `PaymentStatus` becomes `VALIDATED`. In the `PayinsLinked` parameter, the `Id` of the capture is linked as the `PayinCaptureId`.

You can set up a webhook for the following event type to be notified of the status change:

* EXTENDED\_PREAUTHORIZATION\_PAYMENT\_VALIDATED

Use the [GET View an Extended Preauthorization](/api-reference/extended-preauthorizations/view-extended-preauthorization) endpoint to see these details.

**`API response`**

```json API response
...
    "PaymentStatus": "VALIDATED",
    "PayinsLinked": {
        "PayinCaptureId": "1719d157-5a97-4af3-91b0-7d660b34b21c",
        "PayinComplementId": null
    },
...
```

Once the `PaymentStatus` is `VALIDATED`, no further action is possible.

### 4. Cancel hold if not used

In the scenario where the capture is not needed, you should release the user's funds proactively rather than letting the hold expire after 29.5 days.

You can release the preauthorized funds by changing the Extended Preauthorization's `PaymentStatus` to `CANCELED`:

> [**PUT** /v2.01/\{ClientId}/extended-preauthorizations/\{ExtendedPreauthorizationId}](/api-reference/extended-preauthorizations/cancel-extended-preauthorization)

Once the `PaymentStatus` is `CANCELED`, no further action is possible.

**`API response parameters - Canceled`**

```json API response parameters - Canceled
...
    "PaymentStatus": "CANCELED",
    "PayinsLinked": {
        "PayinCaptureId": null,
        "PayinComplementId": null
    },
...
```

You can set up a webhook for the following event types to be notified of the status changes:

* EXTENDED\_PREAUTHORIZATION\_PAYMENT\_CANCEL\_REQUESTED
* EXTENDED\_PREAUTHORIZATION\_PAYMENT\_CANCELED

## Related resources

#### [Guide](/guides/payment-methods/card/direct/how-to)

Learn how to process a one-time card payment

#### [Endpoint](/api-reference/extended-preauthorizations/extended-preauthorization-object)

The Extended Preauthorization object