> 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_credit_card.md).

# Checkout de Novo Usuário (Cartão de Crédito)

## Checkout para acesso de novo usuário pagando em cartão de crédito

<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 o cartão de crédito como forma de pagamento.

#### 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. |

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

```
{
   "code":"",
   "data":{
      "id":978,
      "orderCode":"0000978172" // CÓDIGO DO PEDIDO
   },
   "publicToken":"TOKEN PÚBLICO DA VENDA",
   "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 do Corpo da Requisição.

```
{
    "uri": "u4_contador-indicador",
    "negotiationType": "23",
    "type": "V",
    "userData": {
        "document": "7187382837",
        "name": "João Diniz",
        "email": "example@exemple.com",
        "cellphone": "(62) 123123-123",
        "zipCode": "123123-23",
        "address": "Avenida T 14",
        "number": "1111",
        "neighborhood": "Setor A",
        "complement": "Apt 123",
        "city": "Goiânia",
        "state": "GO"
    },
    "cardData": {
        "holderName":"VISA MAGIC",
        "expirationMonth":"05",
        "expirationYear":"2021",
        "securityCode":"123",
        "cardNumber":"4539003871725497"
    },
    "items": [
        {
            "id": "9",
            "quantity": 1
        }
    ]
}
```
