HomeGuidesAPI ReferenceChangelog
Terms of Use
API Reference

Session / Resume billing

Resume billing for a session whose billing was suspended by a failed validation rule: complete it with the session
amounts as they are or as a free session, or drop it so that it is not billed. The action runs as the token owner,
who is recorded on the session edit log and on the action audit record.

Requires the Sessions.resume-billing permission - a token whose admin does not hold it is rejected with 403, and so
is a request for a session that belongs to another operator. An unknown session ID is rejected with 404.

Preconditions, with the response code each failure produces. A temporary lock takes precedence over a session-state conflict:

  • No recalculation is running for the session and the session is not locked for billing processing - otherwise 423
  • billingStatus is suspended - otherwise 409
  • The session is no longer underway at the charge point - otherwise 409. Not every pending or active session
    is rejected: a pending session that has not been sent to the charge point yet, and an active session that
    has stopped and is waiting for the cable to be unlocked, are not underway and are accepted.
  • Billing for the session is not owned by the upstream roaming partner - otherwise 409
  • For free_session: the session has no order yet, unless the platform settings allow marking a session that
    already has an order as free - otherwise 409
  • For drop_session: the session has no order yet, including a corporate coverage or driver excess order - otherwise 409
  • For drop_session: no CDR for the session has been sent or is being sent to the roaming partner - otherwise 409
  • type holds one of the documented values, reason is present and not empty for drop_session, and reason
    is at most 1000 characters - otherwise 422

The validation rules are not re-run. bill_as_is and free_session end with billingStatus set to completed:
bill_as_is keeps the session amounts and charging periods as they are, and free_session zeroes the amount charged
to the driver first. drop_session ends with billingStatus set to dropped: nothing is billed, the session
amounts are kept, and a CDR that has not been sent yet is cancelled.

When billing cannot be completed after every precondition has passed, the session is left untouched and the action
answers 409.

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
integer
required

The ID of the session

Body Params
string
enum
required

How billing is resumed for a session whose billing is suspended:

  • bill_as_is: Complete billing with the session amounts exactly as they are, leaving the charging periods untouched
  • free_session: Mark the session as free, which zeroes the amount charged to the driver, and then complete billing. This is irreversible - the amount the driver would have been charged is kept only as the session's previous total amount for audit purposes and cannot be restored by another action
  • drop_session: Drop the session billing, so the session is not billed at all, and cancel any CDR that has not been sent yet. reason is required for this type. A dropped session can be returned to suspended with the Session / Restore billing action
Allowed:
string
length ≤ 1000

Reason for resuming billing, recorded on the session edit log. Required for drop_session.

Responses
202

Action accepted. Billing for the session has been resumed or dropped.

Language
Credentials
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json