Skip to main content

Pricing model

tickets_configuration defines the possible ticket types available for booking.

Under tickets_configurations, there are two layers:

  • first layer is sections of ticket types
  • second layer is ticket types under each section

Under each section, there are:

  • items contains the lists of ticket types available under this section. For each item, there are:

    • max is the max number of this ticket type selectable for passenger
    • title is the displayed ticket type when making booking
    • subtitle is a subtitle next to the title of the displayed ticket type when making booking
    • description is a descriptive text of the demand type
    • ticket_type defines the name of this type
      • *Note: this is the key used in the rules section below
    • require_driver_verification
  • title defines the display of the section title in each language

  • section_constraints defines some section level constraints. Currently we support:

    • total_minimum_demand: the minimum number of total demand selected in this section that allows the booking to proceed. (A booking is invalid if the number of demand across all ticket types under this section is lower than this number.) rules defines how the price will be calculated for each demand type.
  • For each demand type, these are the fields:

    • demand_limit Number of demand covered by the base price
      • *Note: demand refers to number of tickets of this type in booking
      • **Note: base price is a concept that will be explained in a lower section
    • intial_price Base price when demand is less than demand_limit
    • distance_coefficient Additional price per km of air distance
    • extensions Covers all the discounts and surcharges that are at demand type level
      • There might be many extensions , and each extension will define a potential surge / discount for price for the demand type.

      • Currently, we only support extensions by stop_id type

        \{
        "type": "stop_id",
        "surcharge": 0,
        "exact_price": 0,
        "pickup_stop_ids": [],
        "discount_percent": 0,
        "dropoff_stop_ids": []
        \}
        • type defines the type of extension this is
        • surcharge defines the additional surcharge to be applied to the demand type
        • exact price defines a value that overwrites the price of the demand type if this extension takes effect
          • overwrites air price to 0, and set the value to surge
        • discount_percent defines a percentage of discount that will be applied onto (price + surge)
        • if type = stop_id, if passenger makes a booking with preferred_pickup_stop_id or preferred_dropoff_stop_id inside pickup_stop_ids or dropoff_stop_ids, this extension will take effect.
          • *Note: preferred_pickup_stop_id or preferred_dropoff_stop_id are selected if passenger select via blue dots on PA currently
    • Concept base payables is calculated by:
      • concept air price: rounding(initial_price + air_distance / 1000 * distance_coefficient)
        • *Note: rounding here will be explained in the routing strategy section below
      • + any surcharges calculated from extensions
      • - any discounts calculated from extensions
    • demand_additional_price defines how price works when demand exceeds demand_limit
      • concept: additional demand is (number of tickets for this type - demand_limit)
      • coefficient : coefficient times of base payables to be charged for each additional demand
      • fixed_amount : a fixed amount to be charged for each additional demand
  • Total price per demand type =

    • air price +
    • surges from extensions +
    • (demand - demand_limit) * (base payables * demand_additional_price.coefficient + demand_additional_price.fixed_amount)
  • Total discount per demand type =

    • discounts from extensions +
    • discounts from payment methods
      • *Note: discounts from payment methods will be explained in later section
  • Total payable per demand type =

    • Total price - Total discount

