How it works
Five steps, three calls.
- 1A rider requests a trip in PerfectRide.
- 2PerfectRide asks your API for a quote.
- 3If your quote is chosen, PerfectRide books the trip with you.
- 4Your driver fulfils it, and you send trip events back.
- 5The rider pays in PerfectRide or in cash, then rates the trip.
PerfectRide
rider app
Your API
your drivers
Getting started
From application to live.
- 1
Apply
Your platform, cities and daily trip volume
- 2
Review
We contact selected partners
- 3
Sandbox access
Sandbox keys; build against this spec
- 4
Certification
Pass our test suite
- 5
Verification & agreement
Business verification and partner agreement
- 6
Pilot
One city, limited volume
- 7
Live
Full access after a successful pilot
What certification checks10 tests
- Quote returned within 2 seconds
- Trip completed, paid in PerfectRide
- Trip completed, paid in cash
- All trip events sent in the correct order
- Cancellation by the rider and by the driver
trip.no_driversent when no driver is available- Ratings in both directions
- Duplicate requests handled with
Idempotency-Key - Webhook signatures sent and verified
- Settlement report matches completed trips
Basics
Conventions used everywhere.
| Topic | Rule |
|---|---|
| Direction | You host the endpoints; PerfectRide calls them. You send events to us by webhook. |
| Authentication | Authorization: Bearer <api_key>, both directions |
| Webhook signing | HMAC-SHA256 of the raw body, in X-PR-Signature |
| Idempotency | Create and cancel requests include Idempotency-Key; repeats must not create duplicates |
| Money | Integers in kobo. 1000000 = ₦10,000. NGN |
| Rates | Basis points. 2000 = 20% |
| Time | ISO 8601, UTC |
| Environments | Sandbox and live, separate keys, issued during onboarding |
- DirectionRuleYou host the endpoints; PerfectRide calls them. You send events to us by webhook.
- AuthenticationRule
Authorization: Bearer <api_key>, both directions - Webhook signingRuleHMAC-SHA256 of the raw body, in
X-PR-Signature - IdempotencyRuleCreate and cancel requests include
Idempotency-Key; repeats must not create duplicates - MoneyRuleIntegers in kobo.
1000000= ₦10,000. NGN - RatesRuleBasis points.
2000= 20% - TimeRuleISO 8601, UTC
- EnvironmentsRuleSandbox and live, separate keys, issued during onboarding
Endpoints you implement
You host these six. Tap one for the request and response.
POST/quotesGet a quote. Respond within 2 seconds.
{
"pickup": { "lat": 6.4281, "lng": 3.4219, "address": "1 Admiralty Way, Lekki" },
"dropoff": { "lat": 6.4474, "lng": 3.3903, "address": "Eko Hotel, Victoria Island" },
"ride_class": "standard",
"passengers": 1,
"payment_method": "perfectride"
}{
"quote_id": "q_8f21",
"price": 1000000,
"commission_rate_bps": 2000,
"eta_seconds": 300,
"expires_at": "2026-12-03T10:05:00Z"
}price: what your own app charges for the same trip.commission_rate_bps: your platform commission on this trip.- Quotes should stay valid for at least 2 minutes.
POST/tripsBook a trip.
{
"quote_id": "q_8f21",
"pr_trip_id": "pr_55a9",
"rider": { "first_name": "Ada", "masked_phone": "+2347000000123", "pin": "4821" },
"payment_method": "perfectride"
}{ "partner_trip_id": "t_9931", "status": "searching" }| payment_method | Driver collects |
|---|---|
perfectride | Nothing. The rider already paid PerfectRide |
cash | The final fare shown in the app |
perfectrideDriver collectsNothing. The rider already paid PerfectRidecashDriver collectsThe final fare shown in the app
The driver must enter the rider’s pin to start the trip.
POST/trips/{partner_trip_id}/cancelCancel a trip.
{ "reason": "rider_cancelled" }{ "status": "cancelled", "cancellation_fee": 0 }GET/trips/{partner_trip_id}Get a trip. Used if a webhook is missed.
Returns the current status, driver, vehicle and fare.
POST/trips/{partner_trip_id}/ratingReceive the rider's rating and tip.
{ "stars": 4, "tags": ["on_time", "clean_car"], "comment": "Great driver", "tip": 50000 }Tags: on_time clean_car safe_driving polite good_route late unsafe_driving wrong_route overcharged asked_for_cash rude
GET/settlements?date=2026-12-03Settlement report. One row per trip for the day.
{
"date": "2026-12-03",
"trips": [
{
"pr_trip_id": "pr_55a9",
"partner_trip_id": "t_9931",
"final_price": 1000000,
"commission_rate_bps": 2000,
"payment_method": "cash",
"cash_collected": 1000000,
"tip": 0,
"status": "completed"
}
]
}Events you send
To the webhook URL we give you at onboarding.
Every event includes event, partner_trip_id, pr_trip_id and occurred_at.
| Event | When | Also send |
|---|---|---|
trip.driver_assigned | A driver accepts | driver, vehicle, eta_seconds |
trip.driver_location | Every 10 s before pickup, every 30 s during the trip | location |
trip.driver_arrived | Driver at pickup | — |
trip.started | Correct PIN entered | — |
trip.completed | Drop-off | final_price, commission_rate_bps, payment_method, cash_collected, tip |
trip.cancelled | Either side cancels | cancelled_by, reason, cancellation_fee |
trip.no_driver | No driver could be assigned | — |
trip.rider_rated | Driver rates the rider | stars, tags |
trip.driver_assignedWhenA driver acceptsAlso senddriver, vehicle, eta_secondstrip.driver_locationWhenEvery 10 s before pickup, every 30 s during the tripAlso sendlocationtrip.driver_arrivedWhenDriver at pickupAlso send—trip.startedWhenCorrect PIN enteredAlso send—trip.completedWhenDrop-offAlso sendfinal_price, commission_rate_bps, payment_method, cash_collected, tiptrip.cancelledWhenEither side cancelsAlso sendcancelled_by, reason, cancellation_feetrip.no_driverWhenNo driver could be assignedAlso send—trip.rider_ratedWhenDriver rates the riderAlso sendstars, tags
Example: trip.driver_assigned
{
"event": "trip.driver_assigned",
"partner_trip_id": "t_9931",
"pr_trip_id": "pr_55a9",
"occurred_at": "2026-12-03T10:01:12Z",
"driver": { "id": "d_771", "name": "Musa A.", "photo_url": "https://cdn.partner.com/d_771.jpg", "rating": 4.9, "trips": 2140 },
"vehicle": { "make": "Toyota", "model": "Corolla", "color": "Black", "plate": "LND-123-AA" },
"location": { "lat": 6.4301, "lng": 3.4188 },
"eta_seconds": 240
}Example: trip.completed
{
"event": "trip.completed",
"partner_trip_id": "t_9931",
"pr_trip_id": "pr_55a9",
"occurred_at": "2026-12-03T10:24:40Z",
"final_price": 1000000,
"commission_rate_bps": 2000,
"payment_method": "cash",
"cash_collected": 1000000,
"tip": 0
}Events PerfectRide sends you
| Event | Meaning |
|---|---|
driver.paused | A driver is temporarily not eligible for PerfectRide trips (reason, until) |
driver.reinstated | The driver is eligible again |
partner.balance_due | A settlement balance is due |
account.status_changed | Your account moved stage (for example sandbox → pilot) |
driver.pausedMeaningA driver is temporarily not eligible for PerfectRide trips (reason,until)driver.reinstatedMeaningThe driver is eligible againpartner.balance_dueMeaningA settlement balance is dueaccount.status_changedMeaningYour account moved stage (for example sandbox → pilot)
Trip lifecycle
Left to right. Dashed states end the trip early.
- searchingno_driver
- driver_assignedcancelled
- driver_arrivedcancelled
- started
- completed
Errors
What PerfectRide does with each response.
| Code | Meaning | We then |
|---|---|---|
| 400 | Invalid request | Correct it and resend |
| 401 | Invalid or missing key | Stop the integration; both teams alerted |
| 409 | Duplicate Idempotency-Key | Treat it as success |
| 422 | No drivers, or outside service area | Try another provider |
| 429 | Rate limited | Retry after Retry-After |
| 5xx | Server error | Retry once, then try another provider |
- 400MeaningInvalid requestWe thenCorrect it and resend
- 401MeaningInvalid or missing keyWe thenStop the integration; both teams alerted
- 409MeaningDuplicate
Idempotency-KeyWe thenTreat it as success - 422MeaningNo drivers, or outside service areaWe thenTry another provider
- 429MeaningRate limitedWe thenRetry after
Retry-After - 5xxMeaningServer errorWe thenRetry once, then try another provider
{ "error": { "code": "no_drivers", "message": "No drivers available near pickup" } }Technical requirements
| Topic | Requirement |
|---|---|
| Quote response | Under 2 seconds |
| Driver assignment | Within 3 minutes, or send trip.no_driver |
| Event delivery | Within 5 seconds of the event |
| Availability | 99.5% monthly |
| Security | HTTPS only, keys server-side, webhook signatures verified |
- Quote responseRequirementUnder 2 seconds
- Driver assignmentRequirementWithin 3 minutes, or send
trip.no_driver - Event deliveryRequirementWithin 5 seconds of the event
- AvailabilityRequirement99.5% monthly
- SecurityRequirementHTTPS only, keys server-side, webhook signatures verified
Versioning
v1 preview: it may change during early access. After general availability, new fields may appear at any time, so ignore ones you don’t recognise. Breaking changes ship as a new version with 90 days’ notice.