> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.fleetwire.io/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.fleetwire.io/_mcp/server.

# Send a charge

POST https://api.fleetwire.io/api/partners/v1/companies/{company_id}/charges
Content-Type: application/json

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.


Reference: https://docs.fleetwire.io/api-reference/partner-api-charges/partner-send-charge

## Authentication

- `Authorization` header (bearer token, required) — 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.

## Servers

- `https://api.fleetwire.io/api` (Production, default)
- `https://staging.fleetwire.io/api` (Sandbox (Partner API))

## Request

### Path parameters

- `company_id` (string, required) — The Fleetwire company ID from `GET /companies`.

### Body (application/json)

This endpoint expects a PartnerChargeInput.

- `external_id` (string, required) — Your id for this charge. The idempotency key.
- `kind` (enum, required) — `fee` is a charge of yours that isn't a toll or violation, e.g. a registration fee.
  - Allowed values: `toll`, `violation`, `fee`
- `amount_cents` (integer, required) — What the authority charged.
- `provider_fee_cents` (integer, optional, default: 0) — Your fee for this charge. Billed to the renter as its own line.
- `currency` (string, optional, default: USD)
- `occurred_at` (datetime, optional) — When it happened. Required unless `kind` is `fee`.
- `rental_id` (string, optional) — The rental, if you know it. Otherwise matched by `plate` and `occurred_at`.
- `plate` (string, optional) — Needed for matching when there's no `rental_id`.
- `plate_state` (string, optional)
- `authority` (string, optional)
- `location` (string, optional) — Plaza, gantry or address.
- `description` (string, optional) — Shown on the renter's invoice.
- `citation_number` (string, optional)
- `violation_type` (enum, optional)
  - Allowed values: `parking`, `red_light`, `speed`, `other`
- `due_at` (date, optional) — When the authority wants it paid.
- `document_pdf` (string, optional) — Itemized receipt PDF, base64-encoded. Up to 5 MB.
- `document_url` (string, optional) — A public https link to the receipt PDF. Downloaded once, no redirects.

## Response

### 200

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.

- `data` (PartnerCharge, required)

### 201

The charge, newly created.

- `data` (PartnerCharge, required)

## Errors

### 401 Unauthorized Error

Missing, wrong or revoked partner key.

- `error` (PartnerErrorError, required)

### 404 Not Found Error

Unknown company, or it hasn't turned you on, or turned you off. Stop sending for this company.

- `error` (PartnerErrorError, required)

### 409 Conflict Error

The `external_id` was already used for a charge with a different amount or kind.

- `error` (PartnerErrorError, required)

### 422 Unprocessable Entity Error

The request is invalid. `error.fields` lists each problem.

- `error` (PartnerErrorError, required)

### 429 Too Many Requests Error

More than 600 requests in a minute. Wait for the `Retry-After` header (seconds).

- `message` (string, optional)

## Types

### PartnerCharge

- `charge_id` (string, required) — Fleetwire's id for the charge.
- `external_id` (string, required)
- `kind` (enum, required)
  - Allowed values: `toll`, `violation`, `fee`
- `rental_id` (string, required, nullable) — `null` while unmatched.
- `match` (enum, required) — `provided`: you sent `rental_id`. `matched`: Fleetwire found the rental by plate and time. `unmatched`: no rental had the car then; the rental company reviews it.
  - Allowed values: `provided`, `matched`, `unmatched`
- `status` (enum, required) — `unmatched`: no rental found. `unbilled`: matched, but the rental has nothing to bill on yet. `billed`: on the renter's invoice, not paid yet. `paid`: the renter paid that invoice. `voided`: voided by you or the rental company.
  - Allowed values: `unmatched`, `unbilled`, `billed`, `paid`, `voided`
- `amount_cents` (integer, required)
- `provider_fee_cents` (integer, required)
- `currency` (string, required)
- `occurred_at` (datetime, required, nullable)
- `has_document` (boolean, required)
- `authority_status` (enum, required)
  - Allowed values: `paid_at_authority`, `disputed`, `dispute_resolved`
