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

# Consultar Status do Pagamento

> Consulta o status atual de um pagamento pelo UUID público usando o endpoint GET /stores/{storeId}/payments/status/{uuid}.

## 📌 Endpoint

`GET /stores/{storeId}/payments/status/{uuid}`

Retorna o status atual de um pagamento específico da loja a partir do `uuid` público. Ideal para polling no checkout após gerar um PIX ou boleto.

***

## 🔐 Autenticação

* **Rota pública** (não exige `Authorization`).
* A loja vinculada ao `storeId` precisa estar com plano ativo.

***

## 🧾 Parâmetros de rota

| Parâmetro | Tipo | Obrigatório | Descrição |
| - | - | - | - |
| `storeId` | string | Sim | ID da loja |
| `uuid` | string (UUID) | Sim | UUID público do pagamento |

***

## ✅ Exemplo de requisição

```bash theme={null}
curl -X GET "https://api.cabrapi.com.br/v1/stores/STORE_ID/payments/status/PAYMENT_UUID"
```

***

## 📦 Resposta de sucesso (200)

```json theme={null}
{
	"code": "PAYMENT_STATUS",
	"payment": {
		"uuid": "56c4cc47-105d-4260-a938-7a4383028d2c",
		"status": "APPROVED"
	}
}
```

Valores possíveis para `payment.status`: `PENDING`, `APPROVED`, `REJECTED`, `CANCELLED`, `REFUNDED`, `CHARGED_BACK`, `EXPIRED`.

***

## ⚠️ Possíveis erros

* `400 INVALID_DATA` → `storeId` inválido ou `uuid` não é um UUID válido
* `401 UNAUTHENTICATED` → loja sem proprietário associado ou conexão indisponível
* `403 NO_ACTIVE_SUBSCRIPTION` → loja sem plano ativo ou plano expirado
* `404 STORE_NOT_FOUND` → loja não encontrada
* `404 PAYMENT_NOT_FOUND` → pagamento não encontrado nesta loja
* `429 RATE_LIMIT_EXCEEDED` → limite de requisições por minuto do plano excedido
* `503 SERVICE_UNAVAILABLE` → serviço temporariamente indisponível


## OpenAPI

````yaml GET /stores/{storeId}/payments/status/{uuid}
openapi: 3.1.0
info:
  title: caBRAPI
  version: 1.0.0
servers:
  - url: https://api.cabrapi.com.br/v1
security: []
paths:
  /stores/{storeId}/payments/status/{uuid}:
    get:
      tags:
        - Payments
      summary: Get payment status
      operationId: getPaymentStatus
      parameters:
        - $ref: '#/components/parameters/StoreId'
        - $ref: '#/components/parameters/UUID'
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  code:
                    example: PAYMENT_STATUS
                    type: string
                  payment:
                    properties:
                      status:
                        enum:
                          - PENDING
                          - APPROVED
                          - REJECTED
                          - CANCELLED
                          - REFUNDED
                          - CHARGED_BACK
                          - EXPIRED
                        example: APPROVED
                        type: string
                      uuid:
                        example: 550e8400-e29b-41d4-a716-446655440000
                        type: string
                    required:
                      - uuid
                      - status
                    type: object
                required:
                  - code
                  - payment
                type: object
          description: Payment status retrieved successfully.
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Invalid request (invalid UUID or invalid storeId).
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Unauthorized (missing store owner or unavailable database).
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Forbidden (NO_ACTIVE_SUBSCRIPTION).
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Payment or store not found.
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Rate limit exceeded.
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
          description: Service unavailable.
      security: []
components:
  parameters:
    StoreId:
      in: path
      name: storeId
      required: true
      schema:
        type: string
        minLength: 1
        maxLength: 50
    UUID:
      in: path
      name: uuid
      required: true
      schema:
        format: uuid
        type: string
  schemas:
    Error:
      properties:
        code:
          example: STORE_NOT_FOUND
          type: string
      required:
        - code
      type: object

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.