Skip to main content
POST
/
api
/
v1
/
driver
/
checkout-sessions
/
{checkoutSessionId}
/
cancel
Cancel Checkout Session
curl --request POST \
  --url https://api.example.com/api/v1/driver/checkout-sessions/{checkoutSessionId}/cancel \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "reason": "<string>"
}
'
{
  "checkoutSessionId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "tripId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "expiresAt": "2023-11-07T05:31:56Z",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z",
  "tripItineraryId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "seatId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "qrToken": "<string>",
  "passengerDraft": {
    "name": "Mariana Costa",
    "document": "12345678909",
    "documentType": "CPF",
    "birthDate": "1992-04-18"
  },
  "requestedCreditAmount": 1,
  "promotionalCode": "<string>",
  "linkedAt": "2023-11-07T05:31:56Z",
  "preparedAt": "2023-11-07T05:31:56Z",
  "confirmedAt": "2023-11-07T05:31:56Z",
  "canceledBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "canceledAt": "2023-11-07T05:31:56Z",
  "createdBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "updatedBy": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}

Authorizations

Authorization
string
header
required

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

Path Parameters

checkoutSessionId
string<uuid>
required

Checkout session identifier.

Query Parameters

fields
string

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

Body

application/json

Cancel checkout session payload.

reason
string | null

Cancellation reason.

Response

OK

Checkout session linked by the customer app through a QR token.

checkoutSessionId
string<uuid>
required

Checkout session identifier.

tripId
string<uuid>
required

Trip selected for this session.

paymentMethod
enum<string>
required

Payment method selected for this checkout.

Available options:
CASH,
CREDIT_GRANT
status
enum<string>
required

Computed session status derived from timestamps.

Available options:
CREATED,
LINKED,
PREPARED,
CONFIRMED,
EXPIRED,
CANCELED
expiresAt
string<date-time>
required

QR token expiration date.

createdAt
string<date-time>
required

Creation date.

updatedAt
string<date-time>
required

Last update date.

tripItineraryId
string<uuid> | null

Trip itinerary selected by the customer during preparation.

seatId
string<uuid> | null

Seat selected by the customer during preparation.

qrToken
string | null

Raw QR token. Returned only when creating an active session; never persisted in plain text.

passengerDraft
object | null

Passenger draft prepared by the customer before Passenger creation.

requestedCreditAmount
integer | null

Credit amount requested by the customer for this session.

Required range: x >= 0
promotionalCode
string | null

Promotional code requested by the customer, when applicable.

linkedAt
string<date-time> | null

Date when the customer linked the session.

preparedAt
string<date-time> | null

Date when the customer prepared ticket context.

confirmedAt
string<date-time> | null

Date when checkout was confirmed.

canceledBy
string<uuid> | null

User that canceled the session, when applicable.

canceledAt
string<date-time> | null

Date when the session was canceled.

createdBy
string<uuid> | null

User that created the session.

updatedBy
string<uuid> | null

User that last updated the session.