TrustRide does not integrate a payment gateway. Instead, it uses a manual bank transfer workflow that matches how intercity travel payments already work in Nigeria — riders transfer money directly to a bank account and provide proof. This approach eliminates gateway fees, works without card infrastructure, and supports riders who prefer cash-based banking.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Muhammadbugaje/trustride/llms.txt
Use this file to discover all available pages before exploring further.
Payment Philosophy
After a rider books a seat, the platform presents the driver’s (or admin’s) bank details on the booking success page and inside the booking chat thread. The rider completes the transfer through their bank’s mobile app or USSD, then uploads a screenshot or photo of the receipt. The driver reviews the receipt and confirms or rejects the payment — no intermediary holds funds at any point. Thepayment_destination setting in AppSetting controls whether riders pay into the driver’s personal account or a central platform account configured by the admin.
Receipt Upload Flow
Rider receives bank details
Immediately after booking, the system generates an automatic chat message in the booking thread containing the bank name, account number, and account holder name. The same details appear on the booking success page (
/booking-success/<uuid>/).Rider completes the bank transfer
The rider transfers the exact fare amount shown for their seat(s) to the provided account. The total is calculated as
price_per_seat × number_of_seats.Rider uploads the receipt
The rider uploads a JPEG, PNG, or PDF proof of payment (max 5 MB) via the booking chat. Uploading the receipt changes the booking status from A system chat message is posted to notify the driver that the receipt is awaiting review.
reserved to pending_verification.Driver Approval
Once the driver is satisfied that the transfer is legitimate, they confirm the payment. This can be done from two places: From the trip management page (HTMX-enhanced row action):- Set
booking.statustoconfirmed - Record
booking.confirmed_at = timezone.now() - Send a booking confirmation email with a QR e-ticket to the rider
- Create an in-app
Notificationfor the rider - Post a system chat message confirming the approval
A second approval path —
POST /chat/verify-payment/<uuid:booking_id>/ — exists in the chat app’s URL configuration but currently routes to views.coming_soon while the full chat feature is pending activation. Use /booking/<uuid:booking_id>/approve/ for all payment confirmations.Refund Flow
Rider requests a refund
A rider with a A
confirmed booking can request a refund by submitting a reason. Refundable bookings are those whose trip has not yet departed.Refund record is created with status requested. The driver receives a notification.Driver reviews the request
The driver sees all pending refund requests at
/driver/refunds/. They can approve or reject each one.Refund is processed
On approval, the
Refund.approve() method runs inside an atomic transaction:- Sets
refund.status = 'approved' - Increments
trip.available_seatsby 1 - Deletes the
Bookingrecord (the booking UUID is preserved on theRefundfor auditing viabooking_uuid) - Notifies the next rider on the waitlist
Refund Status Choices
| Status | Meaning |
|---|---|
requested | Rider has submitted a refund request; awaiting driver response |
driver_responded | Driver has reviewed but escalated to admin |
admin_review | Admin is reviewing the dispute |
approved | Refund granted; booking deleted and seat released |
rejected | Driver or admin declined the refund |
partial | A partial amount was refunded (admin-initiated) |
The refund policy page is available at
/refund-policy/. Riders are encouraged to review it before requesting a refund.Payout Model
ThePayout model tracks what the platform owes each driver after deducting the platform commission. Payouts are created and managed by the admin.
Payout Fields
| Field | Type | Description |
|---|---|---|
driver | FK | The driver receiving the payout |
amount | decimal | Gross amount collected from riders for this payout period |
commission | decimal | Platform commission rate as a percentage (0–100) |
net_amount | decimal | Amount actually paid out to the driver |
status | choice | pending, processing, completed, failed, or cancelled |
reference_number | string | Bank transaction reference for reconciliation |
processed_date | datetime | When the payout was sent to the driver’s account |
notes | text | Internal admin notes about the payout |
bookings | M2M | The individual bookings included in this payout period |
Net Amount Formula
Thenet_amount is calculated automatically on save if not explicitly provided:
Commission Structure
Each driver’s commission rate is stored on theirUser model as commission_rate. This rate is applied at payout time — not at the moment of booking. The admin creates payout records after confirming that bookings have been completed, using the driver’s current rate to calculate the net amount.
Payment Reference
EachBooking has an optional payment_reference field (up to 100 characters) for storing the bank transfer reference number that the rider provides. This helps drivers and admins cross-check receipts against bank statements during verification.