RideWiseCore Docs

Quickstart

Go from a new account to your first matched ride in a few minutes.

This guide takes you from sign-up to a completed match: one agent goes online, a ride is requested, and the agent accepts it.

Base URL

The examples use RWC_API_URL for the RideWiseCore API base URL and RWC_API_KEY for your API key. Set both as environment variables on your backend.

Create your account

Go to Sign up and enter:

  • Business name: shown in your dashboard and on invoices.
  • Billing contact name and billing contact email: invoices, payment receipts and password-reset emails go to this address. It is also your dashboard login.
  • Password: at least 8 characters.
  • Plan: Core, Pro or Elite. You can change plans later from the dashboard. See Billing & Plans.

Click Continue. Your account isn't created yet at this point.

Verify your email

RideWiseCore emails a 6-digit code to your billing contact email. Enter it on the next screen to create your account. You're logged in straight away and taken to Dashboard → API Keys, and a welcome email with your next steps is sent to the same address.

  • The code expires after 10 minutes, and you get 5 tries.
  • Didn't get it? Click Resend code. You can ask for a new one once a minute, and the old code stops working.
  • If the code expires, start again from the sign-up form.

Copy your API key

Your account comes with an API key, labelled Trial key, and a 14-day free trial, so you can start without a card. On Dashboard → API Keys, click Show or Copy next to it.

To issue more keys, optionally enter a label and click Issue key. See API keys.

Keys you issue are shown once

A key you issue yourself is shown once, when it is created. RideWiseCore can't show it to you again. If you lose one, revoke it and issue a new one.

Add a payment method

Add a card under Dashboard → Payments before the trial ends. Checkout is handled by Dodo Payments. Your plan fee for the current month is charged as soon as the card is saved, then monthly on the 1st. If the trial ends without a card, matching and tracking return 402 Payment Required until you add one.

Store your API key on your backend

Keep the key in your backend's secret store or environment. Never put it in a mobile app, browser code or a public repository.

.env
RWC_API_URL=https://<your-ridewisecore-api-host>
RWC_API_KEY=rwc_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Connect the real-time socket

Agent locations and ride offers travel over Socket.IO. Install the client:

npm install socket.io-client
realtime.ts
import { io } from "socket.io-client";

export const rwc = io(process.env.RWC_API_URL!, {
  auth: { apiKey: process.env.RWC_API_KEY },
});

rwc.on("connect", () => console.log("Connected to RideWiseCore"));
rwc.on("connect_error", (err) => console.error("Connection refused:", err.message));

Put an agent online

Send the agent's location. Once RideWiseCore has a fresh location for an agent with status available, that agent can receive offers.

rwc.emit(
  "agent:location",
  {
    agentId: "agt_1001",
    lat: 40.7128,
    lng: -74.0060,
    status: "available",
    vehicleType: "sedan",
  },
  (ack) => console.log(ack), // { ok: true }
);

An agent who stops sending locations goes offline automatically after 30 seconds, so real agent apps should send a location every few seconds.

Request a match

curl -X POST "$RWC_API_URL/matches" \
  -H "Authorization: Bearer $RWC_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "pickup": { "lat": 40.713, "lng": -74.0055 },
    "vehicleType": "sedan"
  }'

RideWiseCore responds with 202 Accepted and a match whose status is searching. At the same time, your socket receives a ride:offer for the nearest eligible agent.

Relay the offer and the agent's answer

Pass the offer to that agent's app. When the agent answers, send the response back over the socket:

rwc.on("ride:offer", (offer) => {
  // Deliver to the agent app for offer.agentId. They have offer.expiresInMs (15s) to answer.
  // ...then, once the agent taps Accept:
  rwc.emit("ride:respond", {
    matchId: offer.matchId,
    agentId: offer.agentId,
    response: "accept",
  });
});

rwc.on("match:update", (match) => {
  if (match.status === "matched") {
    console.log(`Match ${match.id} assigned to ${match.matchedAgentId}`);
  }
});

That's a full round trip: your passenger now has an agent.

Next steps

On this page