---
title: "Pedidos"
description: "Criação, autenticação e acompanhamento de pedidos."
---
<div class="lm-ref-kicker"><code>orders</code><span>namespace</span></div>

Criação, autenticação e acompanhamento de pedidos.

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

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

## `completeRegistrationPending`

<div class="lm-endpoint"><span class="lm-http lm-http--put">PUT</span><code>/orders/:payment/registration/pending</code></div>

Assinatura:

```ts
completeRegistrationPending(payment: string, body?: CompleteRegistrationPendingBody, settings?: SdkSettings): Promise<CompleteRegistrationPendingResponse>
```

### Parâmetros de rota

| Nome | Tipo |
|---|---|
| `payment` | `string` |

### Body

| Nome | Tipo | Obrigatório |
|---|---|---|
| `cpf` | `string` | sim |
| `formId` | `string` | não |

### Tipos

```ts
type CompleteRegistrationPendingParams = { "payment": string; };
type CompleteRegistrationPendingBody = { "cpf": string; "formId"?: string; [key: string]: unknown; };
type CompleteRegistrationPendingResponse = { "token": string; };
```

### Exemplo

```ts
const response = await sdk.orders.completeRegistrationPending("string", { "cpf": "string" });
```

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

## `createAuthentication`

<div class="lm-endpoint"><span class="lm-http lm-http--post">POST</span><code>/orders/:payment/authentication</code></div>

Assinatura:

```ts
createAuthentication(payment: string, body?: CreateAuthenticationBody, settings?: SdkSettings): Promise<CreateAuthenticationResponse>
```

### Parâmetros de rota

| Nome | Tipo |
|---|---|
| `payment` | `string` |

### Body

| Nome | Tipo | Obrigatório |
|---|---|---|
| `clientSecret` | `string` | sim |

### Tipos

```ts
type CreateAuthenticationParams = { "payment": string; };
type CreateAuthenticationBody = { "clientSecret": string; };
type CreateAuthenticationResponse = { "status": "CREATED" | "PENDING" | "ANALYSIS" | "APPROVED" | "REFUSED" | "CANCELLED" | "REFUNDED" | "CHARGEDBACK"; "requiresAction": boolean; };
```

### Exemplo

```ts
const response = await sdk.orders.createAuthentication("string", { "clientSecret": "string" });
```

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

## `createBond`

<div class="lm-endpoint"><span class="lm-http lm-http--post">POST</span><code>/orders/:payment/bonds</code></div>

Assinatura:

```ts
createBond(payment: string, body?: CreateBondBody, settings?: SdkSettings<CreateBondQuery>): Promise<CreateBondResponse>
```

### Parâmetros de rota

| Nome | Tipo |
|---|---|
| `payment` | `string` |

### Query

| Nome | Tipo | Obrigatório |
|---|---|---|
| `limit` | `number` | não |
| `raffleUUID` | `string` | não |
| `offset` | `number` | não |

### Body

| Nome | Tipo | Obrigatório |
|---|---|---|
| `cpf` | `string` | não |
| `token` | `string` | não |

### Tipos

```ts
type CreateBondParams = { "payment": string; };
type CreateBondQuery = { "limit"?: number; "raffleUUID"?: string; "offset"?: number; };
type CreateBondBody = { "cpf"?: string; "token"?: string; };
type CreateBondResponse = { "groups": Array<{ "raffle": { "uuid": string; }; "totalCount": number; "bonds": Array<{ "luckyNumber": string; }>; "tickets"?: Array<{ "luckyNumber": string; "chances": Array<{ "number": string; "numbers": Array<string>; }>; }>; }>; };
```

### Exemplo

```ts
const response = await sdk.orders.createBond("string", { "cpf": "string", "token": "string" });
```

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

## `createCertificate`

<div class="lm-endpoint"><span class="lm-http lm-http--post">POST</span><code>/orders/:payment/certificates</code></div>

Assinatura:

