Skip to content

Payment Terminal Persona ​

View as Markdown

Overview ​

This guide is for Payment Terminal and mobile payment application developers integrating with CabFare Connect. As a Payment Terminal partner you are the transaction interface — you initiate the device link, read physical Subsidy Cards (if applicable), and process card payments for the balance amount instructed by the Taxi Meter.

Read this guide alongside the Workflows section and the API Reference before beginning your implementation.

Your Integration at a Glance ​

You must:

  • Call the CabFare Connect API endpoints listed below to send events to CabFare Connect
  • Implement and host the Payment Terminal API endpoints to receive inbound events from CabFare Connect

Endpoints You Call — CabFare Connect API ​

EndpointWhen to Call
POST /terminal/driver/loginWhen the driver logs in on the Payment Terminal
POST /terminal/driver/pollTo check current driver and link status after connectivity loss
POST /terminal/driver/validateWhen the driver presents their card on the Payment Terminal for validation (if applicable)
POST /terminal/link/requestWhen the driver initiates device linking on the Payment Terminal
POST /terminal/mptp/validateWhen the Payment Terminal successfully reads a passenger Subsidy Card (if applicable)
POST /terminal/payment/completeWhen a card payment is approved or declined on the Payment Terminal
POST /terminal/driver/logoutWhen the driver logs out of the Payment Terminal

Endpoints You Host — Payment Terminal API ​

EndpointPurpose
POST /link/responseReceive link request outcome from CabFare Connect
POST /mptp/readReceive Subsidy Card read request from CabFare Connect (if applicable)
POST /payment/requestReceive card payment request from CabFare Connect
POST /payment/cancelReceive card payment cancellation request from CabFare Connect
POST /print/receiptReceive receipt print request from CabFare Connect
POST /driver/logoutReceive driver logout notification from CabFare Connect

Implementation Checklist ​

Shift Management ​

  • [ ] Implement POST /terminal/driver/login — submit terminalId, driverId and handle the returned Subsidy Scheme eligibility status
  • [ ] Display driver Subsidy Scheme eligibility status on screen after login (if applicable)
  • [ ] Disable Subsidy Scheme functions if driver eligibility status is invalid (if applicable)
  • [ ] Implement POST /terminal/driver/logout — notify CabFare Connect when the driver logs out of the Payment Terminal
  • [ ] Implement POST /terminal/driver/poll — use after connectivity loss to recover session state

Linking ​

  • [ ] Implement POST /terminal/link/request — initiate device link after driver login, submitting terminalId and driverId
  • [ ] Host POST /link/response — receive link outcome from CabFare Connect
  • [ ] Enter linked mode on receipt of a successful link response
  • [ ] Display error and continue in unlinked mode on receipt of a failed link response
  • [ ] Host POST /driver/logout — receive driver logout notification from CabFare Connect, unlink from Taxi Meter, and log driver out if configured

Subsidy Card Handling (if applicable) ​

  • [ ] Host POST /mptp/read — receive Subsidy Card read request from CabFare Connect and prompt driver to present passenger Subsidy Card
  • [ ] Implement POST /terminal/mptp/validate — submit card details to CabFare Connect after a successful card read
  • [ ] Display a clear message directing the driver to perform manual entry on the Taxi Meter if the card cannot be read
  • [ ] Implement POST /terminal/driver/validate — submit driver card details to CabFare Connect when the driver presents their card for validation

Payment Processing ​

  • [ ] Host POST /payment/request — receive card payment request from CabFare Connect and prompt driver to present passenger card
  • [ ] Process the payment as a blind amount in cents — the Payment Terminal does not need to know the fare breakdown
  • [ ] Implement POST /terminal/payment/complete — call for every payment attempt regardless of whether it was approved or declined
  • [ ] Host POST /payment/cancel — receive and action payment cancellation requests from CabFare Connect
  • [ ] Handle 410 Gone response to /payment/cancel — the transaction has already been completed and cannot be cancelled

Receipt ​

  • [ ] Host POST /print/receipt — receive receipt print request from CabFare Connect and print receipt including subsidy and payment details if the system is configured with a Payment Terminal printer

Key Technical Reminders ​

  • All monetary amounts are in cents as integers — never dollars as floats
  • POST /terminal/payment/complete must be called for every payment attempt — approved or declined
  • The terminalId, driverId, and vehiclePlate must be consistent across all API calls within a session
  • Return an immediate 200 OK or 204 No Content when receiving inbound events from CabFare Connect before processing the event
  • Use POST /terminal/driver/poll after connectivity loss to verify session state before resuming normal operation
  • If linking is not successful continue in unlinked mode — standard operation is not blocked

Support ​

Contact support@cabfare.com for integration assistance. Refer to the Error Handling and Troubleshooting section for common issues and diagnostic guidance.