POST/api/v1/passenger/quotesJEKStable
https://api.jek.app
Quote a trip
Resolves Standard Ride places server-side, returns real Wonder quotes and persists the owned, expiring batch before responding.
GET/api/v1/passenger/catalogsJEKStable
https://api.jek.app
Get ride cancellation and evaluation catalogs
Authenticated passenger-trip operation used by the STG Standard Ride flow.
POST/api/v1/passenger/nearbyJEKStable
https://api.jek.app
List nearby taxis
Authenticated passenger-trip operation used by the STG Standard Ride flow.
POST/api/v1/passenger/serviceabilityJEKStable
https://api.jek.app
Check pickup serviceability
Authenticated passenger-trip operation used by the STG Standard Ride flow.
GET/api/v1/passenger/trips/{id}/cancel-previewJEKStable
https://api.jek.app
Preview trip cancellation
Authenticated passenger-trip operation used by the STG Standard Ride flow.
POST/api/v1/passenger/trips/{id}/locationJEKStable
https://api.jek.app
Publish passenger location
Authenticated passenger-trip operation used by the STG Standard Ride flow.
POST/api/v1/passenger/trips/{id}/vehicle-classesJEKStable
https://api.jek.app
Add trip vehicle classes
Authenticated passenger-trip operation used by the STG Standard Ride flow.
POST/api/v1/passenger/trips/{id}/location-quoteJEKStable
https://api.jek.app
Quote a trip location change
Authenticated passenger-trip operation used by the STG Standard Ride flow.
POST/api/v1/passenger/trips/{id}/location-confirmJEKStable
https://api.jek.app
Confirm a trip location change
Authenticated passenger-trip operation used by the STG Standard Ride flow.
POST/api/v1/passenger/trips/{id}/evaluationJEKStable
https://api.jek.app
Evaluate a completed trip
Authenticated passenger-trip operation used by the STG Standard Ride flow.
GET/api/v1/passenger/trips/{id}/related-activitiesJEKStable
https://api.jek.app
List related trip activities
Authenticated passenger-trip operation used by the STG Standard Ride flow.
POST/api/v1/passenger/tripsJEKStable
https://api.jek.app
Create a trip
Accepts batch_id and selected_quote_ids only. Locations and prices are re-read from the caller's unexpired server-owned quote batch.
GET/api/v1/passenger/tripsJEKStable
https://api.jek.app
List my trips
GET/api/v1/passenger/trips/{id}JEKStable
https://api.jek.app
Get a trip
POST/api/v1/passenger/trips/{id}/cancelJEKStable
https://api.jek.app
Cancel a trip
POST/api/v1/passenger/trips/{id}/payJEKStable
https://api.jek.app
Confirm trip payment and dispatch
Records caller-supplied payment confirmation and then creates the Wonder taxi order. It does not charge a payment method.
POST/api/v1/payments/chargeJEKStable
https://api.jek.app
Charge a payment method
GET/api/v1/ride-ordersJEKStable
https://api.jek.app
List ride orders
POST/api/v1/ride-ordersJEKStable
https://api.jek.app
Create a ride order
POST/api/v1/ride-orders/{id}/cancelJEKStable
https://api.jek.app
Cancel a ride order
For a Wonder order id, focus=false previews cancellation, focus=true confirms it, and submit_reason_only=true submits post-cancel feedback. Native UUID orders use the migration dispatcher.
Parameters
- id (path, string, required)
- focus (body, boolean)
- submit_reason_only (body, boolean)
- cancel_type (body, string | number)
- cancel_remark (body, string)
POST/api/v1/me/ridesJEKStable
https://api.jek.app
Request a ride (Make a Wish)
Creates a ride request with optional wish text/audio, analysis metadata and tip. Send vehicle_class_ids to accept several classes at once and be matched by whichever driver turns up first: the selection is priced HERE and the passenger is charged the DEAREST of it, so the fare is covered whichever class arrives. The request's own `fare` is not consulted for a selection — a caller who named its own total would also get to decide which class counted as dearest. Send duration_min alongside it, or the reprice drops the per-minute component and lands under the quote you showed. Refuses a pickup whose service area is fulfilled by PARTNER capacity with 422 `PARTNER_FULFILMENT_REQUIRED`, carrying `fulfilment` and `fulfilment_area`: that market is served by a third party through Wonder, and this lane has no payment gateway to buy it with. Call /api/v1/ride/preflight first to learn which fulfilment applies.
Parameters
- pickup (body, string, required)
- dropoff (body, string, required)
- distance_km (body, number)
- duration_min (body, number)
- vehicle_class_ids (body, uuid[])
- fare (body, number)
- order_type (body, "ride" | "wish")
- card_scheme (body, string)
- quote (body, object)
POST/api/v1/me/street-hail/resolveJEKStable
https://api.jek.app
What a scanned taxi QR is
Body `{qr_content}` — a wonder.taxi sticker or offline meter QR. Answers `{kind: online_meter | offline_meter | virtual_meter, sticker_code, taxi {plate, brand}, meter_order {state, fare, amount_due, currency} | null, settles: jek | wonder, needs_driver_check}`. Never the driver's name or Wonder business. 400 INVALID_CODE, 409 WRONG_ENVIRONMENT / TRIP_FINISHED / NO_DRIVER_ON_METER, 404 TAXI_NOT_FOUND / TRIP_NOT_FOUND.
Parameters
- qr_content (body, string, required)
POST/api/v1/me/street-hail/verify-driverJEKStable
https://api.jek.app
Confirm the driver of a virtual meter
Body `{sticker_code, answer}` — the last word of the driver's English name, or the last character of a Chinese one; `letter` (the legacy app's name, used by docs/68) is accepted for `answer`. Checked on the server. Answers `{verified, proof, attempts_left}`; the proof is valid 10 minutes for this passenger and this taxi. 429 after five wrong answers in 10 minutes. Also served at /api/v1/me/street-hail/virtual-meter/verify-driver.
Parameters
- sticker_code (body, string, required)
- answer (body, string, required)
POST/api/v1/me/street-hail/virtual-meter/verify-driverJEKStable
https://api.jek.app
Confirm the driver of a virtual meter (alias)
Alias of POST /api/v1/me/street-hail/verify-driver at the path docs/68 G3 named — same handler, same body (`answer` or `letter`), same answers.
Parameters
- sticker_code (body, string, required)
- letter (body, string, required)
POST/api/v1/me/street-hail/ordersJEKStable
https://api.jek.app
Make a street-hail trip payable
Body `{qr_content, fare?, tips?, proof?}` (fare/tips/proof for a virtual meter; tip ≤ fare). Re-resolves the QR, then creates — or for a trip this passenger already scanned, returns — a ride of `order_type: street_hail` and answers `{ride_id, settles, amount_due, currency, pay}`. Pay with `POST /api/v1/me/rides/{id}/pay` (`mode: settle`), /pay/wallet or /pay/native-wallet; tip afterwards with /tip. 409 TRIP_TAKEN when another passenger is paying for it; 403 DRIVER_NOT_VERIFIED; 502 METER_ORDER_FAILED.
Parameters
- qr_content (body, string, required)
- fare (body, number)
- tips (body, number)
- proof (body, string)
POST/api/v1/me/street-hail/orders/{id}/priceJEKStable
https://api.jek.app
What paying a street-hail trip this way costs
Body `{payment_method, card_scheme?}` (`card`, `vault-<id>`, `applepay`, `googlepay` or a wallet id). Answers `{settles, currency, fare, tips, discounts[], amount_due, source, locked}`. A JEK-settled trip gets JEK's payment offer for the method (never on the tip), RECORDED on the ride until a payment order exists (then `locked: true`); the pay routes charge it and 409 PAYMENT_OFFER_METHOD_MISMATCH for another method — call again to switch. A Wonder-settled trip answers Wonder's `price_calculator` (`source: wonder`), or the meter amount when OMS does not answer (`source: meter`), and records nothing. Needs `x-jek-env`. 404 NOT_FOUND; 400 INVALID_PAYMENT_METHOD.
Parameters
- id (path, string, required)
- payment_method (body, string, required)
- card_scheme (body, string)
GET/api/v1/me/kashJEKStable
https://api.jek.app
Your JEK Kash balance and history
JEK only (403 JEK_ONLY otherwise), explicit x-jek-env, fresh eKYC and recovered-ledger gate (409 JEK_EKYC_REQUIRED / CARD_RECONCILIATION_PENDING / LEGACY_KASH_BALANCE_API_REQUIRED). `{balance, currency:'HKD', balances[{currency, balance}], entries_currency, entries[{id, kind, currency, amount, balance_after, ref_type, ref_id, reason, created_at}], next_cursor}`, newest first; `?limit` 1–200 (50), `?before` = the previous `next_cursor`. Kash is a rebate on JEK Card spend kept PER CURRENCY (a JPY purchase earns Kash JPY) and pays only for spends in its own currency (docs/84). `balances` is the caller's JEK Card program (x-jek-env); `balance`/`entries` stay the HKD Kash every ride and gift uses, and `?currency=JPY` pages that currency instead. Kinds: earn, redeem, gift_out, gift_in, reverse, adjust, migrate (card rebates are `earn`/`reverse` with `ref_type: card_transaction`). Never topped up, never cash.
Parameters
- limit (query, number)
- before (query, string)
- currency (query, string)
GET/api/v1/me/kash/rulesJEKStable
https://api.jek.app
How JEK Kash is earned and spent
JEK only. `{enabled, classes[{vehicle_type_id, code, name, earn_pct, redeem_allowed}], card_earn_pct, card_earn_pct_by_currency, ride_earn_enabled, ride_redeem_enabled, ride_redeem_cap_pct, gifts_enabled, gift_max_per_message, gift_daily_max, spent_via:['jek_card'], redeemable_on, top_up:false, cash_out:false}`. Kash is earned on JEK Card spend (1% by default, in the spend's currency) and spent through the JEK Card (docs/84); ride rebates, ride-booking redemption (`kash_amount` on `POST /api/v1/me/rides`, OFF by default) and chat gifts are each an operator switch, answered 0 when off. The 85% meter taxi earns 0 and refuses Kash.
POST/api/v1/me/kash/giftsJEKStable
https://api.jek.app
Send JEK Kash to another JEK user
JEK only (403 JEK_ONLY). `{to_user_id | to_phone, amount (HKD, to the cent), request_id}` → 201 `{entry_id, to_user_id, amount, currency:'HKD', balance, replayed}`. `request_id` is the idempotency key: a retry answers 200 with the first gift (`replayed: true`) and moves nothing. Same rules as a Kash gift in chat: Kash on (403 KASH_OFF), at most `gift_max_per_message` per gift and `gift_daily_max` per Hong Kong day (409 KASH_GIFT_LIMIT), never to yourself (400 KASH_GIFT_SELF), never an overdraft (409 KASH_INSUFFICIENT). The recipient must be a JEK member (404 RECIPIENT_NOT_FOUND); a block either way is 403 CANNOT_GIFT. Both sides see it in `GET /api/v1/me/kash` (`gift_out` / `gift_in`, `ref_type: kash_gift`).
Parameters
- to_user_id (body, string)
- to_phone (body, string)
- amount (body, number, required)
- request_id (body, string, required)
POST/api/v1/me/kash/transfersJEKStable
https://api.jek.app
Send Kash to another JEK customer through Wonder
Explicit X-JEK-Env and JEK bearer. {to_user_id, currency, amount (positive decimal string), remark (empty allowed), ref_id (globally unique)}. Server resolves verified parties and calls POST /svc/ts/api/v1/openapi/platform_transfers with type:c2c. 201/200 accepted creation; 202 uncertain/in flight; 409 rejected or reference conflict. The same ref never sends twice.
GET/api/v1/me/kash/transfersJEKStable
https://api.jek.app
List your C2C transfers or read a stored receipt
Explicit X-JEK-Env and JEK bearer. List with ?type=c2c&sender_user_id=<JEK account id> or receiver_user_id (at least one, one must be the caller). Server maps to Wonder users.id; offset defaults 0, limit defaults 10 (1–100). Returns data.{platform_transfers,offset,limit,has_more}. ?ref_id= alone retains the stored creation receipt; no automatic resend.
POST/api/v1/me/explore/device-placesJEKStable
https://api.jek.app
Report places the app's on-device Apple Maps search found
JEK only, signed in (docs/82). `{places: [{name, lat, lng, address?, phone?, url?, category?, apple_id?}]}`, 1–25 items (else 400). An item without a 1–200 char name or a Hong Kong point is dropped, not refused; a url that is not http(s) or is over 500 chars, or an `apple_id` not matching `^[A-Za-z0-9._-]{4,120}$`, drops only that field. `apple_id` is MapKit's `MKMapItem.identifier` (iOS 18+), stored as `apple:<id>`. An `apple_id` counts only within 75 m of the stored place it names (otherwise it is dropped). A place a JEK merchant already is (same name within 75 m) is skipped; a stored Apple place (from a search or a device report, owned by no merchant) of the same key and name, or the same name within 75 m, only has its empty website / phone / address / category filled; a merchant's or a Google place is never filled; anything else becomes a new place shown in Explore to everyone and enriched by the cron after every other place. Daily caps per user and for all users together (`explore.sources.device_reports.per_user_daily_cap` / `global_daily_cap`, HKT day, claimed atomically; a place already reported is free). Answers `{data: {accepted, merged, skipped, capped}}`; `accepted: 0` when the admin switch is off; 429 RATE_LIMITED with `Retry-After`.
Parameters
- places (body, array, required)
GET/api/v1/me/vouchersJEKStable
https://api.jek.app
Vouchers you hold
JEK only. Claimed merchant vouchers, granted ride coupons and gifts. `?status=held|used|expired|transferred|all` (held). Each `{id, kind: merchant_voucher|ride_coupon, source: claim|grant|gift, status, redeem_code (merchant vouchers, shown at the counter), snapshot, expires_at, used_at}`. Book a ride coupon with `user_voucher_id` on `POST /api/v1/me/rides`; give one in chat with kind='voucher' + `metadata.user_voucher_id`.
POST/api/v1/me/vouchers/claimJEKStable
https://api.jek.app
Claim a merchant voucher
JEK only. `{voucher_id}`. Once per person per voucher: 201 on the claim, 200 with the same instance when already claimed. 404 NOT_FOUND, 409 NOT_AVAILABLE / NOT_STARTED / EXPIRED / SOLD_OUT.
Parameters
- voucher_id (body, uuid, required)
GET/api/v1/vouchers/claimableJEKStable
https://api.jek.app
Merchant vouchers that can be claimed now
No sign-in. Published, started, not ended, with quantity left (`remaining`, null = unlimited). `?merchant_id&limit` (≤200).
Parameters
- merchant_id (query, uuid)
- limit (query, number)
GET/api/v1/me/realtimeJEKStable
https://api.jek.app
How to subscribe to live updates for your own orders
Every ride/trip transition is broadcast on Supabase Realtime as a nudge; re-read the order's `/events` with your cursor when one arrives and keep polling as the fallback. Channels are PRIVATE: call `realtime.setAuth(<your access_token>)` and subscribe to `order:ride:{id}` / `order:trip:{id}` with `config: { private: true }` — only the order's owner is admitted. Returns the project URL and the (public) anon key. 503 when realtime is not configured.
POST/api/v1/me/rides/{id}/cancelJEKStable
https://api.jek.app
Cancel the caller's own ride or wish order
Marks the caller's own order cancelled and records the reason in the wish metadata. Returns 409 if the order is already completed/cancelled, if a driver has already accepted it (code WISH_ALREADY_CLAIMED), or if the status changed concurrently (code WISH_CHANGED). No refund transaction is written.
Parameters
- id (path, uuid, required)
- reason (body, string)
GET/api/v1/me/rides/{id}/driver-locationJEKStable
https://api.jek.app
Last known driver location for an order
Rider-facing read of the assigned driver's most recent GPS ping. Poll while the order is accepted / in progress.
Parameters
- id (path, uuid, required)
GET/api/v1/me/rides/{id}JEKStable
https://api.jek.app
Full detail of one of the caller's rides
The single read the trip screen polls. Scoped by id AND user_id — a ride belonging to someone else answers 404, never 403, so ids cannot be probed. The payload is additive: each feature (driver, cancellation, receipt, events, coupons…) contributes one sibling key, while `fare` stays a bare number for compatibility with older app builds.
Parameters
- id (path, uuid, required)
GET/api/v1/me/rides/{id}/cancel-previewJEKStable
https://api.jek.app
Preview cancelling this ride
Answers 'what would happen if I cancelled right now' — whether it is allowed and what it would cost — using the same stored policy and evaluator as POST /cancel, so the preview cannot disagree with the charge. Writes nothing.
Parameters
- id (path, uuid, required)
GET/api/v1/me/rides/{id}/contactJEKStable
https://api.jek.app
Masked contact channels to the assigned driver
How the passenger reaches the driver without either side learning the other's number: a pooled virtual number held for this ride, plus an in-app chat conversation. Offered only while the ride is live; an empty number pool returns 200 with available:false rather than ever exposing the driver's real mobile.
Parameters
- id (path, uuid, required)
POST/api/v1/me/rides/{id}/contactJEKStable
https://api.jek.app
Open a masked contact channel
Parameters
- id (path, uuid, required)
- channel (body, string, required)
DELETE/api/v1/me/rides/{id}/contactJEKStable
https://api.jek.app
Release the ride's masked contact channel
Parameters
- id (path, uuid, required)
POST/api/v1/me/rides/{id}/destinationJEKStable
https://api.jek.app
Change where a ride is going
Re-rides the pricing server-side: the request names where to, never a fare. Only the difference between the old and new route's class price moves — boosts, surcharges and tips on top stay on top — and after a driver has claimed the ride the fare can only go up.
Parameters
- id (path, uuid, required)
- destination (body, object, required)
GET/api/v1/me/rides/{id}/driverJEKStable
https://api.jek.app
Live identity of the assigned driver
Name, plate and rating of the driver working this ride, while they are working it. Gated exactly like /driver-location: caller's own ride only (404 otherwise), and the response goes dark when the trip ends. The permanent record stays on GET /api/v1/me/rides/{id}'s driver block.
Parameters
- id (path, uuid, required)
GET/api/v1/me/rides/{id}/eventsJEKStable
https://api.jek.app
Incremental event feed for a ride
Cursor-keyed replay of what has changed since the client last asked. The realtime nudge is a Supabase Realtime broadcast on `realtime.topic` (`order:ride:{id}`), published on every lifecycle transition; subscribe to it and call this with the cursor when it fires, or poll at `poll_after_ms` without it. Not SSE/websockets: the deployment is a Cloudflare Worker with no long-lived connections. Events carry `at` (when the row says it happened) beside `observed_at`. Also folds in `driver_location`, `remaining_route` (driver → pickup/drop-off, provider route or a labelled straight-line estimate), `timestamps`, and `actions` — including `can_cancel` from the same cancellation policy the detail and cancel endpoints use, and `can_end_trip`.
Parameters
- id (path, uuid, required)
- cursor (query, string)
POST/api/v1/me/rides/{id}/endJEKStable
https://api.jek.app
End a Wish / ride early (passenger)
Only while `in_trip` — the same predicate the detail publishes as `actions.can_end_trip`. Idempotent: a repeat answers the same success with `already: true`. Writes `status=completed`, `completed_at` and `wish.earlyEnd`; the driver's trip count is bumped exactly as their own completion would (never on a test job) and both parties are notified. No money moves (Module A). 409 `not_in_trip` / `already_finished` / `RIDE_CHANGED`.
Parameters
- id (path, uuid, required)
- note (body, string)
GET/api/v1/me/rides/{id}/shareJEKStable
https://api.jek.app
List the rider's trip-sharing links for a ride
Parameters
- id (path, uuid, required)
POST/api/v1/me/rides/{id}/shareJEKStable
https://api.jek.app
Create a secure trip-sharing link
Mints a 256-bit token (returned once, stored hashed) and a public URL (`GET /api/public/v1/trip-shares/{token}`) that serves a minimised live view: phase, short pickup/drop-off labels, driver first name + plate + vehicle, the car's last position while the trip is active, lifecycle times. Never the rider's name/phone, the driver's phone, the fare or addresses beyond the labels. Default TTL 4h (`ttl_ms`, 10 min – 24 h), at most 5 live links per order, revocable. 409 `order_finished` / `too_many_links`.
Parameters
- id (path, uuid, required)
- ttl_ms (body, number)
DELETE/api/v1/me/rides/{id}/shareJEKStable
https://api.jek.app
Revoke trip-sharing links
Every live link on the ride, or one by `?id=`.
Parameters
- id (path, uuid, required)
- id (query, uuid)
GET/api/public/v1/trip-shares/{token}JEKStable
https://api.jek.app
Open a shared trip link (public)
Unauthenticated: the token is the credential. Serves a small HTML page to browsers (auto-refreshes while the trip is active) and the JSON `SharedTripView` to `Accept: application/json` / `?format=json`. Invalid, expired and revoked tokens all answer the same 404. Rate-limited per token.
Parameters
- token (path, string, required)
POST/api/v1/me/rides/{id}/sosJEKStable
https://api.jek.app
Trigger an SOS and notify emergency contacts
Idempotent on `Idempotency-Key` (header or `idempotency_key` body): the same key returns the same event and sends nothing again; without one, presses within a minute collapse. Records the event, mints a share link, and sends one SMS to each VERIFIED emergency contact (optionally narrowed by `contact_ids`) through the configured SMS provider. Every attempt is a `notifications[]` row with a delivery status: `sent`/`failed` with the provider reference, `simulated` on staging without a provider, `skipped:notification_provider_unavailable` elsewhere without one, `skipped:contact_unverified`. 201 on create, 200 on a repeat.
Parameters
- id (path, uuid, required)
- Idempotency-Key (header, string)
- lat (body, number)
- lng (body, number)
- note (body, string)
- contact_ids (body, uuid[])
GET/api/v1/me/rides/{id}/sosJEKStable
https://api.jek.app
SOS events on a ride with delivery audit
Parameters
- id (path, uuid, required)
DELETE/api/v1/me/rides/{id}/sosJEKStable
https://api.jek.app
Mark an SOS resolved
Parameters
- id (path, uuid, required)
- event_id (query, uuid, required)
POST/api/v1/me/rides/{id}/live-activityJEKStable
https://api.jek.app
Register an iOS Live Activity for a ride
Trip-scoped: the ActivityKit push token is bound to this ride only (unique per ride + token; a repeat re-registers). Updates are pushed on every lifecycle transition and an `end` on completion/cancellation/expiry, through APNs when `APNS_*` is configured — `meta.configured: false` means the registration is kept and nothing is faked. 409 `order_finished`.
Parameters
- id (path, uuid, required)
- push_token (body, string, required)
- activity_id (body, string)
- platform (body, string)
GET/api/v1/me/rides/{id}/live-activityJEKStable
https://api.jek.app
The caller's Live Activity registrations on a ride
Parameters
- id (path, uuid, required)
DELETE/api/v1/me/rides/{id}/live-activityJEKStable
https://api.jek.app
End a ride's Live Activities
All of them, or one by `?push_token=`. Sends ActivityKit `end` when APNs is configured.
Parameters
- id (path, uuid, required)
- push_token (query, string)
GET/api/v1/passenger/trips/{id}/eventsJEKStable
https://api.jek.app
Resumable event feed for a Standard Ride
A position in the trip's audit log (`jek_passenger_trip_events`): `?cursor=` is the last event the client saw, the answer is every passenger-visible event after it in log order, and the new cursor is the last one returned. `?refresh=1` first polls Wonder DA (the detail's refresh leg) so one call both advances the trip and reads what moved. The realtime nudge is the broadcast topic `order:trip:{id}`. Payloads are never spread — each event carries `{id,type,source,from,to,at,detail}`.
Parameters
- id (path, uuid, required)
- cursor (query, string)
- refresh (query, string)
POST/api/v1/passenger/trips/{id}/endJEKStable
https://api.jek.app
End a Standard Ride early (passenger)
Only while `in_progress` — the predicate the detail publishes as `capabilities.allow_early_end_trip`. Idempotent (`already: true` on a repeat). Completes the trip on JEK's side (`status`, `completed_at`, `early_end`) and records `trip.ended_early`; Wonder DA has no passenger-side end, so `upstream.ended` is false and `supply_status` keeps following the supplier's order without ever reopening the trip. 409 `trip_not_in_progress` / `trip_changed`.
Parameters
- id (path, uuid, required)
- note (body, string)
POST/api/v1/passenger/trips/{id}/chatJEKStable
https://api.jek.app
Open a chat thread with the driver of a Standard Ride
The Wonder driver must first resolve to a Driver Pro profile (matched by Wonder id or phone; the outcome is remembered on the trip and is what `capabilities.allow_chat` / `allow_chat_reason` report). Opens the same thread model the Wish lane uses, so `/api/v1/me/messaging/*` and the driver's `/api/v1/da/wishes/{id}/messages` serve it. 409 `driver_not_on_jek` / `TRIP_NO_DRIVER` / `TRIP_NOT_LIVE`. `GET` reads the state without opening.
Parameters
- id (path, uuid, required)
GET/api/v1/passenger/trips/{id}/cancel-reasonsJEKStable
https://api.jek.app
The managed cancellation-reason catalog for this trip's stage
The same server-owned catalog the Wish lane uses (`system_configs['ride.cancellation']`), filtered to the trip's stage, with `catalog_version`. `POST …/cancel` accepts `reason_code` (or the legacy numeric `reason_id`); only catalog codes are stored as codes, anything else becomes a note. `GET /api/v1/passenger/catalogs` returns the whole catalog with the same version.
Parameters
- id (path, uuid, required)
POST/api/v1/passenger/trips/{id}/shareJEKStable
https://api.jek.app
Create a trip-sharing link for a Standard Ride
Same contract as `POST /api/v1/me/rides/{id}/share`; `GET` lists, `DELETE` revokes (`?id=` for one).
Parameters
- id (path, uuid, required)
- ttl_ms (body, number)
POST/api/v1/passenger/trips/{id}/sosJEKStable
https://api.jek.app
Trigger an SOS on a Standard Ride
Same contract as `POST /api/v1/me/rides/{id}/sos`; `GET` lists events with delivery audit, `DELETE ?event_id=` resolves.
Parameters
- id (path, uuid, required)
- Idempotency-Key (header, string)
- lat (body, number)
- lng (body, number)
- note (body, string)
- contact_ids (body, uuid[])
POST/api/v1/passenger/trips/{id}/live-activityJEKStable
https://api.jek.app
Register an iOS Live Activity for a Standard Ride
Same contract as `POST /api/v1/me/rides/{id}/live-activity`, plus the token is bound upstream (Wonder DA `bind_apn_token`, best-effort, `upstream_bound`) once the supplier order exists so Wonder's own updates reach the same activity. `GET` lists, `DELETE ?push_token=` ends.
Parameters
- id (path, uuid, required)
- push_token (body, string, required)
- activity_id (body, string)
POST/api/v1/me/rides/{id}/locationJEKStable
https://api.jek.app
Publish the passenger's live position
The mirror of /api/v1/da/location: the passenger shares their fix with the assigned driver, only while a driver is coming. Treated as a home address — caller's own ride only, live window enforced, DELETE stops sharing immediately.
Parameters
- id (path, uuid, required)
- lat (body, number, required)
- lng (body, number, required)
GET/api/v1/me/rides/{id}/locationJEKStable
https://api.jek.app
Read the passenger's shared position / visibility
Parameters
- id (path, uuid, required)
DELETE/api/v1/me/rides/{id}/locationJEKStable
https://api.jek.app
Stop sharing the passenger's position
Parameters
- id (path, uuid, required)
GET/api/v1/me/rides/{id}/ratingJEKStable
https://api.jek.app
Read the rating given for a trip
Parameters
- id (path, uuid, required)
POST/api/v1/me/rides/{id}/ratingJEKStable
https://api.jek.app
Rate a completed trip
Parameters
- id (path, uuid, required)
- rating (body, number, required)
- comment (body, string)
GET/api/v1/me/rides/{id}/related-activitiesJEKStable
https://api.jek.app
Recorded payments for the caller's owned ride or wish
JEK session and explicit X-JEK-Env required. Reads Supabase payment legs matched by user_id, exact metadata.ride_id and metadata.payment_env, after checking parent ride ownership, app scope and exact environment. No Wonder customer login or upstream history call. Returns { data: { ride_id, activities: [{ id, ride_id, purpose, amount, currency, status, occurred_at }] } }. Unavailable storage returns 503; no recorded payments returns an empty list. Private, no-store.
Parameters
- id (path, uuid, required)
GET/api/v1/me/rides/{id}/receiptJEKStable
https://api.jek.app
Itemised receipt for a ride
An itemised account of what the ride cost and what was actually charged, assembled from the transaction rows and the sealed pricing pin stored at booking. It reports; it does not re-price — editing the rate card later cannot rewrite an issued receipt. `format=html` returns the same receipt as a self-contained printable page (text/html, private, no-store) for the app to show, share, or print to PDF on the device; its language is `lang`, else the account's saved language, else English.
Parameters
- id (path, uuid, required)
- format (query, "json" | "html")
- lang (query, "en" | "zh-HK" | "zh-CN" | "ja" | "ko")
GET/api/v1/me/rides/{id}/tipJEKStable
https://api.jek.app
Read the tip left on a trip
Parameters
- id (path, uuid, required)
POST/api/v1/me/rides/{id}/tipJEKStable
https://api.jek.app
Tip the driver after the trip
Adds money for the driver once the trip is finished — the mirror image of /boost, which is only legal while the ride is still waiting. Same ownership check and payment ledger as boost.
Parameters
- id (path, uuid, required)
- amount (body, number, required)
POST/api/v1/me/rides/{id}/payment-orderJEKStable
https://api.jek.app
Open the ride's Wonder payment order (in-app SDK)
Creates ONE Wonder payment order for the ride and returns its `number` plus the `client_secret` the in-app Wonder Payment SDK renders its payment sheet against — no card data, token or 3DS step touches this server. The fare is one `Charge` line and each voucher is a NEGATIVE `Charge` line beside it, so the passenger owes the discounted total and the order itself records why; `jek_rides.fare` is untouched because it is the driver's payout basis. Call it when the passenger is about to pay, not at booking: the client_secret expires in about two hours and Wonder offers no way to mint a second one for an existing order, so a repeat call answers with the order but `client_secret_available: false`. Idempotent by construction — the order is keyed at Wonder on the ride id, and Wonder refuses a duplicate reference, so one ride can never have two orders. 409 FREE_RIDE when a voucher covers the whole fare. Card payment is open on EVERY declared environment — dev and staging hit gateway-stg where no real money moves, while alpha and production share one payment appId and both bill Jek Limited's real merchant record, so alpha is not a rehearsal. Only two things close it: `JEK_RIDE_PAYMENT_ORDERS_ENABLED=0` as an emergency stop, and an environment that has not declared itself, which cannot name the gateway it would bill.
Parameters
- id (path, uuid, required)
GET/api/v1/me/rides/{id}/payment-orderJEKStable
https://api.jek.app
Was the ride paid for? (and record it)
Reads the merchant's own order back from Wonder and, when it reports the money arrived, records the fare leg in jek_payment_charges. THE ORDER IS THE AUTHORITY: a client saying the payment sheet succeeded is a claim, `correspondence_state` on Jek Limited's order is a fact. Safe to poll — the charge row is keyed on the ride and leg, so one payment is recorded once however many times this is called. Answers `{data: null}` when no order has been opened.
Parameters
- id (path, uuid, required)
GET/api/v1/me/couponsJEKStable
https://api.jek.app
List the caller's ride coupons
With no `status`: this app's live coupons, the caller's exhausted ones included with `usable:false` (unchanged). `status=usable` drops the exhausted ones; `status=expired` lists coupons that lapsed in the last 90 days; `status=used` lists the caller's spends newest first, each with `ride_id`, `used_at`, `amount_off`, `fare_before` and `passenger_pays` as charged. Every item carries `state`: usable | used_up | expired | not_started | inactive. Unknown `status` is 400.
Parameters
- status (query, "usable" | "expired" | "used")
GET/api/v1/me/coupons/{code}JEKStable
https://api.jek.app
One coupon with its full rules and the caller's state
Any state — usable, used_up, expired, not_started, inactive — with discount type/value, cap, minimum fare, eligible classes, validity window, terms keys and the caller's usage. Searched in this app's catalogue only; an unknown code (or the other brand's) is 404 `coupon_not_found`.
Parameters
- code (path, string, required)
POST/api/v1/me/couponsJEKStable
https://api.jek.app
Price a coupon against a specific trip
Server-side 'HK$230, less HK$40 = HK$190' for the booking screen: prices the selection from the rate card (the same priceSelection the quote and booking routes use) and applies the coupon rule. The request never carries a fare, so the discount cannot be chosen by the client.
Parameters
- coupon_id (body, uuid, required)
- vehicleTypeId (body, uuid, required)
- distanceKm (body, number, required)
POST/api/v1/passenger/trips/{id}/{action}JEKStable
https://api.jek.app
Trip lifecycle action (driver and passenger)
Multiplexed state-machine action endpoint. Passenger actions and driver actions (arrived, start, end) share the route; the caller's role decides which transitions are allowed.
Parameters
- id (path, uuid, required)
- action (path, string, required)
GET/api/v1/passenger/transactionsJEKDeprecated
https://api.jek.app
Retired passenger history; use JEK self service
Deprecated · Returns 410 WONDER_HISTORY_RETIRED. Use /api/v1/me/rides, /api/v1/me/activity and /api/v1/me/rides/{id}/related-activities with the JEK session and explicit X-JEK-Env.
POST/api/v1/me/ride-booking-requests/resolveJEKStable
https://api.jek.app
Resolve an uncertain ride booking by its original booking key
Returns status found with ride_id, or not_created after durably closing the absent key so a delayed original request cannot create a ride. Scoped to the caller, product and environment. Returns 503 BOOKING_RECOVERY_UNAVAILABLE when the original outcome cannot be confirmed.
Parameters
- X-JEK-Env (header, string, required)
- booking_key (body, string, required)
GET/api/v1/me/payment/cardsJEKStable
https://api.jek.app
List the caller's saved cards, shared with the legacy JEK app
Reads the caller's card vault at the payment gateway for the declared environment and answers `{ customerId, cards, shared_with_legacy }`; card tokens are stripped from every record. A JEK passenger linked (by verified phone) to their legacy JEK account has two payment customers, the legacy app's and this server's own: both are read, each card carries `customer_source` (`legacy` | `jek`), only one default is shown, and `customerId` is the legacy one. `partial: true` when one customer could not be read. The list is also kept in Supabase (`jek_payment_cards`) without card numbers or tokens (docs/75). Where this deployment collects no card payments the answer is an empty list with `collects: false` and `code: PAYMENT_COLLECTION_CLOSED`. 400 `ENV_NOT_DECLARED` without `x-jek-env`.
Parameters
- x-jek-env (header, string, required)
- x-jek-channel (header, string)
POST/api/v1/me/payment/cardsJEKStable
https://api.jek.app
Save a card, or sign an Alipay / WeChat Pay auto-debit agreement
The card number is sealed into the vault envelope and never stored or logged by this server. A passenger linked to their legacy JEK account saves to the legacy app's payment customer, so the card shows in both apps (`card.customer_source`, `shared_with_legacy`). Returns 201 with `state`; when the bank requires 3-D Secure, `verification_required` is true and the app must open `verify_url`, then call POST /api/v1/me/payment/cards/verify with `verify_uuid`. `usable` is false while the card is still pending. With `method: "alipay" | "wechat"` it signs an auto-debit agreement instead, answering in the same shape plus `instrument`, `handoff` and (WeChat) `wechat_session_id`. A refused card or agreement is 402 with the gateway's own message.
Parameters
- x-jek-env (header, string, required)
- x-jek-channel (header, string)
- number (body, string)
- exp_month (body, string)
- exp_year (body, string)
- cvv (body, string)
- holder_name (body, string)
- phone (body, string)
- method (body, string)
- return_url (body, string)
- terminal_type (body, string)
- code (body, string)
- openid (body, string)
- diagnose (body, boolean)
PATCH/api/v1/me/payment/cardsJEKStable
https://api.jek.app
Make a saved card the default
Sets the default card on the payment customer that holds it and confirms it by re-reading the vault. For a passenger shared with the legacy JEK app, a card on the legacy customer becomes the default in both apps. The default is what a fare is charged to when a payment names no card. Answers the updated `{ customerId, cards }`; 409 `CARD_NOT_FOUND` when the card is no longer on the account.
Parameters
- x-jek-env (header, string, required)
- card_id (body, string, required)
DELETE/api/v1/me/payment/cardsJEKStable
https://api.jek.app
Remove a saved card
Removes one card from the payment customer that holds it (the id travels in the body, not the path, because card ids are not URL-safe) and confirms by re-reading the vault. A card shared with the legacy JEK app is removed from both apps. Answers the remaining `{ customerId, cards, removed: true }`; 409 `CARD_NOT_FOUND` when the card is already gone.
Parameters
- x-jek-env (header, string, required)
- card_id (body, string, required)
POST/api/v1/me/payment/cards/verifyJEKStable
https://api.jek.app
Check whether a 3-D Secure or agreement save completed
Called after the passenger returns from the 3-D Secure challenge or the Alipay / WeChat consent page. Re-reads the vault and answers `{ verified, state, card, cards }`. When `return_query` is sent, the auto-debit authorization is applied first and its outcome is reported as `auth_apply`.
Parameters
- x-jek-env (header, string, required)
- verify_uuid (body, string)
- card_id (body, string)
- return_query (body, string)
- diagnose (body, boolean)
GET/api/v1/me/payment/methodsJEKStable
https://api.jek.app
What the merchant accepts, for the payment picker
Describes the collecting merchant, not the caller: `methods`, `merchant`, the raw `rules` (Apple Pay and Google Pay appear there as card entry types, not as methods), `wallets` this build can finish, and `google_pay` tokenization parameters. Nothing is charged. When collection is closed the lists are empty with `collects: false`.
Parameters
- x-jek-env (header, string, required)
- handoffs (query, string)
GET/api/v1/me/payment/outstandingJEKStable
https://api.jek.app
Fares the caller still owes
Finds rides whose settlement failed or is unpaid and confirms each against its live payment order before reporting it, so a fare that has since been taken is never shown as owed. Answers `{ fares: [{ ride_id, amount, currency, vehicle, completed_at }], more, total }`, at most 5 fares; pay one with POST /api/v1/me/rides/{id}/pay.
POST/api/v1/me/rides/{id}/payJEKStable
https://api.jek.app
Hold or take a ride's fare with a saved card
`mode: "authorize"` (default) pre-authorizes the fare at booking; `mode: "settle"` takes what is still outstanding when the trip is over, capturing an existing hold where there is one. Creates the ride's payment order if the booking deferred it. The answer is read back from the order: `held` and `paid` are separate, and a hold is not a payment. 402 `AUTHORIZATION_DECLINED` / `PAYMENT_DECLINED` with the gateway's message; 409 `PAYMENT_ENV_MISMATCH` when the ride's money is at a different environment than the one declared.
Parameters
- id (path, uuid, required)
- x-jek-env (header, string, required)
- mode (body, string)
- saved_card_id (body, string)
POST/api/v1/me/rides/{id}/pay/native-walletJEKStable
https://api.jek.app
Hold a ride's fare with an Apple Pay or Google Pay token
Redeems the one-time token from the OS payment sheet against the ride's payment order as a hold, then releases the `awaiting_payment` ride to drivers. The ride is dispatched only when the order confirms the hold; otherwise 402 `AUTHORIZATION_NOT_HELD`. Retrying after a hold landed answers success with `already` rather than holding twice. The token is never stored or logged.
Parameters
- id (path, uuid, required)
- x-jek-env (header, string, required)
- method (body, string, required)
- token (body, string, required)
- merchant_identifier (body, string)
POST/api/v1/me/rides/{id}/pay/walletJEKStable
https://api.jek.app
Start paying a ride's fare with a wallet app
Settles (never holds) the outstanding fare on WeChat Pay, Alipay, AlipayHK, PayMe, Octopus, FPS or the UnionPay wallet. The payment finishes in the wallet app, so the answer is always `paid: false, pending: true` with a `handoff` telling the client which of `redirect`, `qr`, `sdk_payload` or `wechat_pay` to use; poll GET on this route for the result. `amount` is what was actually charged (Octopus rounds up to the next 10 cents, shown in `rounding`).
Parameters
- id (path, uuid, required)
- x-jek-env (header, string, required)
- method (body, string, required)
- handoffs (body, string[])
- return_url (body, string)
- return_urls (body, object)
- wechat_app_id (body, string)
- app_env (body, string)
GET/api/v1/me/rides/{id}/pay/walletJEKStable
https://api.jek.app
Poll a wallet payment
Reads the ride's payment order and answers `{ order, paid, pending }`. When the order reads paid, the charge is recorded and the ride marked paid on this call. 409 `NO_PAYMENT_ORDER` when no payment has been started.
Parameters
- id (path, uuid, required)
- x-jek-env (header, string, required)
POST/api/v1/me/rides/{id}/end-previewJEKStable
https://api.jek.app
Preview what ending the trip now would settle at
Computes, without ending the trip, the served distance and duration, the final total and any refund or additional charge, and returns them with a signed `preview_ref` and `expires_at` for POST /api/v1/me/rides/{id}/end to spend. The end point is the driver's last reliable position; the passenger's `location` is only a cross-check (`location_agrees`). Answers `allowed: false` with a reason when the trip cannot be ended; `settlement.simulated` is true where no refund rail is live.
Parameters
- id (path, uuid, required)
- location (body, object)
- reason_code (body, string)
PATCH/api/v1/me/rides/{id}/scheduleJEKStable
https://api.jek.app
Move a scheduled ride to another time
Changes the pickup time of the caller's own unclaimed scheduled ride; moves no money and keeps the booked fare (`quote.repriced` is always false, `quote.card_fare` shows today's card price for reference). A ride already released to drivers is taken back out of the pool until its new time (`withdrawn_from_pool`). The new time follows the booking's rules: at least 15 minutes ahead and within 30 days. 409 when a driver accepted in the meantime.
Parameters
- id (path, uuid, required)
- scheduled_at (body, number | string, required)
POST/api/v1/me/rides/{id}/stops-previewJEKStable
https://api.jek.app
Preview a new remaining itinerary and its price
Prices distance already served plus the proposed remaining route from where the car is, without changing the ride. `stops` is the complete list of places still to visit (reached stops are kept automatically and cannot be edited). Returns the route, ETA, stops, `money` (new total, refund or additional charge) and a signed `preview_ref` for POST /api/v1/me/rides/{id}/stops. 409 `PLAN_CHANGED` when `plan_version` is stale.
Parameters
- id (path, uuid, required)
- stops (body, object[], required)
- dropoff (body, object)
- plan_version (body, integer)
POST/api/v1/me/rides/{id}/stopsJEKStable
https://api.jek.app
Commit a previewed itinerary change
Applies exactly what a `preview_ref` from stops-preview carries, without recomputing it. The write is conditional on the plan version, so a concurrent change answers 409 `PLAN_CHANGED` with the current plan instead of being overwritten; an expired preview is refused. Records the revision and the fare difference, and notifies the assigned driver. 400 `PREVIEW_REQUIRED` without a valid preview.
Parameters
- id (path, uuid, required)
- preview_ref (body, string, required)
- idempotency_key (body, string)
- Idempotency-Key (header, string)
DELETE/api/v1/passenger/trips/{id}/locationJEKStable
https://api.jek.app
Stop sharing the passenger's location
Deletes the trip's current passenger fix and clears it from the trip's tracking block, so the driver no longer sees it. Answers `{ ok: true, relayed_to_driver: false }`.
Parameters
- id (path, uuid, required)
DELETE/api/v1/passenger/trips/{id}/shareJEKStable
https://api.jek.app
Revoke trip share links
Revokes one share link when `id` is given, otherwise every share link the caller issued for this trip.
Parameters
- id (path, uuid, required)
- id (query, uuid)
DELETE/api/v1/passenger/trips/{id}/sosJEKStable
https://api.jek.app
Resolve an open SOS
Marks the caller's open SOS event resolved. 404 when no open SOS has that id.
Parameters
- id (path, uuid, required)
- event_id (query, uuid, required)
DELETE/api/v1/passenger/trips/{id}/live-activityJEKStable
https://api.jek.app
End the trip's Live Activity
Ends the iOS Live Activity for this trip, on the device named by `push_token` or on all of the caller's devices. The final phase follows the trip status when it is terminal, otherwise `cancelled`.
Parameters
- id (path, uuid, required)
- push_token (query, string)