# CabFare Connect API

> **Full endpoint reference:** See every endpoint, with code samples and **Test Request**, in the [CabFare Connect API reference](https://docs.cabfare.com/api/reference/cabfare-connect).

## Overview

The CabFare Connect API is the central API hosted by CabFare. Both the Taxi Meter partner and the Payment Terminal partner call these endpoints to send events to CabFare Connect, initiate actions, and request subsidy calculations.

This API is the outbound communication path — your system calls CabFare Connect.

## Design Approach

All endpoints in the CabFare Connect API use POST regardless of the nature of the request. This is intentional and documented in the spec. The API is not strictly RESTful but is designed for simplicity and speed of integration.

The API is event-driven. In most cases when your system sends a request to CabFare Connect it will receive an immediate acknowledgement. Any further action is then triggered when your system receives an inbound event from CabFare Connect, or via driver interaction on the device. This design provides resilience against network dropouts and allows the driver to intervene at any point.

## Endpoint Groups

The CabFare Connect API is organised into two groups based on the integration persona:

**Payment Terminal Endpoints — called by Payment Terminal partners**

| Method | Endpoint                     | Summary                                                         |
| ------ | ---------------------------- | --------------------------------------------------------------- |
| POST   | `/terminal/driver/poll`      | Check current driver and link status for the terminal           |
| POST   | `/terminal/driver/login`     | Notify CabFare Connect of driver login on Payment Terminal ⚠️   |
| POST   | `/terminal/driver/logout`    | Notify CabFare Connect of driver logout on Payment Terminal     |
| POST   | `/terminal/driver/validate`  | Submit driver card validation from Payment Terminal             |
| POST   | `/terminal/link/request`     | Send a link mode request from Payment Terminal ⚠️               |
| POST   | `/terminal/mptp/validate`    | Submit Subsidy Card validation from Payment Terminal            |
| POST   | `/terminal/payment/complete` | Notify CabFare Connect of payment outcome from Payment Terminal |

**Taxi Meter Endpoints — called by Taxi Meter partners**

| Method | Endpoint                 | Summary                                                                 |
| ------ | ------------------------ | ----------------------------------------------------------------------- |
| POST   | `/meter/driver/poll`     | Check current driver and link status for the meter                      |
| POST   | `/meter/driver/login`    | Notify CabFare Connect of driver login on Taxi Meter                    |
| POST   | `/meter/driver/logout`   | Notify CabFare Connect of driver logout on Taxi Meter                   |
| POST   | `/meter/trip/start`      | Notify CabFare Connect of trip start                                    |
| POST   | `/meter/trip/end`        | Submit fare details and request subsidy processing at trip end          |
| POST   | `/meter/mptp/read`       | Request Subsidy Card read on Payment Terminal                           |
| POST   | `/meter/mptp/validate`   | Submit manual Subsidy Card number entry from Taxi Meter                 |
| POST   | `/meter/payment/request` | Request card payment from Payment Terminal                              |
| POST   | `/meter/payment/cancel`  | Cancel a pending card payment request                                   |
| POST   | `/meter/job/done`        | Notify CabFare Connect that all payments are complete and close the job |

**Testing Endpoints**

| Method     | Endpoint       | Summary           |
| ---------- | -------------- | ----------------- |
| GET / POST | `/v0.5.0/ping` | Connectivity test |

## Important Notes

- For simplicity, all references to "terminal" in the spec refer to Payment Terminals and all references to "meter" refer to Taxi Meters
- At least one unique device identifier (`taxiMeterId` or `terminalId`) must be present in the majority of requests to identify the target device
- The `driverId` and `vehiclePlate` may also be present as a means of targeting the correct terminal and confirming the driver remains logged in
- Full endpoint schemas, request and response bodies, and error details are available in the interactive API reference imported from the OpenAPI specification

---
Source: https://docs.cabfare.com/api/cabfare-connect-api
