Create driver payment
Record a payment that settles delivered shipments of one driver. Each shipment has two parts to settle, once each: the cash the driver collected and the driver's fee.
cod_remittance— the driver hands over the cash: settles the cash part; the driver'spendingCashdrops andtotalPaidrises by the cash total.fee_payment— the store pays the driver's fees: settles the fee part; the cash counters do not move.net_settlement— both at once: the driver hands over the cash less the fees.
The amount is computed, never sent: the shipments' frozen codAmount and driverFee give sum(codAmount), sum(driverFee) or their difference. The payment, its lines and the driver's counters are one atomic write; a part already settled — even by a payment recorded at the same moment — refuses the whole payment.
createdBy and createdByName come from the authenticated user.
Create driver payment › Request Body
driverIdThe UUID of the driver receiving or making the payment
type'cod_remittance' (the driver hands over the cash collected), 'fee_payment' (the store pays the driver's fees), or 'net_settlement' (both at once: the cash less the fees)
shipmentIdsThe driver's delivered shipments this payment settles
notesInternal notes about this payment record
Create driver payment › Responses
Payment recorded. Returns the new payment record.
List driver payment history
All payment records of a driver, newest first; an empty array when there are none or the driver does not exist.
path Parameters
driverIdUUID of the driver
UUID of the driver
List driver payment history › Responses
Payment history
successList shipments awaiting settlement
The driver's delivered shipments with a part still to settle — the cash (codPaymentId null), the fee (feePaymentId null), or both — newest delivery first. Use it to prepare a payment.
path Parameters
driverIdUUID of the driver
UUID of the driver
List shipments awaiting settlement › Responses
Shipments awaiting settlement (empty array when none)
success