---
title: "Cobrança"
description: "Tentativas de cobrança e status de pagamento."
---
<div class="lm-ref-kicker"><code>billing</code><span>namespace</span></div>

Tentativas de cobrança e status de pagamento.

<div class="lm-ref-stats lm-ref-stats--compact">
  <div class="lm-ref-stat"><strong>1</strong><span>método</span></div>
  <div class="lm-ref-stat"><code>billing</code><span>namespace</span></div>
</div>

> Esta página é gerada automaticamente pelo `@luckymaker/sdk-generator`. Não edite manualmente.

## `listAttempts`

<div class="lm-endpoint"><span class="lm-http lm-http--get">GET</span><code>/user/billingAttempts</code></div>

Assinatura:

```ts
listAttempts(query?: ListAttemptsQuery, settings?: SdkSettings): Promise<ListAttemptsResponse>
```

### Query

| Nome | Tipo | Obrigatório |
|---|---|---|
| `page` | `number` | não |
| `perPage` | `number` | não |
| `resourceType` | `"SUBSCRIPTION"` | não |
| `status` | `"PENDING" \| "SUCCESS" \| "FAILED"` | não |

### Tipos

```ts
type ListAttemptsQuery = { "page"?: number; "perPage"?: number; "resourceType"?: "SUBSCRIPTION"; "status"?: "PENDING" | "SUCCESS" | "FAILED"; };
type ListAttemptsResponse = Array<{ "id": string; "status": string; "value": number; "paymentMethod": "CARD" | "PICPAY" | "PIX" | "CREDITS" | "API" | "POINTS" | "DIGITAL_WALLET"; "resource": { "label": string; }; "payment": { "uuid": string; "status": string; } | null; "createdAt": string; }>;
```

### Exemplo

```ts
const response = await sdk.billing.listAttempts();
```

<a class="lm-playground-link" href="/docs/guias/playground/?namespace=billing&method=listAttempts">Testar esta função no playground <svg class="lm-arrow-icon" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true"><path d="M5 12h14"/><path d="m12 5 7 7-7 7"/></svg></a>