variability defines whether the price based on request will change upon receiving offer. There are two values supported:

  • exact means that the price will not change upon receiving offer (this is always recommended as this is assumed in our UI flows at the moment
  • approximate means that the price can change upon receiving offer

currency defines the currency of the price

format defines the display of price

format_localized defines the display of the price by language

rounding_strategy defines the behaviour when rounding price, with:

  • minimal_unit defines the minimal unit in the calculated price. Currently we support:
    • cent - the price is in cent (e.g. if price = 100, it means 100 cent)
    • integer - the price is in unit concept (e.g. if price = 100, it means 100 units, in Singapore’s case it means 100 dollars)
  • round_to defines the digit that we will round the price to. Currently we support:
    • cent - round to the closest cent
      • *Note: only works if if minimal_unit = cent
      • *Note: skipped if minimal_unit = cent
    • tencent - round to the closest cent
      • *Note: only works if if minimal_unit = cent
    • one - round to the closet unit
      • *Note: skipped if minimal_unit = integer
    • ten - round to the closet ten
  • round_function
    • round - round off - find the closet qualifiable number
    • floor - round down - find the closest smaller qualifiable number
    • ceil - round up - find the closest larger qualifiable number

rounding_strategy_help contains all the options available for rouding_startegy

**cancellation_terms and fail_to_board_terms are implemented in pricing but not integrated with the cancellation and fail_to_board actions yet. - need to work on it when needed.

payment_method_configuration defines the list of payment methods selectable by passengers when making bookings via passenger application.

  • Under each payment method, there are two features:
    • payment_provider
    • payment_method_type
  • The options are defined in payment method schema https://sgerp.d.gcprod.swatrider.com/api/v2/paymentmethod/schema
  • Currently, we support these options:
    • Cash: payment_provider = internal and payment_method_type = cash
    • Credit Card: payment_provider = stripe and payment_method_type = card

payment_method_configuration_operator defines the list of payment methods selectable by operators when making bookings via operator interface.

  • Details are the same as the above section of payment_method_configuration
namestring
options object
cancellation_terms object
grace_periodinteger
penaltyinteger
currencystring
fail_to_board_terms object
grace_periodinteger
penaltyinteger
formatstring
format_helpstring
format_localized object
enstring
jastring
payment_method_configuration object[]
  • Array [
  • payment_method_typestring
    payment_providerstring
  • ]
  • payment_method_configuration_operator object[]
  • Array [
  • payment_method_typestring
    payment_providerstring
  • ]
  • rounding_strategy object
    minimal_unitstring
    round_functionstring
    round_tostring
    rounding_strategy_help object
    minimal_unitstring[]
    round_functionstring[]
    round_tostring[]
    rules object
    baby object
    demand_additional_price object
    coefficientinteger
    fixed_amountinteger
    demand_limitinteger
    demand_limit_helpstring
    distance_coefficientinteger
    distance_coefficient_helpstring
    extensions object[]
  • Array [
  • discount_percentinteger
    dropoff_stop_idsobject[]
    exact_priceinteger
    pickup_stop_idsobject[]
    surchargeinteger
    typestring
  • ]
  • initial_priceinteger
    initial_price_helpstring
    passenger object
    demand_additional_price object
    coefficientinteger
    fixed_amountinteger
    demand_limitinteger
    demand_limit_helpstring
    distance_coefficientinteger
    distance_coefficient_helpstring
    extensions object[]
  • Array [
  • discount_percentinteger
    dropoff_stop_idsinteger[]
    exact_priceinteger
    pickup_stop_idsinteger[]
    surchargeinteger
    typestring
  • ]
  • initial_priceinteger
    initial_price_helpstring
    passenger_child object
    demand_additional_price object
    coefficientinteger
    fixed_amountinteger
    demand_limitinteger
    demand_limit_helpstring
    distance_coefficientinteger
    distance_coefficient_helpstring
    extensions object[]
  • Array [
  • discount_percentinteger
    dropoff_stop_idsobject[]
    exact_priceinteger
    pickup_stop_idsobject[]
    surchargeinteger
    typestring
  • ]
  • initial_priceinteger
    initial_price_helpstring
    stroller object
    demand_additional_price object
    coefficientinteger
    fixed_amountinteger
    demand_limitinteger
    demand_limit_helpstring
    distance_coefficientinteger
    distance_coefficient_helpstring
    extensions object[]
  • Array [
  • discount_percentinteger
    dropoff_stop_idsobject[]
    exact_priceinteger
    pickup_stop_idsobject[]
    surchargeinteger
    typestring
  • ]
  • initial_priceinteger
    initial_price_helpstring
    wheelchair object
    demand_additional_price object
    coefficientinteger
    fixed_amountinteger
    demand_limitinteger
    demand_limit_helpstring
    distance_coefficientinteger
    distance_coefficient_helpstring
    extensions object[]
  • Array [
  • discount_percentinteger
    dropoff_stop_idsobject[]
    exact_priceinteger
    pickup_stop_idsobject[]
    surchargeinteger
    typestring
  • ]
  • initial_priceinteger
    initial_price_helpstring
    wheelchair_baby object
    demand_additional_price object
    coefficientinteger
    fixed_amountinteger
    demand_limitinteger
    demand_limit_helpstring
    distance_coefficientinteger
    distance_coefficient_helpstring
    extensions object[]
  • Array [
  • discount_percentinteger
    dropoff_stop_idsobject[]
    exact_priceinteger
    pickup_stop_idsobject[]
    surchargeinteger
    typestring
  • ]
  • initial_priceinteger
    initial_price_helpstring
    wheelchair_child object
    demand_additional_price object
    coefficientinteger
    fixed_amountinteger
    demand_limitinteger
    demand_limit_helpstring
    distance_coefficientinteger
    distance_coefficient_helpstring
    extensions object[]
  • Array [
  • discount_percentinteger
    dropoff_stop_idsobject[]
    exact_priceinteger
    pickup_stop_idsobject[]
    surchargeinteger
    typestring
  • ]
  • initial_priceinteger
    initial_price_helpstring
    tickets_configuration object[]
  • Array [
  • items object[]
  • Array [
  • description object
    enstring
    jastring
    maxinteger
    require_driver_verificationboolean
    subtitle object
    enstring
    jpstring
    jastring
    ticket_typestring
    title object
    enstring
    jastring
  • ]
  • section_constraints object
    total_minimum_demandinteger
    title object
    enstring
    jastring
  • ]
  • variabilitystring
    projectstring<uri-reference>
    strategystring
    created_atstring<date-time>

    Creation timestamp of an object

    id object

    Identifier of the object

    anyOf
    integer

    Can be integer

    modified_atstring<date-time>

    Last modification timestampo of the object

    resource_uristring<uri-reference>

    URI of the object instance

    Pricing model
    {
    "name": "string",
    "options": {
    "cancellation_terms": {
    "grace_period": 0,
    "penalty": 0
    },
    "currency": "string",
    "fail_to_board_terms": {
    "grace_period": 0,
    "penalty": 0
    },
    "format": "string",
    "format_help": "string",
    "format_localized": {
    "en": "string",
    "ja": "string"
    },
    "payment_method_configuration": [
    {
    "payment_method_type": "string",
    "payment_provider": "string"
    }
    ],
    "payment_method_configuration_operator": [
    {
    "payment_method_type": "string",
    "payment_provider": "string"
    }
    ],
    "rounding_strategy": {
    "minimal_unit": "string",
    "round_function": "string",
    "round_to": "string"
    },
    "rounding_strategy_help": {
    "minimal_unit": [
    "string"
    ],
    "round_function": [
    "string"
    ],
    "round_to": [
    "string"
    ]
    },
    "rules": {
    "baby": {
    "demand_additional_price": {
    "coefficient": 0,
    "fixed_amount": 0
    },
    "demand_limit": 0,
    "demand_limit_help": "string",
    "distance_coefficient": 0,
    "distance_coefficient_help": "string",
    "extensions": [
    {
    "discount_percent": 0,
    "dropoff_stop_ids": [
    {}
    ],
    "exact_price": 0,
    "pickup_stop_ids": [
    {}
    ],
    "surcharge": 0,
    "type": "string"
    }
    ],
    "initial_price": 0,
    "initial_price_help": "string"
    },
    "passenger": {
    "demand_additional_price": {
    "coefficient": 0,
    "fixed_amount": 0
    },
    "demand_limit": 0,
    "demand_limit_help": "string",
    "distance_coefficient": 0,
    "distance_coefficient_help": "string",
    "extensions": [
    {
    "discount_percent": 0,
    "dropoff_stop_ids": [
    0
    ],
    "exact_price": 0,
    "pickup_stop_ids": [
    0
    ],
    "surcharge": 0,
    "type": "string"
    }
    ],
    "initial_price": 0,
    "initial_price_help": "string"
    },
    "passenger_child": {
    "demand_additional_price": {
    "coefficient": 0,
    "fixed_amount": 0
    },
    "demand_limit": 0,
    "demand_limit_help": "string",
    "distance_coefficient": 0,
    "distance_coefficient_help": "string",
    "extensions": [
    {
    "discount_percent": 0,
    "dropoff_stop_ids": [
    {}
    ],
    "exact_price": 0,
    "pickup_stop_ids": [
    {}
    ],
    "surcharge": 0,
    "type": "string"
    }
    ],
    "initial_price": 0,
    "initial_price_help": "string"
    },
    "stroller": {
    "demand_additional_price": {
    "coefficient": 0,
    "fixed_amount": 0
    },
    "demand_limit": 0,
    "demand_limit_help": "string",
    "distance_coefficient": 0,
    "distance_coefficient_help": "string",
    "extensions": [
    {
    "discount_percent": 0,
    "dropoff_stop_ids": [
    {}
    ],
    "exact_price": 0,
    "pickup_stop_ids": [
    {}
    ],
    "surcharge": 0,
    "type": "string"
    }
    ],
    "initial_price": 0,
    "initial_price_help": "string"
    },
    "wheelchair": {
    "demand_additional_price": {
    "coefficient": 0,
    "fixed_amount": 0
    },
    "demand_limit": 0,
    "demand_limit_help": "string",
    "distance_coefficient": 0,
    "distance_coefficient_help": "string",
    "extensions": [
    {
    "discount_percent": 0,
    "dropoff_stop_ids": [
    {}
    ],
    "exact_price": 0,
    "pickup_stop_ids": [
    {}
    ],
    "surcharge": 0,
    "type": "string"
    }
    ],
    "initial_price": 0,
    "initial_price_help": "string"
    },
    "wheelchair_baby": {
    "demand_additional_price": {
    "coefficient": 0,
    "fixed_amount": 0
    },
    "demand_limit": 0,
    "demand_limit_help": "string",
    "distance_coefficient": 0,
    "distance_coefficient_help": "string",
    "extensions": [
    {
    "discount_percent": 0,
    "dropoff_stop_ids": [
    {}
    ],
    "exact_price": 0,
    "pickup_stop_ids": [
    {}
    ],
    "surcharge": 0,
    "type": "string"
    }
    ],
    "initial_price": 0,
    "initial_price_help": "string"
    },
    "wheelchair_child": {
    "demand_additional_price": {
    "coefficient": 0,
    "fixed_amount": 0
    },
    "demand_limit": 0,
    "demand_limit_help": "string",
    "distance_coefficient": 0,
    "distance_coefficient_help": "string",
    "extensions": [
    {
    "discount_percent": 0,
    "dropoff_stop_ids": [
    {}
    ],
    "exact_price": 0,
    "pickup_stop_ids": [
    {}
    ],
    "surcharge": 0,
    "type": "string"
    }
    ],
    "initial_price": 0,
    "initial_price_help": "string"
    }
    },
    "tickets_configuration": [
    {
    "items": [
    {
    "description": {
    "en": "string",
    "ja": "string"
    },
    "max": 0,
    "require_driver_verification": true,
    "subtitle": {
    "en": "string",
    "jp": "string",
    "ja": "string"
    },
    "ticket_type": "string",
    "title": {
    "en": "string",
    "ja": "string"
    }
    }
    ],
    "section_constraints": {
    "total_minimum_demand": 0
    },
    "title": {
    "en": "string",
    "ja": "string"
    }
    }
    ],
    "variability": "string"
    },
    "project": "string",
    "strategy": "string",
    "created_at": "2024-07-29T15:51:28.071Z",
    "id": 0,
    "modified_at": "2024-07-29T15:51:28.071Z",
    "resource_uri": "string"
    }