> For the complete documentation index, see [llms.txt](https://docs.payvalida.com/apipse/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/apipse/ordenes-de-pse/consultar.md).

# Consultar

## Consultar

<mark style="color:blue;">`GET`</mark> `https://api.payvalida.com/pse/transactions/{ticketid}`

**URLSandbox:** *<https://api-test.payvalida.com/pse/transactions/{ticketid}>*

#### Path Parameters

| Name     | Type   | Description                                       |
| -------- | ------ | ------------------------------------------------- |
| ticketid | string | Código de transacción en PSE. Máx. 19 caracteres. |

#### Query Parameters

| Name     | Type   | Description                                                   |
| -------- | ------ | ------------------------------------------------------------- |
| merchant | string | Identificación del comercio en Payvalida. Máx. 50 caracteres. |
| checksum | string | Cadena de comprobación con SHA512 (ticketid + FIXED\_HASH)    |

{% tabs %}
{% tab title="200 La ejecución retorna un JSON estructurado de esta manera:" %}

```
{
    "CODE": "0000",
    "DATA": {
        "TRANSACTION_DATE": "20/11/2020",
        "BANK": "1051-BANCO DAVIVIENDA",
        "STATUS": "APROBADA",
        "NIT": "9004186855",
        "TRAZABILITY_CODE": "805402411"
    },
    "DESC": "Consulta exitosa"
}
```

{% endtab %}
{% endtabs %}

#### Detalles

* **ticketid:** identificador único de la orden en PSE. Este identificador se da al momento de la creación de esta orden utilizando el endpoint de creación.
* **merchant:** identificador único del comercio en Payvalida, cada comercio tiene asignado un FIXED\_HASH único, solo conocido por Payvalida y el Comercio.
* **checksum:** verificación de la identidad del comercio.

{% hint style="success" %}
La identificación del comercio (merchant) y FIXED\_HASH, es generada al momento de [crear una cuenta](https://registro.payvalida.com) en nuestra plataforma y se envía por correo electrónico.
{% endhint %}

{% hint style="warning" %}
Los diferentes estados en las que la orden puede estar son: APROBADA, RECHAZADA, PENDIENTE o FALLIDA
{% endhint %}

{% hint style="info" %}
Si la transacción de PSE se encuentra en estado APROBADA, la orden de compra en Payvalida automáticamente pasa a APROBADA también.
{% endhint %}


---

# 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/apipse/ordenes-de-pse/consultar.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.
