Monta.com

Charges

This is the main table at the center of the charges domain.

NameData TypeDescription
charge_idINTEGERnumerical row id (often referred to as PHP charge id) assigned automatically when creating a charge (even before anything happens on the charge point if the charge is started through the API)
dateTIMESTAMPCompletion timestamp of the charge
monthDATECompletion month (last date of the month) of the charge
external_idVARCHAR"global" charge id, assigned by:

php (if started through the API) the charge_id is copied into this column

ocpp (if started via RFID, terminal, ...) ocpp's generated charge id (generated uuid) gets stored in this column

roaming (if monta as EMSP) the roaming charge's id is stored in this column
charge_point_auth_token_idINTEGERReference to the charge_point_auth_tokens.id that was used to start the charge
stateENUMState of the charge, mostly tracking the state of the charge point via the integration, but also has:
virtual states (scheduled, starting, releasing) before the charge point has been contacted
completed: this is the state all charges SHOULD end up in, even if they are failed. For failed charges see failed_reason, failed_at
some transition states
user_idINTEGERThe id of the user that the charge is assigned to. When the user is unknown, we default to the fallback user's id.
paying_team_idINTEGERReference to teams id denoting the team, whose wallet/payment method is used to pay for the charge
sponsor_team_idINTEGERReference to teams id denoting the team that is sponsoring the charge
cp_idINTEGERThe numerical id of the charge point that the charge is taking place on (charge_points.id)
vehicle_idINTEGERNumerical id that references the vehicles table if the vehicle is known when the charge is initiated
cost_price_group_idINTEGERReference to team_price_groups denoting the price group used for calculating the electricity costs for the charge
native_scheduleBOOLEANA boolean yes/no whether the charge has started with lower amps (0.001 amp) until the time the user (or smart charge) set the car to charge when it turns to full power.
starting_atTIMESTAMPTimestamp for the charge start signal being sent to the charge point. Used as the time of charge start, until charging_at timestamp is filled in
cable_plugged_in_atTIMESTAMPTimestamp of when it was registered that cable was plugged in - especially relevant for scheduled charges where the creation time can be much earlier than cable plugging in
charging_atTIMESTAMPTimestamp for when the charge point started charging
completed_atTIMESTAMPTimestamp for when the charge processing and post-processing has completed - e.g. final prices calculated.
After completed_at is set, no further changes or updates should happen on the charge.
released_atTIMESTAMPTimestamp for when the car was released from the charge point
failed_atTIMESTAMPThe datetime when a charge is deemed as failed for whatever reason. Its value is the system's current time when the respective handling is being processed
failed_reasonVARCHARA short text description of why has the charge failed
stopped_reasonVARCHARA short text description of why a charge has been stopped. Note, that stopped does not mean failed.
estimated_charge_minutesINTEGERCalculated duration of the charge based on the amount of KWh to charge and the charge rate of the charge point
currency_idINTEGERA numerical id referencing the Currency that the charge is going to be paid in. Depending on the Pricing type it can be:

1. The currency of the team
2. The currency of the charge point
source_typeVARCHARType of source that source_id is referencing - e.g. Stripe
payment_typeVARCHARtype of payment
payment_idINTEGERunique id of the payment transaction
estimated_kwhFLOATCalculated amount of KWh that is expected to be charged.

Calculated from the related vehicle's battery size and soc or taken from the kwh_limit set on the charge.
If there is no vehicle connected to the charge and no kwh_limit set, it falls back to a default of (at the time of writing) 50
estimated_price_eurFLOATPrice estimated based on the amount of KWh, expected starting time, charge rate of the charge point and pricings configured for the charge.

Stylized example:
35 KWh expected to be charged on an 11 KW charge point starting at 11.00 would result in a calculation of
11 KWh charged from 11-12
11 KWh charged from 12-13
11 KWh charged from 13-14
2 KWh charged from 14-15
Each hour's price is calculated based on the spot price, additionals, tariffs etc. that may be configured for the charge, and summed for the total estimate.
payment_methodVARCHARThe "business" method by which the payment is done. By "business" method we mean that the payment_method column does not refer to a physical/virtual way of executing a transaction (eg, credit card, apple-pay etc). For that, see payment_method_type

