> 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/checkout_credit_card.md).

# Checkout (Cartão de Crédito)

## Checkout de pagamento para cartão de crédito

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

Com este endpoint o cliente pode realizar o pagamento através do link de pagamento.

#### Query Parameters

| Name                                | Type   | Description                 |
| ----------------------------------- | ------ | --------------------------- |
| t<mark style="color:red;">\*</mark> | string | Token de 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                                                                                                                                                                                                |
| ------------------------------------------ | ------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| cardData<mark style="color:red;">\*</mark> | string | Um objeto contendo os dados do cartão, seu nome "holderName", o mês de expiração "expirationMonth", ano de expiração "expirationYear", código de segurança "securityCode" e número do cartão "cardNumber". |

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

```
{
   "data":[
   ],
   "code":"",
   "publicToken":"TOKEN PÚBLICO DA VENDA",
   "type":"http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
   "title":"Unknown",
   "status":200,
   "detail":"ok"
}
```

{% endtab %}

{% tab title="400 " %}

```
{
    "type": "http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html",
    "title": "Bad Request",
    "status": 400,
    "detail": "Fail to start checkout, payment cannot executed when status = 'CONCLUIDO'"
}
```

{% endtab %}
{% endtabs %}

### Exemplo de Corpo da Requisição

```
{
   "cardData":{
      "holderName":"João Diniz",
      "expirationMonth":"5",
      "expirationYear":"2021",
      "securityCode":"123",
      "cardNumber":"4539 0033 7072 5497"
   }
}
```
