Gozem Developer DocsDocs
Courier API › Trip

Get Trip Invoice

gethttps://sandbox-api.gozem.co/courier/v1/trips/{trip_id}/invoice

Fetch invoice details for a completed trip.

Path parameters

stringrequired

Trip ID (TRP_xxx format or numeric ID)

min 1 charspattern ^(TRP_\d+|\d+)$

Response 200

dataobjectrequired

The invoice for a completed trip

completed_atstringrequired

Trip completion timestamp

date-time
driverobjectrequired

Driver who performed the delivery

namestringrequired

Driver name

phonestringrequired

Driver phone number

vehicle_platestringrequired

Vehicle plate number (license plate)

vehicle_typestringrequired

Vehicle type and details

fare_breakdownobjectrequired

Invoiced amounts, one line item per stop

breakdownarray of objectrequired

Invoiced line items, adding up to `total`

object
amountnumberrequired

Line item amount

labelstringrequired

Line item label (e.g., dropoff address)

sub_labelstring

Sub-label (e.g., Delivery 1)

currency_codestringrequired

Currency code (e.g., XOF)

subtotalnumberrequired

Subtotal amount

totalnumberrequired

Total amount

invoice_numberstringrequired

Invoice number

issued_atstringrequired

Invoice issuance timestamp

date-time
paymentobjectrequired

How the trip was paid

methodstringrequired

Payment method used (e.g., cash, mobile money)

paid_atstring

Payment completion timestamp

date-time
statusstring or string or stringrequired

Payment status

statusstringrequired

Trip must be completed to generate invoice

completed
trip_detailsobjectrequired

Itinerary as delivered

distance_kmnumberrequired

Total distance in kilometers

min 0
dropoff_addressesarray of stringrequired

Dropoff addresses, in delivery order

duration_minutesnumberrequired

Total duration in minutes

min 0
pickup_addressstringrequired

Pickup location address

titlestring

Trip title

trip_idstringrequired

Unique trip identifier

messagestringrequired

Human-readable outcome. Defaults to `Ok`.

successbooleanrequired

Always `true` on a success response.

true

Errors

Every failure returns the same envelope. Branch on code — it is the stable contract; message is human-facing and may be reworded or localized. See the error reference for what each code means.

400401403404405409413415429500502