Overview
This guide covers best practices for integrating Terminal into fuel card workflows. It’s organized into key implementation areas that map to the fuel card lifecycle:What This Guide Covers
This guide walks through the complete fuel card workflow with Terminal. Depending on your use case, some sections may be optional:Recommended Implementation Phases
We recommend a phased rollout to de-risk your integration and validate data quality before enabling transaction declines:Connecting Fleets with Terminal Link
The first step is obtaining consent from the fleet to access their telematics data. Terminal’s Link component handles the consent flow and authorization with the telematics provider.Configuring Terminal Link
Use Terminal Link to guide fleets through connecting their telematics provider. For fuel cards, use Automatic sync mode from the start—you need continuous data access for fraud prevention.View integration options
View integration options
- Hosted Flow
- React SDK
- JavaScript SDK
The hosted flow is a URL you can send directly to fleets via email, SMS, or any messaging channel:
Connection Lifecycle
Managing connection events is critical for fuel card workflows. A disconnected connection means degraded fraud protection—use webhooks to automate responses to connection state changes.Handling Connection Completion
When a fleet successfully connects their telematics provider, Terminal sends aconnection.completed webhook. Use this to:
- Enable telematics-backed features for that fleet (Location Verification, routing, etc.)
- Update your internal systems with the connection details
- Send a confirmation to the fleet
View code
View code
Handling Disconnections
When a connection becomes disconnected (credentials expire, provider access revoked, etc.), Terminal sends aconnection.disconnected webhook. This can result in a fraud protection gap—notify the fleet promptly and degrade gracefully.
View code
View code
Handling Reconnections
When a previously disconnected connection is restored, Terminal sends aconnection.reconnected webhook. Resume full telematics-backed controls.
View code
View code
Key Webhook Events for Fuel Cards
See the Webhooks Guide for setup instructions and the Webhook Events Reference for detailed payload schemas.
API Usage
For fuel card implementations, you’ll use Terminal’s API for two key workflows: syncing fleet entities (vehicles, drivers, trailers) and real-time location verification for fraud prevention.Entity Sync: Vehicles, Drivers, Trailers
When a fleet connects their telematics, sync their roster to auto-populate your card management system. This eliminates manual data entry and keeps your system in sync with the fleet’s actual assets. Start withGET /vehicles, GET /drivers, and GET /trailers.
View entity sync code
View entity sync code
View webhook handler
View webhook handler
Transaction Verification: Location & Fuel
For card authorization, we recommend the fuel card provider poll Terminal on a schedule and maintain a traceable copy of vehicle state (location snapshots, tank capacity, timestamps, provider metadata) in your own datastore. Then at swipe time, evaluate Location Verification and fuel verification (capacity checks) from your local data, while using Terminal API reads only as fallback/refresh paths (see Managed Polling and real-time data). Recommended authorization flow: Key endpoints:Fuel Verification Implementation
Verify that the requested fuel amount doesn’t exceed the vehicle’s physical capacity.View fuel verification implementation
View fuel verification implementation
Polling Strategy for Location Verification
The/vehicles/locations endpoint is real-time—each request triggers a synchronous call to the telematics provider. You have two approaches:
On-Demand Calls
Fetch data directly from the telematics provider at request time. Best when latency of 1-3 seconds is acceptable and you want maximum data freshness.Managed Polling
For sub-second response times, enable Managed Polling in your Terminal dashboard. Terminal proactively caches location data at your configured interval (e.g., every 15 seconds).For sub-second Location Verification: Most production implementations use
managed polling with a 15-30 second interval. A vehicle’s location rarely
changes significantly in 15 seconds, making this acceptable for fraud
prevention while achieving sub-500ms authorization response times.
IFTA & Reconciliation
After transactions occur, use Terminal data to automate IFTA compliance and enrich transactions for reconciliation.IFTA Automation
The/ifta/summary endpoint provides jurisdictional miles by vehicle and month—the key input for IFTA reporting.
View IFTA query
View IFTA query
Dashboard Access
The Terminal dashboard provides a visual interface for investigating transactions and verifying vehicle activity without writing code. Fraud and operations teams can:- View vehicle history: See trips, GPS breadcrumbs, and routes on an interactive map with timeline filtering
- Verify transaction locations: Check where a vehicle was at a specific time to validate or investigate fuel purchases
- Browse live locations: See current fleet positions for real-time verification
- Filter by date and vehicle: Narrow down to specific vehicles and time ranges around suspicious transactions
- Export data: Download trip and vehicle data as CSV for analysis or dispute resolution
Offboarding
When a fleet churns or a contract ends, archive the connection to stop data syncing and clean up resources.Archiving Connections
Mark a connection as archived when it’s no longer needed usingPATCH /connections/current:
View code
View code
View code
View code
Complete Webhook Reference
Here’s a summary of all webhook events relevant to fuel card workflows:
For event payload details, see the Webhook Events Reference.
Full Sequence Diagram
Next Steps
- Set up webhooks for event-driven automation
- Learn how to sync data for API-based patterns
- Explore the API reference to query telematics data
- Review custom identifiers for connection organization
- Understand real-time data for Location Verification implementation