Aggregated Transit Fare Payments

Aggregated transit fare payments refer to contactless transactions submitted by transit merchants to aggregate the payer's transaction fares across multiple trips for a certain time period and up to a certain amount.

To submit an aggregated transit fare payment, your Merchant Category Code (MCC) must be one of the following:

  • 4111 (Transportation-Suburban and Local Commuter Passenger, including Ferries)
  • 4131 (Bus Lines)
  • 4784 (Bridge and Road Fees, Tolls)
  • 7523 (Automobile Parking Lots and Garages)

Aggregated transit fare payments is only supported on Mastercard (excluding Maestro cards), Visa, and American Express cards.

Aggregated transit fare payments are supported via contactless EMV and contactless mobile integrations from API version 40 and 43 respectively.

Aggregated Transit Fare Payments

  1. Submit a nominal authorization request to the issuer, with the following details:

    • order.amount: Provide $1 or minimum fare amount.
    • transaction.transit.fareCollection=AGGREGATION_ACROSS_TRIPS

      Providing this field and value marks the authorization as a deferred authorization. For more information, see Authorization Deferrals.

    • transaction.transit.transportationMode: Provide the transportation mode used by the payer for the first trip.
    • sourceOfFunds.provided.card.emvRequest: Provide the EMV tags as read from the contactless chip, and that are supported by the gateway. See EMV Transaction Fields.
    Example Request

    Here's an example (in REST) for a nominal authorization to aggregate transit fares.

    URL https://evopaymentsmexico.gateway.mastercard.com/api/rest/version/65/merchant/{merchantId}/order/{orderid}/transaction/{transactionid}
    HTTP Method PUT
    {
      "sourceOfFunds": {
        "type": "CARD",
        "provided": {
          "card": {
            "emvRequest": {
                          "9F02": "123456738012", 
                          "5F2A": "125", 
                          "9F1A":"321", 
                          "9F27":"e1", 
                          "95": "123a567e90", 
                          "9A": "654321", 
                          "9F36": "1e34", 
                          "9C": "21", 
                          "9F26": "0123456789abcdef",
                          "82": "12f4",
                          "9F37": "F123f986"
            },
          }
        }
      },
      "apiOperation": "AUTHORIZE",
      "order": {
        "currency": "AUD",
        "amount": "1"
      },
      "posTerminal": {
        "cardholderActivated": "NOT_CARDHOLDER_ACTIVATED",
        "inputCapability": "CONTACTLESS_CHIP",
        "panEntryMode" : "CONTACTLESS",
        "pinEntryCapability" : "PIN_NOT_SUPPORTED",
        "location": "MERCHANT_TERMINAL_OFF_PREMISES",
        "lane": "test",
        "attended": "UNATTENDED"
      },
      "transaction": {
        "transit": {
          "fareCollection": "AGGREGATION_ACROSS_TRIPS",
          "transportationMode": "TRAIN"
        },
        "source": "CARD_PRESENT",
        "frequency": "SINGLE"
      }
    }
    
  2. If the authorization transaction is successful, you can submit a Capture transaction against this order to aggregate subsequent travel fares for this card at the end of the billing period, for example, a day.

    Contactless EMV Integration
    • order.id: The order identifier of the successful authorization transaction.
    • transaction.id: The transaction identifier for the Capture transaction.
    • transaction.amount: The total amount across all trips within a certain period.
    • transaction.currency

    You need not resubmit the payment details in the Capture transaction as the gateway will store these against the order.

    Contactless Mobile Integration
    • sourceOfFunds.provided.card.number: The full FPAN associated with the DPAN as returned by the card scheme in the authorization response, where the the FPAN mapping was successful, and where the acquirer provided it.
    • sourceOfFunds.provided.card.expiry: The expiry date of the FPAN.
    • order.id: The order identifier of the successful authorization transaction.
    • transaction.id: The transaction identifier for the Capture transaction.
    • transaction.amount: The total amount across all trips within a certain period.
    • transaction.currency

    When DPAN to FPAN mapping is successful, the DPAN is returned in the sourceOfFunds.provided.card.deviceSpecificNumber field in the authorization response so you can identify the transaction as a contactless mobile transaction. If you are configured to receive unmasked PANs in the transaction response, the gateway will return an unmasked DPAN.

Debt Recovery for an Aggregated Transit Fare Payments

If the authorization for an aggregated transit fare payment fails, you can attempt a debt recovery payment to clear any outstanding debt incurred by the payer and to enable the payer to resume travel.

Submit an Authorize transaction request on the order with the failed authorization or on a new order with:

Contactless EMV Integration
  • transaction.transitFareCollection=DEBT_RECOVERY
  • transaction.transit.transportationMode=<the transportation mode used by the payer for the first trip>
  • order.amount=<fare for single trip only>
  • payment details including card number, expiry date, etc

You may want to tokenize the payment details (card number, expiry date, etc.) when submitting the initial authorization for the aggregated transit fare payment, and subsequently use the token on the authorization for the debt recovery payment in place of the payment details.

Contactless Mobile Integration
  • sourceOfFunds.provided.card.number: The full FPAN associated with the DPAN as returned by the card scheme in the authorization response, where the the FPAN mapping was successful, and where the acquirer provided it.
  • sourceOfFunds.provided.card.expiry: The expiry date of the FPAN.
  • transaction.transitFareCollection=DEBT_RECOVERY
  • transaction.transit.transportationMode: The transportation mode used by the payer for the first trip.
  • order.amount: The fare for single trip only.

When DPAN to FPAN mapping is successful, the DPAN is returned in sourceOfFunds.provided.card.deviceSpecificNumber so you can identify the transaction as a contactless mobile transaction. If you request for an unmasked PAN to be returned in the transaction response, the gateway will return an unmasked DPAN.

The amount and frequency of debt recovery attempts must comply with current Mastercard regulations.

Copyright © 2022 Mastercard