Skip to navigation

Send a charge

View as Markdown

Send one toll, violation or fee. It’s billed on the rental’s order by the rental company’s own rules.

With rental_id, the charge is checked against that rental: the plate must match the rental’s vehicle and occurred_at must fall within the trip (with a day either side). If not, you get 422 and nothing is billed. Without rental_id, Fleetwire matches by plate and occurred_at; if no rental had the car then, the charge is kept as unmatched for the rental company to review.

The receipt can be a multipart file (document), base64 (document_pdf) or a public https link (document_url, downloaded once, no redirects). It must be a PDF of 5 MB or less.

Idempotent: the same external_id with the same amount and kind returns the original with 200. A different amount or kind under the same external_id returns 409; use PATCH to change a charge.

Authentication

AuthorizationBearer

Your partner key, starting with fwp_, sent as Authorization: Bearer fwp_…. Keep it server-side. Fleetwire can rotate it at any time; the old key stops working as soon as a new one is issued.

Path parameters

company_idstringRequiredformat: "uuid"

The Fleetwire company ID from GET /companies.

Request

This endpoint expects an object.
external_idstringRequired<=191 characters
Your id for this charge. The idempotency key.
kindenumRequired

fee is a charge of yours that isn’t a toll or violation, e.g. a registration fee.

Allowed values:
amount_centsintegerRequired1-10000000
What the authority charged.
provider_fee_centsintegerOptional0-10000000Defaults to 0
Your fee for this charge. Billed to the renter as its own line.
currencystringOptional=3 charactersDefaults to USD
occurred_atdatetimeOptional

When it happened. Required unless kind is fee.

rental_idstringOptional<=64 characters

The rental, if you know it. Otherwise matched by plate and occurred_at.

platestringOptional<=20 characters

Needed for matching when there’s no rental_id.

plate_statestringOptional<=10 characters
authoritystringOptional<=191 characters
locationstringOptional<=250 characters
Plaza, gantry or address.
descriptionstringOptional<=200 characters
Shown on the renter's invoice.
citation_numberstringOptional<=100 characters
violation_typeenumOptional
Allowed values:
due_atdateOptional
When the authority wants it paid.
document_pdfstringOptional

Itemized receipt PDF, base64-encoded. Up to 5 MB.

document_urlstringOptionalformat: "uri"<=2000 characters
A public https link to the receipt PDF. Downloaded once, no redirects.

Response

The charge. 200 means this was a retry of a charge Fleetwire already has, and the original is returned; 201 means it was newly created.

dataobject

Errors

401
Unauthorized Error
404
Not Found Error
409
Conflict Error
422
Unprocessable Entity Error
429
Too Many Requests Error