Skip to content
Navigation

Submit, confirm or renew a checkout

POST
https://api.nicer.travel/commerce/orders/{orderId}/checkout-actions

The pay page's checkout actions on one order. The caller is whoever holds the order's payment link (its token as Authorization: PaymentLink <token> or X-Payment-Link-Token), a checkout session made from that link, or a signed-in person with access to the order; a link that expired without being revoked may still renew, within 24 hours of its end. SUBMIT_CHECKOUT commits the travelers and the accepted terms, and starts a flight's hold or a booking that needs no payment. CONFIRM_NICER_PAYMENT reports that a payment attempt of the order finished: an authorized or succeeded one sends the order on to be booked. Neither charges a card: POST /commerce/orders/{orderId}/payments does. RENEW_CHECKOUT renews expired payment access: an unpaid checkout is priced again into a successor order, and a held flight is verified with the provider and keeps the same order, reservation and payment deadline. EXCHANGE_CHECKOUT_SESSION trades the one-time code of a link its creator made for themselves for a checkout session in that person's name. Order management (payment links, cancellation) is not accepted here: it is POST /commerce/orders/{orderId}/actions. Requires an Idempotency-Key; at most 30 calls a minute from one address.

Authorization

  • bearerAuth
    optional
    HTTP Bearer (JWT)

    Authorization: Bearer <token>

Path parameters

  • orderId
    string
    required

Header parameters

  • Idempotency-Key
    string
    required

    Unique key (8–255 chars) per request; replays return the original result.

Request body JSON required

One of the following:

  • object
    • type
      string
      required
    • code
      string
      required
      pattern: ^[A-Za-z0-9_-]{43}$
  • object
    • type
      string
      required
  • object
    • acceptedTermsDigest
      string
      required
      pattern: ^sha256:[a-f0-9]{64}$
    • participants
      array of
      object
      required
      • address
        required

        The person's postal address; null when unknown.

        Any of the following:

        • PersonAddress
        • null
      • birthDate
        required

        The person's date of birth, YYYY-MM-DD; null when unknown.

        Any of the following:

        • string
        • null
      • contact
        object
        required

        How to reach the person.

        • email
          required

          Any of the following:

          • string
          • null
        • phone
          required

          Any of the following:

          • E164Phone
          • null
      • documents
        array of
        object
        required

        The person's travel documents (passport, visa, national ID), up to 12; empty when there are none.

        • expirationDate
          required

          The day the document expires, YYYY-MM-DD; null for one that does not.

          Any of the following:

          • string
          • null
        • issuingCountryCode
          required

          The country that issued the document, as an ISO 3166-1 alpha-2 country code; null when unknown.

          Any of the following:

          • CountryCode
          • null
        • kind
          string
          ·
          one of 7 values
          required

          What the document is.

          Allowed values: DRIVER_LICENSE, KNOWN_TRAVELER_NUMBER, NATIONAL_ID, PASSPORT, REDRESS_NUMBER, RESIDENCE_PERMIT, VISA
        • number
          string
          required

          The document's number, in full, 1 to 100 characters.

          maxLength: 100 · minLength: 1
        • citizenshipCountry
          optional

          The citizenship stated on this document, as an ISO 3166-1 alpha-2 country code; it is not always the person's nationality. Null or absent when the document states none.

          Any of the following:

          • CountryCode
          • null
        • issueDate
          optional

          The day the document was issued, YYYY-MM-DD; null or absent when unknown.

          Any of the following:

          • string
          • null
        • placeOfBirth
          optional

          The place of birth printed on the document; null or absent when unknown.

          Any of the following:

          • string
          • null
        • placeOfIssue
          optional

          Where the document was issued; null or absent when unknown.

          Any of the following:

          • string
          • null
      • name
        object
        required

        The person's legal name, as printed on their travel document.

        • familyName
          string
          required
          maxLength: 100 · minLength: 1
        • givenName
          string
          required
          maxLength: 100 · minLength: 1
        • middleName
          required

          Any of the following:

          • string
          • null
      • nationalityCountryCode
        required

        The person's nationality, as an ISO 3166-1 alpha-2 country code; null when unknown.

        Any of the following:

        • CountryCode
        • null
      • participantId
        string
        required

        An id you make up for this participant, such as P1, unique among the participants of the order.

        minLength: 1
      • sex
        required

        The sex marker printed on the person's travel document; null when unknown.

        Any of the following:

        • ParticipantSex
        • null
      • hotelMembership
        optional

        The person's membership number with the hotel chain (chainCode), for a hotel booking; null or left out when there is none.

        Any of the following:

        • HotelMembership
        • null
      • frequentFlyerPrograms
        optional
        array of
        object

        The person's airline loyalty memberships, up to 8, sent with a flight booking.

        • airlineIataCode
          string
          required
          pattern: ^[A-Z0-9]{2,3}$
        • memberNumber
          string
          required
          maxLength: 100 · minLength: 1
      • travelerId
        optional
        string

        The CRM traveler this participant was filled from, as GET /crm/trips/{travelersTripId} answers it. Leave it out when the details were typed in.

        minLength: 1
    • type
      string
      required
    • airPlanningFeeMinor
      optional
      integer

      Air planning fee in USD cents for the whole reservation.

      maximum: 100000000
    • paymentTermsKind
      optional
      HOLD
      or
      PAY_NOW

      HOLD requires a confirmed airline deadline at least 12 hours away and gives the customer half the remaining window to pay. PAY_NOW books with the card sent next. Omitted means HOLD where allowed. An unsupported hold answers 409 COMMERCE_HOLD_NOT_ALLOWED; a window that no longer qualifies answers 409 COMMERCE_HOLD_WINDOW_UNAVAILABLE.

    • specialRequest
      optional
      default: null

      Any of the following:

      • string
      • null
    • notifyTravelers
      optional
      boolean

      False sends this order's emails (its booking confirmation and its hold, declined-payment, ticketing and cancellation notices) to its advisor alone, never to its travelers or payer. The payer still gets the receipt of a card payment, and sendOrderConfirmation still reaches the addresses it names. Omitted means true.

    • validatingCarrier
      optional
      string

      The airline that issues a flight's ticket, one of productSnapshot.validatingCarriers. The default (the first) or an absent choice leaves issuance to the provider. The choice is the agency's: only an advisor or staff caller, or the agency's own payment link, may send a code; a traveler or a traveler link answers 403 COMMERCE_VALIDATING_CARRIER_ADVISOR_ONLY, and a code the fare does not offer answers 409 COMMERCE_VALIDATING_CARRIER_NOT_OFFERED.

      pattern: ^[A-Z0-9]{2,3}$
  • object
    • paymentAttemptId
      string
      required
      minLength: 1
    • type
      string
      required

