> 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/private/payment_checkout/user_checkout_card.md).

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

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

<mark style="color:green;">`POST`</mark> `https://api.gestao.plus/order`

Rota para criação de pedido em cartão de crédito.

#### Headers

| Name                                            | Type   | Description                             |
| ----------------------------------------------- | ------ | --------------------------------------- |
| Origin<mark style="color:red;">\*</mark>        | string | URL de origem da requisição             |
| Authorization<mark style="color:red;">\*</mark> | string | Access Token no modelo "Bearer {token}" |

#### Request Body

| Name                                              | Type   | Description                                                                                                                                                                                                                                   |
| ------------------------------------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| items<mark style="color:red;">\*</mark>           | string | Lista contendo objetos com ID e quantidade de cada produto comprado.                                                                                                                                                                          |
| cardData<mark style="color:red;">\*</mark>        | string | <p>Informações do cartão de crédito, um objeto<br>contendo, holderName (bandeira do cartão),<br>expirationMonth (mês de expiração), expirationYear (ano de expiração), securityCode (código de segurança), cardNumber (número do cartão).</p> |
| type<mark style="color:red;">\*</mark>            | string | Tipo do pedido, geralmente "V" de venda                                                                                                                                                                                                       |
| negotiationType<mark style="color:red;">\*</mark> | string | ID do tipo de negociação utilizado para o pedido                                                                                                                                                                                              |
| uri<mark style="color:red;">\*</mark>             | string | Identificador do cliente                                                                                                                                                                                                                      |

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

```
{
   "code":"",
   "data":{
      "id":968,
      "orderCode":"0000968179" // Numero do pedido
   },
   "publicToken":"TOKEN PÚBLICO",
   "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
   "title":"ok",
   "status":200,
   "detail":"Order created"
}
```

{% endtab %}

{% tab title="400 " %}

```
{
    "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
    "title": "Bad Request",
    "status": 400,
    "detail": "Invalid negotiation type for this scope"
}
```

{% endtab %}
{% endtabs %}

### Exemplo do corpo da requisição:

```
{
    "uri": "u4_contador-indicador",
    "negotiationType": "23",
    "type": "V",
    "cardData": {
        "holderName":"VISA MAGIC",
        "expirationMonth":"05",
        "expirationYear":"2021",
        "securityCode":"123",
        "cardNumber":"4929710426637678"
    },
    "items": [
        {
            "id": "9",
            "quantity": 1
        }
    ]
}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.gestao.plus/api/private/payment_checkout/user_checkout_card.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
