Skip to main content
POST
/
api
/
v1
/
customer
/
checkouts
/
qr
Create Checkout QR
curl --request POST \
  --url https://api.example.com/api/v1/customer/checkouts/qr \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "qrToken": "<string>",
  "ticket": {
    "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
  },
  "creditAmount": 1,
  "promotionalCode": "<string>"
}
'
{
  "checkoutId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "customerId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "code": "<string>",
  "baseAmount": 123,
  "discountAmount": 123,
  "creditAmount": 123,
  "paidAmount": 123,
  "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"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

fields
string

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

Body

application/json

Create checkout QR payload.

qrToken
string
required

QR code token.

ticket
object
required

Ticket requested in checkout.

creditAmount
integer | null

Credit amount to use in cents.

Required range: x >= 0
promotionalCode
string | null

Promotional code.

Response

Created

Agrupador comercial de uma compra que pode gerar pedidos por cooperativa

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

baseAmount
integer
required

Soma bruta dos Orders antes de descontos e crédito

discountAmount
integer
required

Soma de benefícios e promoções dos Orders

creditAmount
integer
required

Crédito corporativo usado no checkout

paidAmount
integer
required

Valor cobrado por meio externo

amount
integer
required

Valor final comercial do checkout após descontos, antes do crédito

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