Skip to main content
POST
/
api
/
v1
/
customer
/
checkouts
Create Checkout
curl --request POST \
  --url https://api.example.com/api/v1/customer/checkouts \
  --header 'Content-Type: application/json' \
  --data '
{
  "tickets": [
    {
      "tripItineraryId": "0197a813-0fb9-7d42-9c81-50c0f6d9ae5a",
      "seatId": "0197a813-0fb9-7d42-9c81-50c0f6d9ae5a",
      "passenger": {
        "name": "Mariana Costa",
        "document": "12345678909",
        "documentType": "CPF",
        "birthDate": "1992-04-18"
      },
      "isCustomer": true
    }
  ],
  "payment": {
    "method": "PIX",
    "paymentMethodId": "0197f700-1111-7a53-9d28-51f8f3c77d41"
  },
  "creditAmount": 1500,
  "promotionalCode": "PROMO10"
}
'
{
  "checkoutId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "code": "<string>",
  "amount": 123,
  "createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Query Parameters

fields
string

Comma-separated list of fields to include in the response. Supports dot notation.

Body

application/json

Checkout creation payload.

tickets
object[]
required

Tickets to purchase.

Minimum array length: 1
payment
object | null

External payment data. Optional when credit covers the full checkout.

creditAmount
integer

Amount of customer credit to use in cents.

Required range: x >= 0
Example:

1500

promotionalCode
string | null

Promotional code to validate in checkout.

Example:

"PROMO10"

Response

Created

Agrupador comercial de uma compra que pode gerar pedidos por empresa

checkoutId
string<uuid>
required

Identificador único

customerId
string<uuid>
required

Referência ao cliente comprador

code
string
required

Código legível único do checkout

amount
integer
required

Valor total do checkout em centavos

createdBy
string<uuid> | null
required

Usuário que criou o registro, quando aplicável

createdAt
string<date-time>
required

Data de criação

updatedBy
string<uuid> | null
required

Usuário que fez a última atualização, quando aplicável

updatedAt
string<date-time>
required

Data da última atualização