```ts
createCertificate(payment: string, body?: CreateCertificateBody, settings?: SdkSettings<CreateCertificateQuery>): Promise<CreateCertificateResponse>
```

### Parâmetros de rota

| Nome | Tipo |
|---|---|
| `payment` | `string` |

### Query

| Nome | Tipo | Obrigatório |
|---|---|---|
| `simplified` | `boolean` | não |
| `includeTickets` | `boolean` | não |

### Body

| Nome | Tipo | Obrigatório |
|---|---|---|
| `confirmationCPF` | `string` | sim |

### Tipos

```ts
type CreateCertificateParams = { "payment": string; };
type CreateCertificateQuery = { "simplified"?: boolean; "includeTickets"?: boolean; };
type CreateCertificateBody = { "confirmationCPF": string; };
type CreateCertificateResponse = { "user": { "name": string; "cpf": string; "city": null | string; "state": null | string; }; "bonds": Array<{ "raffle": string; "luckyNumber": string; "matrixNumbers"?: Array<number>; }>; };
```

### Exemplo

```ts
const response = await sdk.orders.createCertificate("string", { "confirmationCPF": "string" });
```

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

## `createOrder`

<div class="lm-endpoint"><span class="lm-http lm-http--post">POST</span><code>/orders/:payment</code></div>

Assinatura:

```ts
createOrder(payment: string, body?: CreateOrderBody, settings?: SdkSettings<CreateOrderQuery>): Promise<CreateOrderResponse>
```

### Parâmetros de rota

| Nome | Tipo |
|---|---|
| `payment` | `string` |

### Query

| Nome | Tipo | Obrigatório |
|---|---|---|
| `simplified` | `boolean` | não |
| `includeTickets` | `boolean` | não |

### Body

| Nome | Tipo | Obrigatório |
|---|---|---|
| `cpf` | `string` | não |
| `token` | `string` | não |

### Tipos

```ts
type CreateOrderParams = { "payment": string; };
type CreateOrderQuery = { "simplified"?: boolean; "includeTickets"?: boolean; };
type CreateOrderBody = { "cpf"?: string; "token"?: string; };
type CreateOrderResponse = { "id": number; "uuid": string; "method": unknown; "methods": Array<"CARD" | "PICPAY" | "PIX" | "CREDITS" | "API" | "POINTS" | "DIGITAL_WALLET">; "value": number; "originalValue"?: number; "pointsValue"?: 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"; "expiresAt"?: string; "canChangPaymentMethod": boolean; "authorizationOnly"?: boolean; "instantPrizesWon"?: number; "appliedOffers"?: Array<unknown>; "unlockedOffers"?: Array<unknown>; "bonds"?: { "count": number; }; "data": { "involvedRaffles"?: Record<string, unknown>; "statusMessage"?: string; "user"?: { "name": string; "cpf"?: string; "needNewPassword"?: boolean; }; "reseller"?: { "name": string; }; }; "payer"?: { "id": number; "name": string; "document": string; "email": string; "phone"?: string; "address": { "streetName": string; "number"?: string; "complement"?: string; "neighborhood": string; "city": string; "state": string; "cep": string; }; }; "blocks"?: unknown; "items": unknown; "instructions"?: { "code": string; } | { "url": string; } | { "clientSecret": string; }; "createdAt": string; "updatedAt": string; "token"?: string; "links"?: { "self": string; }; "subscriptionAuthorization"?: { "planName": string; "recurringValue": number; "billingLabel": string; "firstChargeAt"?: string; }; "externalServices"?: Array<{ "name": string; "data"?: Record<string, unknown>; }>; };
```

### Exemplo

```ts
const response = await sdk.orders.createOrder("string", { "cpf": "string", "token": "string" });
```

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

## `createRegistrationPending`

<div class="lm-endpoint"><span class="lm-http lm-http--post">POST</span><code>/orders/:payment/registration/pending</code></div>

Assinatura:

```ts
createRegistrationPending(payment: string, body?: CreateRegistrationPendingBody, settings?: SdkSettings): Promise<CreateRegistrationPendingResponse>
```

