Skip to content
Navigation

Submit checkout or create a payment link

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

Runs an authenticated order action. Requires a verified user session, access to the order and an Idempotency-Key. Payment links cannot create links or cancel reservations. Access covers the agency's admins, its advisors on orders they take part in, Nicer staff, and the order's travelers (payer, participants and the trip's people). Travelers may submit checkout, make links, renew, cancel an unpaid order and release a hold; cancelling a booked reservation is refused to them with 403 ERROR_DO_NOT_HAVE_PERMISSION, because it is cancelled with the supplier and refunded. A link meant for another person is made with audience TRAVELER: a SELF link signs whoever opens it in the first minute into the pay page as its creator. RENEW_CHECKOUT reprices an unpaid checkout past its window into a successor order and returns its payment link.

Authorization

  • bearerAuth
    HTTP Bearer (JWT)
    required

    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
    • type
      string
      required
    • audience
      optional
      SELF
      or
      TRAVELER
      default: "TRAVELER"
    • expiresInMinutes
      optional
      integer

      Can only shorten the link, never lengthen it. A booking's link ends at most 15 minutes from now and, for an order not yet held, 10 minutes after the order was created, because its price holds only that long; past it, the same link still opens for 24 hours and the traveler renews the checkout there at the current price. A planning fee's or an extra payment's link holds no price and lasts until its order expires, 30 days after it was created. The answer's expiresAt says when.

      maximum: 43200 · minimum: 15 · default: 43200
  • object
    • paymentAttemptId
      string
      required
      minLength: 1
    • type
      string
      required
  • object
    • acceptedTermsDigest
      string
      required
      pattern: ^sha256:[a-f0-9]{64}$
    • type
      string
      required
    • reason
      optional
      default: null

      Any of the following:

      • string
      • null
  • object
    • capabilityId
      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

Type to search…

↑↓ navigate↵ selectEsc close