- `created_at` (datetime, required)
- `voided_at` (datetime, required, nullable)

### PartnerErrorError

- `code` (enum, required)
  - Allowed values: `invalid_key`, `company_not_connected`, `not_found`, `external_id_conflict`, `validation_failed`
- `message` (string, required)
- `fields` (map from string to list of string, optional) — Present only on `validation_failed`. Each invalid field with its problems.

## Examples

### A toll matched by plate and time (application/json)

**Request**

```json
{
  "external_id": "tc_8812",
  "kind": "toll",
  "amount_cents": 675,
  "provider_fee_cents": 100,
  "occurred_at": "2026-10-10T18:12:00Z",
  "plate": "K72LMX",
  "plate_state": "NJ",
  "authority": "E-ZPass NY",
  "location": "NJ Turnpike Interchange 11",
  "description": "E-ZPass NY — 3 tolls, Oct 10",
  "document_url": "https://files.example.com/receipts/tc_8812.pdf"
}
```

**Response**

```json
{
  "data": {
    "charge_id": "3f0c8e2a-7b1d-4c5e-9a6f-0d2b4e8c1a73",
    "external_id": "tc_8812",
    "kind": "toll",
    "rental_id": "b_EXAMPLE1",
    "match": "matched",
    "status": "billed",
    "amount_cents": 675,
    "provider_fee_cents": 100,
    "currency": "USD",
    "occurred_at": "2026-10-10T18:12:00Z",
    "has_document": true,
    "authority_status": null,
    "created_at": "2026-10-14T15:20:00Z",
    "voided_at": null
  }
}
```

**SDK Code**

```python A toll matched by plate and time (application/json)
import requests

url = "https://api.fleetwire.io/api/partners/v1/companies/:company_id/charges"

payload = {
    "external_id": "tc_8812",
    "kind": "toll",
    "amount_cents": 675,
    "provider_fee_cents": 100,
    "occurred_at": "2026-10-10T18:12:00Z",
    "plate": "K72LMX",
    "plate_state": "NJ",
    "authority": "E-ZPass NY",
    "location": "NJ Turnpike Interchange 11",
    "description": "E-ZPass NY — 3 tolls, Oct 10",
    "document_url": "https://files.example.com/receipts/tc_8812.pdf"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript A toll matched by plate and time (application/json)
const url = 'https://api.fleetwire.io/api/partners/v1/companies/:company_id/charges';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"external_id":"tc_8812","kind":"toll","amount_cents":675,"provider_fee_cents":100,"occurred_at":"2026-10-10T18:12:00Z","plate":"K72LMX","plate_state":"NJ","authority":"E-ZPass NY","location":"NJ Turnpike Interchange 11","description":"E-ZPass NY — 3 tolls, Oct 10","document_url":"https://files.example.com/receipts/tc_8812.pdf"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go A toll matched by plate and time (application/json)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.fleetwire.io/api/partners/v1/companies/:company_id/charges"

	payload := strings.NewReader("{\n  \"external_id\": \"tc_8812\",\n  \"kind\": \"toll\",\n  \"amount_cents\": 675,\n  \"provider_fee_cents\": 100,\n  \"occurred_at\": \"2026-10-10T18:12:00Z\",\n  \"plate\": \"K72LMX\",\n  \"plate_state\": \"NJ\",\n  \"authority\": \"E-ZPass NY\",\n  \"location\": \"NJ Turnpike Interchange 11\",\n  \"description\": \"E-ZPass NY — 3 tolls, Oct 10\",\n  \"document_url\": \"https://files.example.com/receipts/tc_8812.pdf\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby A toll matched by plate and time (application/json)
require 'uri'
require 'net/http'

url = URI("https://api.fleetwire.io/api/partners/v1/companies/:company_id/charges")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"external_id\": \"tc_8812\",\n  \"kind\": \"toll\",\n  \"amount_cents\": 675,\n  \"provider_fee_cents\": 100,\n  \"occurred_at\": \"2026-10-10T18:12:00Z\",\n  \"plate\": \"K72LMX\",\n  \"plate_state\": \"NJ\",\n  \"authority\": \"E-ZPass NY\",\n  \"location\": \"NJ Turnpike Interchange 11\",\n  \"description\": \"E-ZPass NY — 3 tolls, Oct 10\",\n  \"document_url\": \"https://files.example.com/receipts/tc_8812.pdf\"\n}"

response = http.request(request)
puts response.read_body
```

