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

# paymentDiscounts.list

> Método do SDK — lista descontos por método de pagamento no checkout.

`storefront.paymentDiscounts.list(options)` retorna descontos por **método de pagamento** (PIX, boleto, cartão, etc.).

Tipo retornado: [Desconto de pagamento](https://docs-loja.usecorvex.com.br/data/resources/payment-discount.md).

***

## Parâmetros

| Campo | Tipo | Descrição |
| - | - | - |
| `productIds` | `string[]` | Produtos no contexto |
| `cep` | `string` | CEP |
| `state` | `string` | UF |
| `subtotal` | `number` | Subtotal do carrinho |

***

## Retorno

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
Connection<PaymentDiscount>
```

Apenas entradas `enabled: true`.

***

## Exemplo — badge PIX na PDP

```js theme={"theme":{"light":"github-light","dark":"github-dark"}}
export const schema = defineSection({
  name: 'Desconto PIX',
  enabledOn: ['product'],
  data: ['payment_discounts'],
});

export const data = defineSectionData(async ({ storefront, page }) => ({
  payment_discounts: await storefront.paymentDiscounts.list({
    subtotal: page.product?.price?.amount,
  }),
}));

export default function PixBadge({ data }) {
  const pix = data.payment_discounts.nodes.find((entry) => entry.method === 'PIX');
  if (!pix) return null;

  return <span>PIX: {pix.amount}</span>;
}
```

***

## Hook

```jsx theme={"theme":{"light":"github-light","dark":"github-dark"}}
const { data: payment_discounts } = useCorvexData('payment_discounts', {
  subtotal: cartTotal,
});
```

***

## Declaração schema.data

```js theme={"theme":{"light":"github-light","dark":"github-dark"}}
data: ['payment_discounts']
```

Veja [Mapa de dados](https://docs-loja.usecorvex.com.br/data/scope-data-map.md).


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