> For the complete documentation index, see [llms.txt](https://docs.payrexx.com/developer/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payrexx.com/developer/guides/gateway/payment-types/pre-authorization.md).

# Pre Authorization

Reserve a fixed amount on a payment mean.

* The amount you want to debit may **be lower** than the reserved amount, but **not higher**.
* Charging the pre authorization works with **certainty**.
* Pre Authorizations last around **7–30 days** (this duration depends on the issuer).

{% hint style="warning" %}
Not all payment provider support pre-authorizations.\
Visit our [PSP Feature](https://docs.payrexx.com/merchant/bezahldienste/funktionsmatrix) article to find a suitable payment provider.
{% endhint %}

## Process

### Gateway creation

Pre-authorizations can easily be implemented using the Payrexx Gateway.\
Use the parameter **reservation** to do so.

{% content-ref url="/pages/-Mguz7bjqS3lWfKhQ2HU" %}
[Build Your Gateway](/developer/guides/gateway/build.md)
{% endcontent-ref %}

### Customer authorization

This step is identical to the "payment" step in the [Gateway documentation](/developer/guides/gateway/build.md#payment).\
With a pre-authorization, the only difference is that the amount is not debited but reserved.

Also a [transaction webhook](/developer/guides/webhook/transaction.md) with the transaction status **reserved** will be triggered.

### Charge reserved amount

#### Get transaction ID

The transaction ID is present in the [transaction webhook](/developer/guides/webhook/transaction.md)*.*

You can find this ID also if you [retrieve a Gateway](https://developers.payrexx.com/reference#retrieve-a-gateway) through the Payrexx API.\
Small hint on where to find the transaction ID in the retrieve a Gateway respone:

```yaml
{
    "status": "success",
    "data": [
        {
            "id": 1,
            "status": "reserved",
            "invoices": [
                {
                    "transactions": [
                        {
                            "id": 2012844,
                        }
                    ],
                }
            ],
        }
    ]
}
```

#### Execute charge

Use [Charge a Pre-Authorized/Reserved Transaction](https://developers.payrexx.com/reference-link/charge-a-pre-authorized-reserved-transaction) to make a charge on the reserved transaction. You will need the ID of the transaction with status "reserved" to do so!

{% hint style="warning" %}
There is no possibility to make further charges using this authorized transaction.
{% endhint %}
