> ## Documentation Index
> Fetch the complete documentation index at: https://docs.autorizou.com.br/llms.txt
> Use this file to discover all available pages before exploring further.

# Detalhes Pagamento

> Consultar status e detalhes de um pagamento específico

## Parametros da Requisição

<ParamField body="payment_id" type="string" required>
  Identificador UUID do pagamento.
</ParamField>

<ParamField body="details" type="array" required>
  Lista de detalhes

  <Expandable title="Propriedades">
    <ParamField path="details[].three_ds_result" type="string" />
  </Expandable>
</ParamField>

## Exemplos de Requisição

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://pay.autorizou.dev/api/v1/payments/details \
      -H "Authorization: Bearer 4eC39HqLyjWDarjtT1zdp7dc" \
      -H "Content-Type: application/json" \
      -d '{
          "payment_id": "295e3b31-1684-4355-8ee5-4bbf7b97589b",
          "details": [
              {
                 "three_ds_result": null
              }
          ]
      }'
  ```

  ```javascript JavaScripts theme={null}
  const result = await fetch('https://pay.autorizou.dev/api/v1/payments/details', {
      method: 'POST',
      headers: {
          'Authorization': 'Bearer 4eC39HqLyjWDarjtT1zdp7dc',
          'Content-Type': 'application/json'
      },
      body: JSON.stringify({
          "payment_id": "295e3b31-1684-4355-8ee5-4bbf7b97589b"
          "details": [
              {
                  "three_ds_result": null
              }
          ]
      })
  });
  ```

  ```php PHP theme={null}
  <?php

  $data = [
      'payment_id' => '295e3b31-1684-4355-8ee5-4bbf7b97589b'
      'details' => [
          [
              "three_ds_result": null
          ],
      ]

  ];

  $curl = curl_init();
  curl_setopt_array($curl, [
      CURLOPT_URL => 'https://pay.autorizou.dev/api/v1/payments/settlements',
      CURLOPT_RETURNTRANSFER => true,
      CURLOPT_POST => true,
      CURLOPT_HTTPHEADER => [
          'Authorization: Bearer 4eC39HqLyjWDarjtT1zdp7dc',
          'Content-Type: application/json'
      ],
      CURLOPT_POSTFIELDS => json_encode($data)
  ]);

  $response = json_decode(curl_exec($curl), true);

  echo json_encode($response, JSON_PRETTY_PRINT);
  ?>
  ```
</CodeGroup>

## Exemplo de Resposta

```json theme={null}
{
    "status": "authorized",
    "refusal_reason": "string",
    "return_code": "string"
}
```

## Detalhes da Resposta

### Dados Principais

| Campo            | Tipo   | Descrição                                                                                                                           |
| ---------------- | ------ | ----------------------------------------------------------------------------------------------------------------------------------- |
| `status`         | string | Status atual do pagamento (`authorized`, `authentication_requested, waiting_payment`, `refused`, `refunded`, `error`, `processing`) |
| `refusal_reason` | string | Motivo da recusa                                                                                                                    |
| `return_code`    | string | Código de autorização                                                                                                               |

### Status Possíveis

| Status                     | Descrição                    | Finalizado |
| -------------------------- | ---------------------------- | ---------- |
| `authorized`               | Autorizado (aguarda captura) |            |
| `authentication_requested` | Autenticação solicitada      |            |
| `waiting_payment`          | Aguardando pagamento         |            |
| `refused`                  | Recusado pelo banco          |            |
| `refunded`                 | Estornado                    |            |
| `error`                    | Erro                         |            |
| `processing`               | Sendo processado             |            |