```java A toll matched by plate and time (application/json)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.fleetwire.io/api/partners/v1/companies/:company_id/charges")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"external_id\": \"tc_8812\",\n  \"kind\": \"toll\",\n  \"amount_cents\": 675,\n  \"provider_fee_cents\": 100,\n  \"occurred_at\": \"2026-10-10T18:12:00Z\",\n  \"plate\": \"K72LMX\",\n  \"plate_state\": \"NJ\",\n  \"authority\": \"E-ZPass NY\",\n  \"location\": \"NJ Turnpike Interchange 11\",\n  \"description\": \"E-ZPass NY — 3 tolls, Oct 10\",\n  \"document_url\": \"https://files.example.com/receipts/tc_8812.pdf\"\n}")
  .asString();
```

```php A toll matched by plate and time (application/json)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.fleetwire.io/api/partners/v1/companies/:company_id/charges', [
  'body' => '{
  "external_id": "tc_8812",
  "kind": "toll",
  "amount_cents": 675,
  "provider_fee_cents": 100,
  "occurred_at": "2026-10-10T18:12:00Z",
  "plate": "K72LMX",
  "plate_state": "NJ",
  "authority": "E-ZPass NY",
  "location": "NJ Turnpike Interchange 11",
  "description": "E-ZPass NY — 3 tolls, Oct 10",
  "document_url": "https://files.example.com/receipts/tc_8812.pdf"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp A toll matched by plate and time (application/json)
using RestSharp;

var client = new RestClient("https://api.fleetwire.io/api/partners/v1/companies/:company_id/charges");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"external_id\": \"tc_8812\",\n  \"kind\": \"toll\",\n  \"amount_cents\": 675,\n  \"provider_fee_cents\": 100,\n  \"occurred_at\": \"2026-10-10T18:12:00Z\",\n  \"plate\": \"K72LMX\",\n  \"plate_state\": \"NJ\",\n  \"authority\": \"E-ZPass NY\",\n  \"location\": \"NJ Turnpike Interchange 11\",\n  \"description\": \"E-ZPass NY — 3 tolls, Oct 10\",\n  \"document_url\": \"https://files.example.com/receipts/tc_8812.pdf\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift A toll matched by plate and time (application/json)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "external_id": "tc_8812",
  "kind": "toll",
  "amount_cents": 675,
  "provider_fee_cents": 100,
  "occurred_at": "2026-10-10T18:12:00Z",
  "plate": "K72LMX",
  "plate_state": "NJ",
  "authority": "E-ZPass NY",
  "location": "NJ Turnpike Interchange 11",
  "description": "E-ZPass NY — 3 tolls, Oct 10",
  "document_url": "https://files.example.com/receipts/tc_8812.pdf"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.fleetwire.io/api/partners/v1/companies/:company_id/charges")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### A violation for a known rental (application/json)

**Request**

```json
{
  "external_id": "tc_cit_20391",
  "kind": "violation",
  "amount_cents": 10000,
  "provider_fee_cents": 2500,
  "occurred_at": "2026-10-09T14:40:00-04:00",
  "rental_id": "b_EXAMPLE1",
  "plate": "K72LMX",
  "plate_state": "NJ",
  "authority": "City of Miami Parking",
  "description": "Parking citation, Brickell Ave",
  "citation_number": "MIA-20391",
  "violation_type": "parking",
  "due_at": "2026-11-08",
  "document_pdf": "JVBERi0xLjQK..."
}
```

**Response**

```json
{
  "data": {
    "charge_id": "3f0c8e2a-7b1d-4c5e-9a6f-0d2b4e8c1a73",
    "external_id": "tc_8812",
    "kind": "toll",
    "rental_id": "b_EXAMPLE1",
    "match": "matched",
    "status": "billed",
    "amount_cents": 675,
    "provider_fee_cents": 100,
    "currency": "USD",
    "occurred_at": "2026-10-10T18:12:00Z",
    "has_document": true,
    "authority_status": null,
    "created_at": "2026-10-14T15:20:00Z",
    "voided_at": null
  }
}
```

**SDK Code**

```python A violation for a known rental (application/json)
import requests

