> For the complete documentation index, see [llms.txt](https://docs.gestao.plus/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.gestao.plus/api/public/payment_checkout/new_user_checkout_bill.md).

# Checkout de Novo Usuário (Boleto)

## Checkout de novo usuário (boleto)

<mark style="color:green;">`POST`</mark> `https://api.gestao.plus/order?t={token}`

Esta rota permite que um novo usuário acesse o checkout com a forma de pagamento em boleto.

#### Query Parameters

| Name                                | Type   | Description                   |
| ----------------------------------- | ------ | ----------------------------- |
| t<mark style="color:red;">\*</mark> | string | Token para acesso ao checkout |

#### Headers

| Name                                     | Type   | Description                 |
| ---------------------------------------- | ------ | --------------------------- |
| Origin<mark style="color:red;">\*</mark> | string | URL de origem da requisição |

#### Request Body

| Name                                              | Type   | Description                                            |
| ------------------------------------------------- | ------ | ------------------------------------------------------ |
| items<mark style="color:red;">\*</mark>           | string | Lista contendo os produtos comprados, cada um com      |
| userData<mark style="color:red;">\*</mark>        | string | Objeto contendo informações do usuário                 |
| type<mark style="color:red;">\*</mark>            | string | Tipo do pedido, neste caso "V" de venda                |
| negotiationType<mark style="color:red;">\*</mark> | string | ID da forma de pagamento escolhida (boleto, cartão...) |

{% tabs %}
{% tab title="200 " %}

```
{
   "code":"",
   "data":{
      "id":975, // ID DA VENDA
      "orderCode":"000097XYZ8" // CODIGO DA VENDA
   },
   "publicToken":"TOKEN PUBLICO DO PEDIDO",
   "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
   "title":"ok",
   "status":200,
   "detail":"Order created"
}
```

{% endtab %}

{% tab title="403 " %}

```
{
    "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
    "title": "Forbidden",
    "status": 403,
    "detail": "Forbidden (Invalid token)"
}
```

{% endtab %}
{% endtabs %}

### Exemplo de Corpo da Requisição:

```
{
    "negotiationType": "20",
    "type": "V",
    "userData": {
        "document": "123123123",
        "name": "João Diniz",
        "email": "example@example.com",
        "cellphone": "(62) 00000-0000",
        "zipCode": "12312-130",
        "address": "Avenida T 2",
        "number": "322",
        "neighborhood": "Setor A",
        "complement": "Apt 123123",
        "city": "Goiânia",
        "state": "GO"
    },
    "items": [
        {
            "id": "9",
            "quantity": 1
        }
    ]
}
```
