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

# Obter cupom

> Consulta um cupom pelo ID

Permissão: `coupon.read` (chave secreta).

## Endpoint

<CodeGroup>
  ```bash cURL theme={null}
  curl https://api.upag.dev/v1/coupons/a3c4d5e6-7f80-4912-8abc-0d1e2f3a4b5c \
    -H "Authorization: Bearer sk_test_your_api_key"
  ```

  ```javascript Node.js SDK theme={null}
  import { Upag } from 'upag';

  const upag = new Upag('sk_test_your_api_key');

  const coupon = await upag.coupons.retrieve('a3c4d5e6-7f80-4912-8abc-0d1e2f3a4b5c');
  ```
</CodeGroup>

<Note>
  Em produção use `https://api.upag.io/v1` com `sk_live_...`.
</Note>

## Parâmetros

<ParamField path="couponId" type="string (uuid)" required>
  ID do cupom.
</ParamField>

## Resposta

`200 OK`

```json Response theme={null}
{
  "id": "a3c4d5e6-7f80-4912-8abc-0d1e2f3a4b5c",
  "name": "R$ 10 off",
  "description": null,
  "active": true,
  "type": "fixed",
  "code": "DEZ",
  "currency": "brl",
  "amountOff": 1000,
  "percentOff": null,
  "uses": 0,
  "maxUses": null,
  "appliesTo": "specific",
  "appliesToProducts": ["0b9c1f3e-6a4d-4c1e-9d55-3f1f6a7c2e10"],
  "expiresAt": null,
  "createdAt": "2026-03-18T11:10:00.000Z",
  "updatedAt": "2026-03-18T11:10:00.000Z"
}
```

`404` (`COUPON_NOT_FOUND`) se o cupom não existir ou pertencer a outra conta.


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