url = "https://api.fleetwire.io/api/partners/v1/companies/:company_id/charges"

payload = {
    "external_id": "tc_cit_20391",
    "kind": "violation",
    "amount_cents": 10000,
    "provider_fee_cents": 2500,
    "occurred_at": "2026-10-09T14:40:00-04:00",
    "rental_id": "b_EXAMPLE1",
    "plate": "K72LMX",
    "plate_state": "NJ",
    "authority": "City of Miami Parking",
    "description": "Parking citation, Brickell Ave",
    "citation_number": "MIA-20391",
    "violation_type": "parking",
    "due_at": "2026-11-08",
    "document_pdf": "JVBERi0xLjQK..."
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript A violation for a known rental (application/json)
const url = 'https://api.fleetwire.io/api/partners/v1/companies/:company_id/charges';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"external_id":"tc_cit_20391","kind":"violation","amount_cents":10000,"provider_fee_cents":2500,"occurred_at":"2026-10-09T14:40:00-04:00","rental_id":"b_EXAMPLE1","plate":"K72LMX","plate_state":"NJ","authority":"City of Miami Parking","description":"Parking citation, Brickell Ave","citation_number":"MIA-20391","violation_type":"parking","due_at":"2026-11-08","document_pdf":"JVBERi0xLjQK..."}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go A violation for a known rental (application/json)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.fleetwire.io/api/partners/v1/companies/:company_id/charges"

	payload := strings.NewReader("{\n  \"external_id\": \"tc_cit_20391\",\n  \"kind\": \"violation\",\n  \"amount_cents\": 10000,\n  \"provider_fee_cents\": 2500,\n  \"occurred_at\": \"2026-10-09T14:40:00-04:00\",\n  \"rental_id\": \"b_EXAMPLE1\",\n  \"plate\": \"K72LMX\",\n  \"plate_state\": \"NJ\",\n  \"authority\": \"City of Miami Parking\",\n  \"description\": \"Parking citation, Brickell Ave\",\n  \"citation_number\": \"MIA-20391\",\n  \"violation_type\": \"parking\",\n  \"due_at\": \"2026-11-08\",\n  \"document_pdf\": \"JVBERi0xLjQK...\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby A violation for a known rental (application/json)
require 'uri'
require 'net/http'

url = URI("https://api.fleetwire.io/api/partners/v1/companies/:company_id/charges")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"external_id\": \"tc_cit_20391\",\n  \"kind\": \"violation\",\n  \"amount_cents\": 10000,\n  \"provider_fee_cents\": 2500,\n  \"occurred_at\": \"2026-10-09T14:40:00-04:00\",\n  \"rental_id\": \"b_EXAMPLE1\",\n  \"plate\": \"K72LMX\",\n  \"plate_state\": \"NJ\",\n  \"authority\": \"City of Miami Parking\",\n  \"description\": \"Parking citation, Brickell Ave\",\n  \"citation_number\": \"MIA-20391\",\n  \"violation_type\": \"parking\",\n  \"due_at\": \"2026-11-08\",\n  \"document_pdf\": \"JVBERi0xLjQK...\"\n}"

response = http.request(request)
puts response.read_body
```

```java A violation for a known rental (application/json)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.fleetwire.io/api/partners/v1/companies/:company_id/charges")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"external_id\": \"tc_cit_20391\",\n  \"kind\": \"violation\",\n  \"amount_cents\": 10000,\n  \"provider_fee_cents\": 2500,\n  \"occurred_at\": \"2026-10-09T14:40:00-04:00\",\n  \"rental_id\": \"b_EXAMPLE1\",\n  \"plate\": \"K72LMX\",\n  \"plate_state\": \"NJ\",\n  \"authority\": \"City of Miami Parking\",\n  \"description\": \"Parking citation, Brickell Ave\",\n  \"citation_number\": \"MIA-20391\",\n  \"violation_type\": \"parking\",\n  \"due_at\": \"2026-11-08\",\n  \"document_pdf\": \"JVBERi0xLjQK...\"\n}")
  .asString();
