> For the complete documentation index, see [llms.txt](https://docs.payvalida.com/api-tarjeta/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payvalida.com/api-tarjeta/master/pre-autorizacion/pre-autorizacion.md).

# Pre-Autorización

<div align="left"><figure><img src="/files/2dpFClrFhD9qyUKeXgAO" alt=""><figcaption></figcaption></figure></div>

{% hint style="success" %}
**Producción**: [https://api.payvalida.com/v4/merchant/preauthorization](https://api.payvalida.com/v4/preauthorization)
{% endhint %}

{% hint style="success" %}
**Sandbox**: <https://api-test.payvalida.com/v4/merchant/preauthorization>
{% endhint %}

{% tabs %}
{% tab title="Request" %}

<table><thead><tr><th width="189">Campo</th><th width="111">Requerido</th><th width="103">Tipo</th><th width="202">Descripción</th></tr></thead><tbody><tr><td>merchantName</td><td>sí</td><td>string</td><td>Nombre del merchant</td></tr><tr><td>orderId</td><td>sí</td><td>string</td><td>Id de la orden creado por el merchant previamente en el <a href="https://docs.payvalida.com/api-recaudo/ordenes-de-compra/registrar">API Recaudo</a></td></tr><tr><td>checksum</td><td>sí</td><td>string</td><td>sha512(merchantName + orderId + fixed_hash)</td></tr><tr><td>amount</td><td>sí</td><td>string</td><td>Monto por el cual se va a realizar la pre-autorización</td></tr><tr><td>token</td><td>sí</td><td>string</td><td>Identificador del token creado anteriormente para la tarjeta</td></tr><tr><td>typeDi</td><td>no</td><td>string</td><td>Tipo de documento del usuario.<br><br><strong>Colombia</strong>:<br>CC,CE,PP,NIT</td></tr><tr><td>di</td><td>no</td><td>string</td><td>Número de documento de usuario</td></tr></tbody></table>

{% endtab %}

{% tab title="Request (ejemplo)" %}

```json
{
"merchantName": "my_merchant_name",
"orderId": "1234567890",
"checksum":"90037d4ae7d310c1c4c50ce630c54af850587533a900099cde381ac68aa8af1cc959b9820e77a48fb403c460a8630729bc37e2a9d47be9e3e846982fa7c56de0",
"amount": 70500.00,
"token": "12345678901234",
"typeDi": "CC",
"di": "1234567890",
}
```

{% endtab %}

{% tab title="Response" %}

<table><thead><tr><th width="328">CODE</th><th>DESC</th></tr></thead><tbody><tr><td>0000</td><td>APPROVED</td></tr><tr><td>0001</td><td>REJECTED</td></tr><tr><td>0010</td><td>wrong request</td></tr><tr><td>0011</td><td>invalid request</td></tr><tr><td>0012</td><td>payment invalid</td></tr><tr><td>0013</td><td>the reference is not registered or is invalid</td></tr><tr><td>0016</td><td>error processing transaction</td></tr></tbody></table>
{% endtab %}

{% tab title="Response (ejemplo)" %}

```json
{
    "CODE": "0000",
    "DESC": "APPROVED"
}
```

{% endtab %}
{% endtabs %}


---

# 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:

```
GET https://docs.payvalida.com/api-tarjeta/master/pre-autorizacion/pre-autorizacion.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
