Record a payment collected
POST/v2/trips/:id/collections
Paid API plans only. Records money taken for a delivery. AfriHex
keeps the record only: it never holds or moves the money. The trip
needs an amount_to_collect.
Send a client_ref from rider apps. A repeat with the same value
(a phone retrying on bad network) records nothing and returns 200
instead of 201. Records can't be edited; void a mistake instead.
Fires trip.collection_recorded.
Request
Responses
- 200
- 201
- 400
- 404
Already recorded under this client_ref; nothing changed
Recorded; the updated trip
Invalid amount or method
No such trip on your account (TRIP_NOT_FOUND)