```

```php A violation for a known rental (application/json)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.fleetwire.io/api/partners/v1/companies/:company_id/charges', [
  'body' => '{
  "external_id": "tc_cit_20391",
  "kind": "violation",
  "amount_cents": 10000,
  "provider_fee_cents": 2500,
  "occurred_at": "2026-10-09T14:40:00-04:00",
  "rental_id": "b_EXAMPLE1",
  "plate": "K72LMX",
  "plate_state": "NJ",
  "authority": "City of Miami Parking",
  "description": "Parking citation, Brickell Ave",
  "citation_number": "MIA-20391",
  "violation_type": "parking",
  "due_at": "2026-11-08",
  "document_pdf": "JVBERi0xLjQK..."
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp A violation for a known rental (application/json)
using RestSharp;

var client = new RestClient("https://api.fleetwire.io/api/partners/v1/companies/:company_id/charges");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"external_id\": \"tc_cit_20391\",\n  \"kind\": \"violation\",\n  \"amount_cents\": 10000,\n  \"provider_fee_cents\": 2500,\n  \"occurred_at\": \"2026-10-09T14:40:00-04:00\",\n  \"rental_id\": \"b_EXAMPLE1\",\n  \"plate\": \"K72LMX\",\n  \"plate_state\": \"NJ\",\n  \"authority\": \"City of Miami Parking\",\n  \"description\": \"Parking citation, Brickell Ave\",\n  \"citation_number\": \"MIA-20391\",\n  \"violation_type\": \"parking\",\n  \"due_at\": \"2026-11-08\",\n  \"document_pdf\": \"JVBERi0xLjQK...\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift A violation for a known rental (application/json)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "external_id": "tc_cit_20391",
  "kind": "violation",
  "amount_cents": 10000,
  "provider_fee_cents": 2500,
  "occurred_at": "2026-10-09T14:40:00-04:00",
  "rental_id": "b_EXAMPLE1",
  "plate": "K72LMX",
  "plate_state": "NJ",
  "authority": "City of Miami Parking",
  "description": "Parking citation, Brickell Ave",
  "citation_number": "MIA-20391",
  "violation_type": "parking",
  "due_at": "2026-11-08",
  "document_pdf": "JVBERi0xLjQK..."
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.fleetwire.io/api/partners/v1/companies/:company_id/charges")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```

### A fee of yours (no occurred_at needed) (application/json)

**Request**

```json
{
  "external_id": "tc_reg_77",
  "kind": "fee",
  "amount_cents": 1000,
  "rental_id": "b_EXAMPLE1",
  "description": "Toll service registration"
}
```

**Response**

```json
{
  "data": {
    "charge_id": "3f0c8e2a-7b1d-4c5e-9a6f-0d2b4e8c1a73",
    "external_id": "tc_8812",
    "kind": "toll",
    "rental_id": "b_EXAMPLE1",
    "match": "matched",
    "status": "billed",
    "amount_cents": 675,
    "provider_fee_cents": 100,
    "currency": "USD",
    "occurred_at": "2026-10-10T18:12:00Z",
    "has_document": true,
    "authority_status": null,
    "created_at": "2026-10-14T15:20:00Z",
    "voided_at": null
  }
}
```

