# PerfectRide Partner API

> Get PerfectRide riders and fulfil their trips with your own drivers, at your normal prices.

> **Note:** Early access, v1 preview. [Apply for access](https://docs.perfectride.io/docs/get-access) to get sandbox keys. Running a fleet without an app? See [Fleet Connect](https://www.perfectride.io/fleet).

## How it works

1. A rider requests a trip in PerfectRide.
2. PerfectRide asks your API for a quote.
3. If your quote is chosen, PerfectRide books the trip with you.
4. Your driver fulfils it, and you send trip events back.
5. The rider pays in PerfectRide by card or wallet, or pays your driver in cash where agreed, then rates the trip.

> Diagram: PerfectRide sends quote and book requests to your API. Your API sends trip events back to PerfectRide.

For ride-hailing apps with their own drivers and dispatch. We handle booking, payment, support and verification.

## At a glance

|   | Rule |
|---|---|
| Quote | Answer within 2 seconds |
| Auth | `Authorization: Bearer <key>`, both ways |
| Signing | HMAC-SHA256 with a timestamp, 300 second window |
| Money | Integers in kobo, NGN only |
| Time | ISO 8601, UTC |

## From application to live

| Step | What happens |
|---|---|
| 1. Apply | Your platform, cities and daily trip volume |
| 2. Review | We contact selected partners |
| 3. Sandbox | Portal access and sandbox keys. Build against this spec |
| 4. Certification | Pass our test run in the portal |
| 5. Agreement | Business verification and the partner agreement. Your commission is set here |
| 6. Pilot | One city, limited volume, live keys |
| 7. Live | Full access after a successful pilot |

## Downloads

- [OpenAPI 3.1](https://docs.perfectride.io/partner-api/openapi.yaml): Your endpoints, our events and supply URLs
- [Postman collection](https://docs.perfectride.io/partner-api/perfectride-partner-api.postman_collection.json): Signs every request for you
- [Sample server (Node)](https://docs.perfectride.io/partner-api/sample-server.md): Zero dependencies, runs a full trip

## Next

- [Quickstart: your first trip](https://docs.perfectride.io/docs/quickstart.md): Get sandbox keys, answer a quote and a booking, send your first signed event and see it in the portal.
- [Keys and signing](https://docs.perfectride.io/docs/keys-and-signing.md): Which key goes where, and how every request is signed in both directions.
- [Go-live checklist](https://docs.perfectride.io/docs/go-live.md): Everything that must be done before PerfectRide starts your pilot with live riders.

Source: https://docs.perfectride.io/docs
