---
title: "Pagamentos"
description: "Métodos de pagamento, histórico e rastreio."
---
<div class="lm-ref-kicker"><code>payments</code><span>namespace</span></div>

Métodos de pagamento, histórico e rastreio.

<div class="lm-ref-stats lm-ref-stats--compact">
  <div class="lm-ref-stat"><strong>7</strong><span>métodos</span></div>
  <div class="lm-ref-stat"><code>payments</code><span>namespace</span></div>
</div>

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

## `addMethod`

<div class="lm-endpoint"><span class="lm-http lm-http--post">POST</span><code>/user/payment-method/add</code></div>

Assinatura:

```ts
addMethod(body?: AddMethodBody, settings?: SdkSettings): Promise<AddMethodResponse>
```

### Body

| Nome | Tipo | Obrigatório |
|---|---|---|
| `captcha` | `string` | sim |
| `token` | `string` | sim |

### Tipos

```ts
type AddMethodBody = { "captcha": string; "token": string; };
type AddMethodResponse = null;
```

### Exemplo

```ts
const response = await sdk.payments.addMethod({ "captcha": "string", "token": "string" });
```

<a class="lm-playground-link" href="/docs/guias/playground/?namespace=payments&method=addMethod">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>

## `confirmMethod`

<div class="lm-endpoint"><span class="lm-http lm-http--post">POST</span><code>/user/payment-method/confirm</code></div>

Assinatura:

```ts
confirmMethod(body?: ConfirmMethodBody, settings?: SdkSettings): Promise<ConfirmMethodResponse>
```

### Body

| Nome | Tipo | Obrigatório |
|---|---|---|
| `captcha` | `string` | sim |
| `sessionId` | `string` | sim |

### Tipos

```ts
type ConfirmMethodBody = { "captcha": string; "sessionId": string; };
type ConfirmMethodResponse = { "cards": Array<{ "id": string; "lastDigits": string; "network": string; }>; };
```

### Exemplo

```ts
const response = await sdk.payments.confirmMethod({ "captcha": "string", "sessionId": "string" });
```

<a class="lm-playground-link" href="/docs/guias/playground/?namespace=payments&method=confirmMethod">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>

## `createMethodSession`

<div class="lm-endpoint"><span class="lm-http lm-http--post">POST</span><code>/user/payment-method/session</code></div>

Assinatura:

```ts
createMethodSession(settings?: SdkSettings): Promise<CreateMethodSessionResponse>
```

### Tipos

```ts
type CreateMethodSessionResponse = { "sessionId": string; "uuid": string; "endpoint": string; };
```

### Exemplo

```ts
const response = await sdk.payments.createMethodSession();
```

<a class="lm-playground-link" href="/docs/guias/playground/?namespace=payments&method=createMethodSession">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>

## `deleteMethod`

<div class="lm-endpoint"><span class="lm-http lm-http--delete">DELETE</span><code>/user/payment-method/:cardId</code></div>

Assinatura:

```ts
deleteMethod(cardId: string, settings?: SdkSettings): Promise<DeleteMethodResponse>
```

### Parâmetros de rota

| Nome | Tipo |
|---|---|
| `cardId` | `string` |

### Tipos

```ts
type DeleteMethodParams = { "cardId": string; };
type DeleteMethodResponse = null;
```

### Exemplo

```ts
const response = await sdk.payments.deleteMethod("string");
```

<a class="lm-playground-link" href="/docs/guias/playground/?namespace=payments&method=deleteMethod">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>

## `getShipping`

<div class="lm-endpoint"><span class="lm-http lm-http--get">GET</span><code>/user/payments/:uuid/shipping</code></div>

Assinatura:

```ts
getShipping(uuid: string, settings?: SdkSettings): Promise<GetShippingResponse>
```

### Parâmetros de rota

| Nome | Tipo |
|---|---|
| `uuid` | `string` |

### Tipos

```ts
type GetShippingParams = { "uuid": string; };
type GetShippingResponse = { "shipping": { "id": string; "paymentId": number; "shippingPrice": number; "provider": string; "providerServiceName": string | null; "status": "WAITING" | "LABEL_GENERATED" | "SHIPPED" | "EN_ROUTE" | "OUT_FOR_DELIVERY" | "DELIVERED" | "RETURNED" | "CANCELLED" | "EXPIRED" | "PAUSED" | "SUSPENDED"; "trackingCode": string | null; "labelUrl": string | null; "estimatedDeliveryDays": number | null; "logs": Array<{ "id": string; "type": "WAITING" | "LABEL_GENERATED" | "SHIPPED" | "EN_ROUTE" | "OUT_FOR_DELIVERY" | "DELIVERED" | "RETURNED" | "CANCELLED" | "EXPIRED" | "PAUSED" | "SUSPENDED"; "message": string; "createdAt": string; }>; "createdAt": string; "updatedAt": string; } | null; };
```

### Exemplo

```ts
const response = await sdk.payments.getShipping("string");
```

<a class="lm-playground-link" href="/docs/guias/playground/?namespace=payments&method=getShipping">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>

## `listHistory`

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

Assinatura:

```ts
listHistory(query?: ListHistoryQuery, settings?: SdkSettings): Promise<ListHistoryResponse>
```

### Query

| Nome | Tipo | Obrigatório |
|---|---|---|
| `page` | `number` | não |

### Tipos

```ts
type ListHistoryQuery = { "page"?: number; };
type ListHistoryResponse = Array<{ "id": number; "uuid": string; "value": number; "source": "APP" | "API" | "PHYSICAL" | "DESKTOP_WEB" | "MOBILE_WEB" | "TABLET_WEB" | "EMBED" | "LANDING_PAGE" | "WEBSITE" | "UNKNOWN" | "STUB" | "SUBSCRIPTION"; "status": "CREATED" | "PENDING" | "ANALYSIS" | "APPROVED" | "REFUSED" | "CANCELLED" | "REFUNDED" | "CHARGEDBACK"; "createdAt": string; }>;
```

### Exemplo

```ts
const response = await sdk.payments.listHistory();
```

<a class="lm-playground-link" href="/docs/guias/playground/?namespace=payments&method=listHistory">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>

## `listMethods`

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

Assinatura:

```ts
listMethods(settings?: SdkSettings): Promise<ListMethodsResponse>
```

### Tipos

```ts
type ListMethodsResponse = Array<{ "type": "PICPAY" | "PIX" | "CREDITS" | "POINTS" | "DIGITAL_WALLET"; "disabled"?: boolean; "rules"?: Array<{ "type": "condition"; "condition": Array<unknown>; "message"?: string; "hideIfNotMet"?: boolean; }>; } | { "type": "CARD"; "id": string; "expiration"?: string; "lastDigits": string; "issuer": string; "bankName"?: string; "securityCode"?: { "length": number; }; "rules"?: Array<{ "type": "condition"; "condition": Array<unknown>; "message"?: string; "hideIfNotMet"?: boolean; }>; }>;
```

### Exemplo

```ts
const response = await sdk.payments.listMethods();
```

<a class="lm-playground-link" href="/docs/guias/playground/?namespace=payments&method=listMethods">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>