Possible values are:
• free
• team-has-fund
• team-has-auto-refill
• source
• payment
payment_method_typeVARCHARThe "physical" way of executing a payment. For example:
• card
• apple-pay
• google-pay
• free
• adyen
• payment-terminal
• team-wallet
is_reservationBOOLEANA yes/no boolean determining whether a charge has a reservation or not. During a reservation the charge point is shown as busy to the public and the user is paying 50% of charging costs while reserved
start_sourceFLOATThe initiator of the charge, specifying if the charge started by the user swiping in the Android or iOS app, whether it was through the Partner API or an RFID token for OCPP/OCPI/Hubject
kwhFLOATThis column gets regularly updated with the current (and later final) kWh consumed.
start_meter_kwhFLOATThe charge point's meter value when the charge was started. We get the value from OCPP in wh and persist it in kwh
end_meter_kwhFLOATThe charge point's meter value when the charge is completed. We get the value from OCPP in wh and persist it in kwh
price_eurFLOATThis column gets regularly updated with the current (and later final) price billed.
cost_orgFLOATCost
original_price_eurFLOATTotal price calculated before any adjustments or modifications made by e.g. regulations, bilateral agreements or protections against negative spot prices
reservation_price_eurFLOATPrice of the fee for reserving the charge point in reservation_min minutes
cost_eurFLOATcost of the charge
price_group_idINTEGERReference to the price group applied to the charge, whose pricings are copied and used for the charge price calculations
co2FLOATCo2 in kgs
soc_sourceVARCHARSource of state of charge information (could be 'vehicle', 'charge point' and 'none')
socFLOATCurrent percentage State of Charge for the vehicle's battery.
soc_startFLOATState of Charge percentage at the start of the charge
avg_price_kwh_orgFLOATPrice (in original currency) / kwh or 0 if the kwh is non existent.
avg_price_kwh_eurFLOATAverage price per kwh adjusted to Euro.
avg_renewableFLOATaverage renewable energy content
co2_savings_per_kwhFLOATSavings of co2 in grams per kwh derived from charging when scheduled as compared to an instant charge
expected_sc_co2_savingFLOATExpected Co2 saving with smart charging
expected_sc_price_savingFLOATExpected price saving with smart charging
instant_sc_co2FLOATInstant smart charge Co2
instant_sc_priceFLOATInstant smart charge price
actual_sc_co2_savingFLOATActual Co2 saving with smart charging
actual_sc_price_savingFLOATActual price saving with smart charging
created_atTIMESTAMPTime of creation for the charge - i.e. when it was initiated. This does include scheduled charging, where there is not yet a car at a charge point, ready to charge
vehicle_modelVARCHARReference to the model of the vehicle on which charge was performed
vehicle_brandVARCHARReference to the brand of the vehicle on which charge was performed
firmwareVARCHARfirmware the charge point was at when the charge was started. The charge point may have been updated since, if you need the charge point's current
firmware, check elsewhere.
application_idINTEGERReferences the mobile application that the charge was started from. Ways to figure out the application:
-Straight from the API request's headers
-Through the authenticated user, if known
-Through the operator, if known
charge_ratingFLOATRating provided for the charge by the user
commentVARCHARComment on the charge
application_nameVARCHARThe name of the mobile application that the charge was started from.
is_roaming_chargeBOOLEANBoolean for whether a charge is roaming or not
roaming_providerVARCHARThe roaming provider of the operator
monta_roaming_roleVARCHARWhether monta acts as EMP (roaming off) or CPO (roaming on)
is_failed_chargeBOOLEANBoolean for whether the charge failed
is_deleted_chargeBOOLEANBoolean for whether the charge is deleted
is_operator_chargeBOOLEANThe charge session belongs to one of the operator's charge points or teams.
is_application_user_chargeBOOLEANThe charge session originated from the operator's own application. Note that the application_id need to be currently linked to the operator.