# Consult

This method allows retrieving information of a cashout operation, showing its most relevant data.

{% hint style="info" %}
Method: **POST**
{% endhint %}

{% hint style="success" %}
**Prodution:** <https://api.payvalida.com/cashout/v1/order/{netname}>

**Sandbox:** <https://api-test.payvalida.com/cashout/v1/order/{netname}>
{% endhint %}

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

<table><thead><tr><th width="173">Name</th><th width="102">Required</th><th width="165">Description</th><th width="137">Type</th><th>Length</th></tr></thead><tbody><tr><td>otp</td><td>Yes</td><td>One time password (OTP)</td><td>Alphanumeric</td><td>30</td></tr><tr><td>netcode</td><td>Yes</td><td>Network code (convenio)</td><td>Numeric</td><td>20</td></tr><tr><td>document</td><td>Yes</td><td>ID or reference associated with the operation (Max 20 characters)</td><td>Alphanumeric</td><td>20</td></tr><tr><td>checksum</td><td>Yes</td><td>Checksum encoded with SHA512 (name + pin + document + FIXED_HASH)</td><td>Alphanumeric</td><td>512</td></tr><tr><td>customparam01</td><td>Yes</td><td>Custom param (account type)</td><td>Alphanumeric</td><td>50</td></tr><tr><td>customparam02</td><td>Yes</td><td>Custom param (amount)</td><td>Alphanumeric</td><td>50</td></tr><tr><td>customparam03</td><td>Yes</td><td>Custom param</td><td>Alphanumeric</td><td>50</td></tr></tbody></table>
{% endtab %}

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

> curl --request POST '<https://api-test.payvalida.com/cashout/v1/order/VIA'\\>
> &#x20;           \--data-raw '{
>
> &#x20;                       "otp": "1234056",
>
> &#x20;                       "netcode": 180,
>
> &#x20;                       "document": "1020304051",
>
> &#x20;                       "checksum": "SHA512FIXEDHASH"
>
> &#x20;           }'
> {% endtab %}

{% tab title="Response" %}

| Name                 | Description                                                                                                | Type         |
| -------------------- | ---------------------------------------------------------------------------------------------------------- | ------------ |
| code                 | Indicates the resulting code, “0000” means result with no error, any other value indicates the error code. | Alphanumeric |
| text                 | Contains the detailed message associated with the code.                                                    | Alphanumeric |
| data                 | Contains the transaction’s data (when there’s no error)                                                    | Object       |
| data-amount          | Amount of the transaction                                                                                  | Alphanumeric |
| data-transactionCost | Cost assumed by the user for this transaction                                                              | Alphanumeric |
| data-currency        | Currency registered for this cashout order\*                                                               | Alphanumeric |
| data-document        | Confirmation of the document ID                                                                            | Alphanumeric |
| data-otp             | Confirmation of the sent OTP                                                                               | Alphanumeric |
| data-operation       | Identifier of the operation, required to register the transaction                                          | Alphanumeric |
| data-customparam01   | Custom parameter sent by the network                                                                       | Alphanumeric |
| data-customparam02   | Custom parameter sent by the network                                                                       | Alphanumeric |
| data-customparam03   | Custom parameter sent by the network                                                                       | Alphanumeric |
| data-checksum        | Checksum encoded with SHA512(pin + document + amount + currency + idoperation + FIXED\_HASH)               | Alphanumeric |

{% endtab %}

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

> {
>
> &#x20;           "code": "0000",
>
> &#x20;           "text": "OK",
>
> &#x20;           "data": {
>
> &#x20;                       "amount": "31529.0",
>
> &#x20;                       "transactionCost": "991",
>
> &#x20;                       "currency": "COP",
>
> &#x20;                       "description": "Test Cashout",
>
> &#x20;                       "document": "10410754367",
>
> &#x20;                       "otp": "3659",
>
> &#x20;                       "operation": "312",
>
> &#x20;                       "checksum": "SHA512FIXEDHASH"
>
> &#x20;           }
>
> }
> {% endtab %}
> {% endtabs %}

{% hint style="info" %}
\*Supported currencies:

* COP&#x20;
* PEN&#x20;
* USD&#x20;
* CRC&#x20;
* GTQ
  {% endhint %}