Returns

200

OK

JSON
  • expiresAt
    required

    Any of the following:

    • string
    • null
  • orderId
    string
    required
    minLength: 1
  • orderStatus
    string
    ·
    one of 12 values
    required
    Allowed values: DRAFT, AWAITING_PAYMENT, HOLDING, HELD, PAYMENT_PROCESSING, TICKETING, BOOKED, CANCELLATION_PROCESSING, CANCELLED, EXPIRED, NEEDS_ATTENTION, FAILED
  • paymentUrl
    required

    Any of the following:

    • string
    • null
  • status
    ACCEPTED
    or
    COMPLETED
    required
  • type
    string
    ·
    one of 7 values
    required
    Allowed values: EXCHANGE_CHECKOUT_SESSION, RENEW_CHECKOUT, SUBMIT_CHECKOUT, CREATE_PAYMENT_LINK, CONFIRM_NICER_PAYMENT, CANCEL, REVOKE_PAYMENT_LINK
  • checkoutSession
    optional
    object
    • token
      string
      required
      minLength: 1
    • expiresAt
      string
      required
      format: date-time · pattern: ^(?:(?:\d\d[2468][048]|\d\d[13579][26]|\d\d0[48]|[02468][048]00|[13579][26]00)-02-29|\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\d|30)|(?:02)-(?:0[1-9]|1\d|2[0-8])))T(?:(?:[01]\d|2[0-3]):[0-5]\d(?::[0-5]\d(?:\.\d+)?)?(?:Z))$

400

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

401

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

403

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

429

Request failed. errorCode is stable; errorMessage is for humans.
JSON
  • errorCode
    string
    required
  • errorMessage
    string
    required

Type to search…

↑↓ navigate↵ selectEsc close