# EFTPOS Transit Rules
source: https://developer.mastercard.com/mastercard-gateway/documentation/gateway-features/trans-enrich-data/cardholder-present-data/transit/eftpos-transit-rules/index.md

## Overview {#overview}

The aggregation model applies when the final fare is not known at the time of travel. The system calculates the fare at the end of a predefined travel period, typically 24 hours, based on the journeys made during that period.

You can charge flat, distance-based, or time-based fares for each trip within the travel period.

Familiarize yourself with the scheme rules and comply with all requirements.

|                    Use case                     | Supported |
|-------------------------------------------------|-----------|
| Aggregated transit rules                        | Yes       |
| Known Fare transit rules - Real time - Deferred | Yes       |
| Merchant-initiated debt recovery                | Yes       |
| Payer-initiated debt recovery: e-commerce       | Yes       |
| Tap-initiated debt recovery                     | Yes       |
| First ride risk                                 | Yes       |
| Application transaction counter                 | No        |

## API version and parameters {#api-version-and-parameters}

Mastercard Gateway supports transit aggregation on PAY in WS API version 100 and later.

### posTerminal parameters {#posterminal-parameters}

This table describes the most common posTerminal parameters.

|      WS API field      |                                              Value                                               |
|------------------------|--------------------------------------------------------------------------------------------------|
| cardPresenceCapability | `CARD_PRESENT`                                                                                   |
| attended               | `UNATTENDED`                                                                                     |
| cardholderActivated    | `NOT_CARDHOLDER_ACTIVATED`                                                                       |
| location               | `MERCHANT_TERMINAL_ON_PREMISES`                                                                  |
| lane                   | Use a unique Terminal ID for the device. Do not use a fixed Terminal ID value across the estate. |
| inputCapability        | `CONTACTLESS_CHIP`                                                                               |
| pinEntryCapability     | `PIN_NOT_SUPPORTED`                                                                              |
| panEntryMode           | `CONTACTLESS`                                                                                    |
| onlineReasonCode       | N/A                                                                                              |

### transaction.transit.aggregatedFare parameter group {#transactiontransitaggregatedfare-parameter-group}

Aggregation also requires the transaction.transit.aggregatedFare parameter group.

|      WS API field       |                                                                                                                                                                                                Value                                                                                                                                                                                                |
|-------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| `.type`                 | * `FARE` * `DEBT_RECOVERY_MERCHANT_INITIATED` * `DEBT_RECOVERY_PAYER_INITIATED` * `DEBT_RECOVERY_TAP_INITIATED`                                                                                                                                                                                                                                                                                     |
| `.aggregationStartDate` | Date of first trip in YYYY-MM-DD format                                                                                                                                                                                                                                                                                                                                                             |
| `.transportationMode`   | * `CABLE_CAR` * `COACH` * `COMMUTER_TRAIN` * `EXPRESS_COMMUTER_TRAIN` * `FUNICULAR_TRAIN` * `HIGH_SPEED_TRAIN` * `INTERURBAN_BUS` * `INTER_CITY` * `LIGHT_TRAIN_MASS_TRANSIT` * `LOCOMOTIVE` * `OTHER` * `PARA_TRANSIT` * `PARKING` * `POWERED_MOTOR_VEHICLE` * `REGIONAL_TRAIN` * `RURAL_BUS` * `SELF_DRIVE_VEHICLE` * `TAXI` * `TOLL` * `TRAILER` * `TRAIN` * `URBAN_BUS` * `WATER_BORNE_VEHICLE` |
| `.referenceOrderId`     | Order ID of the related previous transaction                                                                                                                                                                                                                                                                                                                                                        |

## Prerequisites {#prerequisites}

Your payment service provider must enable you to retrieve unmasked card numbers.

## Aggregation and known fare use cases {#aggregation-and-known-fare-use-cases}

Aggregated transit fare payments include these use cases.

**Aggregated fare rules:**

* First tap within the travel period
* Subsequent taps within the travel period
* End of travel period
* [Merchant-initiated debt recovery](https://developer.mastercard.com/mastercard-gateway/documentation/gateway-features/trans-enrich-data/cardholder-present-data/transit/agg-transit-rules/index.md#merchant-initiated-debt-recovery)
* Payer-initiated or tap-initiated debt recovery
* [First ride risk](https://developer.mastercard.com/mastercard-gateway/documentation/gateway-features/trans-enrich-data/cardholder-present-data/transit/first-ride-risk/index.md)

**Known fare rules:**

* Real time known fare
* Deferred known fare
* [Merchant-initiated debt recovery](https://developer.mastercard.com/mastercard-gateway/documentation/gateway-features/trans-enrich-data/cardholder-present-data/transit/agg-transit-rules/index.md#merchant-initiated-debt-recovery)
* Payer-initiated or tap-initiated debt recovery
* [First ride risk](https://developer.mastercard.com/mastercard-gateway/documentation/gateway-features/trans-enrich-data/cardholder-present-data/transit/first-ride-risk/index.md)