**SDK Code**

```python A fee of yours (no occurred_at needed) (application/json)
import requests

url = "https://api.fleetwire.io/api/partners/v1/companies/:company_id/charges"

payload = {
    "external_id": "tc_reg_77",
    "kind": "fee",
    "amount_cents": 1000,
    "rental_id": "b_EXAMPLE1",
    "description": "Toll service registration"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```javascript A fee of yours (no occurred_at needed) (application/json)
const url = 'https://api.fleetwire.io/api/partners/v1/companies/:company_id/charges';
const options = {
  method: 'POST',
  headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
  body: '{"external_id":"tc_reg_77","kind":"fee","amount_cents":1000,"rental_id":"b_EXAMPLE1","description":"Toll service registration"}'
};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go A fee of yours (no occurred_at needed) (application/json)
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.fleetwire.io/api/partners/v1/companies/:company_id/charges"

	payload := strings.NewReader("{\n  \"external_id\": \"tc_reg_77\",\n  \"kind\": \"fee\",\n  \"amount_cents\": 1000,\n  \"rental_id\": \"b_EXAMPLE1\",\n  \"description\": \"Toll service registration\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby A fee of yours (no occurred_at needed) (application/json)
require 'uri'
require 'net/http'

url = URI("https://api.fleetwire.io/api/partners/v1/companies/:company_id/charges")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n  \"external_id\": \"tc_reg_77\",\n  \"kind\": \"fee\",\n  \"amount_cents\": 1000,\n  \"rental_id\": \"b_EXAMPLE1\",\n  \"description\": \"Toll service registration\"\n}"

response = http.request(request)
puts response.read_body
```

```java A fee of yours (no occurred_at needed) (application/json)
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.post("https://api.fleetwire.io/api/partners/v1/companies/:company_id/charges")
  .header("Authorization", "Bearer <token>")
  .header("Content-Type", "application/json")
  .body("{\n  \"external_id\": \"tc_reg_77\",\n  \"kind\": \"fee\",\n  \"amount_cents\": 1000,\n  \"rental_id\": \"b_EXAMPLE1\",\n  \"description\": \"Toll service registration\"\n}")
  .asString();
```

```php A fee of yours (no occurred_at needed) (application/json)
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.fleetwire.io/api/partners/v1/companies/:company_id/charges', [
  'body' => '{
  "external_id": "tc_reg_77",
  "kind": "fee",
  "amount_cents": 1000,
  "rental_id": "b_EXAMPLE1",
  "description": "Toll service registration"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```

```csharp A fee of yours (no occurred_at needed) (application/json)
using RestSharp;

var client = new RestClient("https://api.fleetwire.io/api/partners/v1/companies/:company_id/charges");
var request = new RestRequest(Method.POST);
request.AddHeader("Authorization", "Bearer <token>");
request.AddHeader("Content-Type", "application/json");
request.AddParameter("application/json", "{\n  \"external_id\": \"tc_reg_77\",\n  \"kind\": \"fee\",\n  \"amount_cents\": 1000,\n  \"rental_id\": \"b_EXAMPLE1\",\n  \"description\": \"Toll service registration\"\n}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
```

```swift A fee of yours (no occurred_at needed) (application/json)
import Foundation

let headers = [
  "Authorization": "Bearer <token>",
  "Content-Type": "application/json"
]
let parameters = [
  "external_id": "tc_reg_77",
  "kind": "fee",
  "amount_cents": 1000,
  "rental_id": "b_EXAMPLE1",
  "description": "Toll service registration"
] as [String : Any]

let postData = JSONSerialization.data(withJSONObject: parameters, options: [])

let request = NSMutableURLRequest(url: NSURL(string: "https://api.fleetwire.io/api/partners/v1/companies/:company_id/charges")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "POST"
request.allHTTPHeaderFields = headers
request.httpBody = postData as Data

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```