June 7, 2024

The App Garage: How to enable EV plug-and-charge payment with Smartcar

Matt Aspinwall

Principal Product Manager

Learn how to use the Smartcar API to build a better EV charging app experience for users with charger-agnostic billing. Using an EV's battery capacity, state of charge, and charge status, develop an application or feature that bills drivers based on their EV energy consumption and allows for prepaid charging.

The problem: Payment processing diminishes charger reliability 

According to a 2023 study by J.D. Power, one-fifth of public charging attempts in the US are unsuccessful because of factors like payment failures and poor communication between charging hardware and vehicles. 

An analysis of user reviews for EV charging apps in the UK also surfaced similar criticism across almost all the 19 solutions included. Problems reported for each application often include difficulties adding credit cards, a lack of contactless payment options, and limited alternatives if an initial credit card payment fails. 

What exactly are the causes of payment difficulties at charging stations? Here are a few, according to research from the ChargeX Consortium:

  • Weak network connectivity: The reliance on network strength for charging station payment systems and card readers impacts electric vehicle supply equipment (EVSE) located outside urban areas or in underground garages. 
  • Poor software integrations with payment systems: Incomplete or incompatible integrations between EVSEs and credit card systems prevent drivers from successfully using available payment methods or completing transactions without errors. 
  • Impacted card reader hardware: Chip readers installed on EVSEs located outside can be affected by dirt, dust, and outside weather conditions like rain, snow, and high temperatures. 

The solution: Enabling plug-and-charge capabilities with direct EV integrations

In this guide, we dive into how charge point operators can use the Smartcar EV charging API to integrate EVs directly with charging stations for plug-and-charge convenience.

Plug-and-charge capabilities refer to the process of automatically pulling charging session details for billing purposes. Drivers won’t have to worry about using an application or card reader to start a charging session. Instead, charging costs will be automatically billed to a driver’s linked account once the charger retrieves a vehicle’s VIN and calculates the cost based on the energy consumed during the charging session. 

The Smartcar EV charging API gives charge point operators access to EV telemetry data across 200+ EV models and 34 compatible brands. Keep reading for a technical walkthrough and best practices on how to retrieve EV battery and charging data via Smartcar to enable plug-and-charge ease in two ways:

  • Charger-agnostic billing based on energy consumption
  • Pre-paid charging sessions based on energy consumption

The app experience

Creating your application 

To create an app with Smartcar, first set up a Smartcar account. Once your account is established, you'll need to register your application to obtain your client ID and secret. Smartcar offers a few paths to help developers start right away including a Postman test guide and our Starter Apps.

Next, you can implement the Smartcar Connect flow in your application, which is an essential component for authenticating and authorizing users.

After you've successfully integrated the Connect flow, you'll be able to make requests to the Smartcar API!

How to use Smartcar to enable billing based on energy consumption 

We’ll walk you through how to use the following endpoints to enable charger-agnostic billing and pre-paid charging sessions:

  • GET /battery/capacity
  • GET /battery
  • GET /charge
  • POST /charge/limit
  • POST /charge

Once a vehicle is onboarded via Smartcar Connect, check the vehicle’s rated capacity in kWh with GET /battery/capacity

When a charging session begins, use GET /battery to return the vehicle’s state of charge as a percentage value. Store this initial value for later.

You’ll then monitor the entire charging session with GET /charge, which lets you know if the vehicle is plugged in and actively charging by returning its charge status. As the charging session ends, pull the vehicle’s state of charge once more using GET /battery

To track the volume of kWh added during this charging session, you’ll calculate the difference between the initial and final SoC percentage value. 

Total volume of kWh added during the charging session =  Rated Capacity (kWh) x (Final State of Charge % - Initial State of Charge %)

By calculating total volume of kWh delivered during the charging session, you can provide accurate payments for each charging session without having to integrate with a specific charger. EV charging operators can calculate the cost of each charging session based on factors like: 

  • Flat rate per kWh: You can multiply the total kWh added during the charging session with your fixed rate. 
  • Tiered rates: If your cost per kWh differs depending on the total amount of energy consumed during a charging session, you’ll then multiply the total kWh added to the corresponding rate.

Prepaid charging sessions can also be managed directly with Smartcar leveraging POST /charge, which tells the vehicle to start and stop charging on demand. You can also set a charge limit with POST /charge/limit, which allows you to set a maximum charge amount as a percentage of the battery’s rated capacity.

FAQs and best practices

Would this use case require regular polling or scheduled polling? 

Scheduled polling is ideal for passive monitoring, but we  recommend tracking charging activity on the fly and raising these requests as needed.

What other data sources do I need besides the data retrieved via the Smartcar API? 

Beyond information to help you match drivers to their corresponding vehicle, you will also need a breakdown of energy costs for your charging stations. 

Does Smartcar store any data? 

Smartcar does not store data responses on our platform and does not maintain any data centers of our own. We remain a pipe that facilitates the movement of data from vehicles to applications upon receiving customer consent, but we are not an automotive data marketplace that stores, buys, or sells personal or anonymized data. 

Under GDPR, Smartcar is considered a data processor with regard to vehicle data. This means that we process personal data on behalf of each data controller, in this case being the individual vehicle owners. You can find more details in Smartcar’s Data Processing Addendum

Will using Smartcar infringe on driver privacy? 

Smartcar operates on a permissions-based model that gives drivers clear visibility into the data points they’re sharing with the applications of their choice. Our consent-based OAuth2.0 flow, Smartcar Connect, lets vehicle owners review data permissions (e.g. state of charge, battery level, location) before linking their EV, allowing you to clearly build trust with customers on how that data is used by your application.

Our platform also adheres strictly to industry-grade best practices and compliance standards, including SOC 2 Type II compliance, ISO 27001 and 27701, General Data Protection Regulation (GDPR), California Consumer Privacy Act (CCPA),and an API tokens management system. When a driver connects their car to your application via Smartcar, you receive a token that grants it the ability to access only the permissions that drivers consent to share — you are not able to see or store their credentials. Drivers can also disconnect their car at any time. 

What else do I need to know about integrating with Smartcar for EV data? 

Take a look at this vendor assessment checklist for a full of capabilities to look for in an EV API platform. 

Why integrate with an EV to simplify charging payments? 

Network issues and integration challenges with payment systems can happen all the time, and they’re hard to predict. You don’t have to eliminate these payment methods completely, but you can give your customers frictionless options that they can turn to for a reliable charging experience. 

Smartcar gives charge point operators EV data that helps them: 

  • Increase payment reliability at your charging station: Help EV owners spend less time waiting at a charging station for payments to authorize. Plug-and-charge capabilities allow you to immediately capture enough information directly from EVs via a secure API to accurately bill customers, saving them the hassle of fumbling around with broken payment systems or faulty hardware connections between a charging station and EV. 
  • Boost customer satisfaction and loyalty: Build a seamless user experience that motivates customers to keep coming back to your charging station. Increase registration and engagement with your app by enabling plug-and-charge or prepaid payment options. Incetivitize customers to use these payment methods by offering tailored rewards, gamification, and personalized charging recommendations based on utility rates, customer charging behavior, and an EV’s average energy consumption. 
  • Reduce the cost of managing fragmented integrations between charging stations, EVs, and payment systems: Use a standardized API to communicate across 200+ EV models without testing and implementing new integrations with every vehicle. Scale utilization with a predictable pricing structure and a team of API experts focused solely on building and maintaining EV integrations. 

If you’re interested in building a charger-agnostic billing experience for your EV charging application, book a demo today!

Everything you need to know about car APIs. Delivered monthly.

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.