### Parâmetros de rota

| Nome | Tipo |
|---|---|
| `payment` | `string` |

### Body

| Nome | Tipo | Obrigatório |
|---|---|---|
| `cpf` | `string` | sim |

### Tipos

```ts
type CreateRegistrationPendingParams = { "payment": string; };
type CreateRegistrationPendingBody = { "cpf": string; };
type CreateRegistrationPendingResponse = { "form": { [key: string]: unknown; } | null; };
```

### Exemplo

```ts
const response = await sdk.orders.createRegistrationPending("string", { "cpf": "string" });
```

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

## `getBonds`

<div class="lm-endpoint"><span class="lm-http lm-http--get">GET</span><code>/orders/:payment/bonds</code></div>

Assinatura:

```ts
getBonds(payment: string, query?: GetBondsQuery, settings?: SdkSettings): Promise<GetBondsResponse>
```

### Parâmetros de rota

| Nome | Tipo |
|---|---|
| `payment` | `string` |

### Query

| Nome | Tipo | Obrigatório |
|---|---|---|
| `limit` | `number` | não |
| `raffleUUID` | `string` | não |
| `offset` | `number` | não |

### Tipos

```ts
type GetBondsParams = { "payment": string; };
type GetBondsQuery = { "limit"?: number; "raffleUUID"?: string; "offset"?: number; };
type GetBondsResponse = { "groups": Array<{ "raffle": { "uuid": string; }; "totalCount": number; "bonds": Array<{ "luckyNumber": string; }>; "tickets"?: Array<{ "luckyNumber": string; "chances": Array<{ "number": string; "numbers": Array<string>; }>; }>; }>; };
```

### Exemplo

```ts
const response = await sdk.orders.getBonds("string");
```

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

## `getOrder`

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

Assinatura:

```ts
getOrder(payment: string, query?: GetOrderQuery, settings?: SdkSettings): Promise<GetOrderResponse>
```

### Parâmetros de rota

| Nome | Tipo |
|---|---|
| `payment` | `string` |

### Query

| Nome | Tipo | Obrigatório |
|---|---|---|
| `simplified` | `boolean` | não |
| `includeTickets` | `boolean` | não |

### Tipos

```ts
type GetOrderParams = { "payment": string; };
type GetOrderQuery = { "simplified"?: boolean; "includeTickets"?: boolean; };
type GetOrderResponse = { "id": number; "uuid": string; "method": unknown; "methods": Array<"CARD" | "PICPAY" | "PIX" | "CREDITS" | "API" | "POINTS" | "DIGITAL_WALLET">; "value": number; "originalValue"?: number; "pointsValue"?: 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"; "expiresAt"?: string; "canChangPaymentMethod": boolean; "authorizationOnly"?: boolean; "instantPrizesWon"?: number; "appliedOffers"?: Array<unknown>; "unlockedOffers"?: Array<unknown>; "bonds"?: { "count": number; }; "data": { "involvedRaffles"?: Record<string, unknown>; "statusMessage"?: string; "user"?: { "name": string; "cpf"?: string; "needNewPassword"?: boolean; }; "reseller"?: { "name": string; }; }; "payer"?: { "id": number; "name": string; "document": string; "email": string; "phone"?: string; "address": { "streetName": string; "number"?: string; "complement"?: string; "neighborhood": string; "city": string; "state": string; "cep": string; }; }; "blocks"?: unknown; "items": unknown; "instructions"?: { "code": string; } | { "url": string; } | { "clientSecret": string; }; "createdAt": string; "updatedAt": string; "token"?: string; "links"?: { "self": string; }; "subscriptionAuthorization"?: { "planName": string; "recurringValue": number; "billingLabel": string; "firstChargeAt"?: string; }; "externalServices"?: Array<{ "name": string; "data"?: Record<string, unknown>; }>; };
```

### Exemplo

```ts
const response = await sdk.orders.getOrder("string");
```

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