Brazil: sponsored rides to a Delegacia da Mulher
Built: 2026-11-03. Written for operators in Brazil, the partners they work with, and whoever maintains the code.
In Brazil, states and cities pay for rides that take women to a Delegacia da Mulher, a police station for women, or to a Casa da Mulher Brasileira. The fare should never stop a woman from reporting violence. A partner hands her a code, for example a reference centre, the Ligue 180 line or a social worker. The code pays only for a trip that ends at one of the sponsor's places.
RideKit does this with sponsored-ride programs and single-use codes. Nothing in it is specific to Brazil: any sponsor and any places work, such as rides to a hospital or a court.
What the operator does (Admin → Sponsored rides)
1. Create a program.
- Name and sponsor. The sponsor is named on the rider's receipt and on the sponsor's statement.
- Share of the fare. 100% means the rider pays nothing, tolls and the fuel line included.
- Most per ride (optional).
- Total budget (optional). When it runs out, the codes stop working.
- Start and end dates. Leave the end empty to run until switched off.
- Places. For each place, enter a name, a point pasted from a map as
latitude, longitude, and a radius (150 m by default). A trip must end inside one of these radii. - Discreet (on by default). The trip is left out of the rider's trip history, so someone else looking at her phone does not find it.
2. Issue codes.
- Choose how many (up to 500), how many days they are valid (up to 366), and an optional note for your own records, such as "CRM Centro".
- Never put a person's name in the note.
- The codes look like
KTGN-WYM6. Their alphabet leaves out look-alikes (0/O, 1/I/L), so they are easy to read out over the phone. - They are shown once: download the CSV for the partner. Only a hash and the last four characters are kept, like wallet vouchers, so a leaked database pays for no trips.
3. Follow it. The programs list shows:
- the rides paid and the amount spent;
- the budget left and the codes still open;
- a status: running, scheduled, ended, off, or budget spent.
Codes lists every code by its last four characters. For each it shows:
- its state: open, in use, used, expired or cancelled;
- where and when it was used, and for how much.
A lost code, or one given to the wrong person, can be cancelled there.
4. Bill the sponsor. Go to Reports → Sponsored trips and pick a month:
- what each sponsor owes;
- a CSV statement per sponsor, listing each trip with its place.
Metro feeder subsidies appear in the same report.
What the rider sees (confirm screen)
While a program is running, the confirm screen shows "Have a sponsored-ride code?" below the payment method.
- She types the code. Any case works, with or without the dash.
- If her destination is one of the places, a green line shows "Paid by Secretaria da Mulher SP", the place, and "won't appear in your trip history". The fare line shows what the sponsor pays, and the button shows what is left for her to pay, usually R$ 0,00.
- If her destination is somewhere else, the sheet lists the program's places. Tapping one makes it her destination and applies the code.
- A code pays alone: not with a promo, not on a company account, not for a parcel or a rental. Applying a promo removes the code, and the other way round.
The sheet also tells her that whoever gave her the code keeps their own record, and that the app does not ask why she is travelling.
How it settles
- At booking, the code is held for her ride, but only if the drop-off is within one of the places. Another booking cannot use it.
- If the ride is cancelled or finds no driver, the code comes back within a minute. The same happens if a booking fails partway.
- At completion, the trip must still end at one of the places. The sponsor's share is then taken off what she pays, within the cap and what is left of the budget. It is drawn from the subsidy receivable, which the sponsor is billed from, exactly like a metro feeder subsidy. The driver earns on the whole fare, and the commission is the usual one.
- If she changed the destination away from the places, she pays the fare and the code goes back unused.
- An old cash balance she owes a driver is collected separately. The sponsor never pays it.
Tested end to end
- API (
sponsored-e2e.mjs, 33 checks):- program and codes;
- check and refusals: wrong place, promo, used, cancelled, program off;
- a sponsored ride where the rider paid R$ 0 and the sponsor paid R$ 13,34 from the receivable, with the driver earning on the whole fare;
- the ride missing from her history, but shown on the receipt;
- the statement line with the place;
- a changed destination;
- a cancelled ride giving its code back.
- Admin in Chrome (
admin-sponsored.mjs):- create a program with two places;
- a bad point refused;
- issue 12 codes and download the CSV;
- the codes list showing only the last four;
- cancel a code.
- Rider app on the iOS simulator (in Arabic, which also covers RTL):
- a code typed for Praça da Sé offered the places;
- picking 1ª DDM Centro re-priced the trip and applied the code, with the button at "Book · R$ 0.00";
- booking held the code;
- the ride found no driver, and the code came back by itself.
For the code
| What | Where |
|---|---|
| Rules: program, place match, share, codes | backend/src/rides/sponsored-rides.ts (+ spec) |
| Programs, codes, check, hold, cover at completion, sweep | backend/src/rides/sponsored-rides.service.ts |
| Hold at booking, discreet history | backend/src/rides/rides.service.ts (book, listForRider) |
| Sponsor's share at completion | backend/src/rides/dispatch.service.ts (complete) |
| Statement | backend/src/geo/geo.service.ts (feederSubsidies, now with the place) |
| API | /admin/sponsored-rides (+ /:id/codes, /codes/:id/void), /rides/sponsored/available, /rides/sponsored/check, voucherCode on POST /rides |
| Storage | migration 178: sponsored_programs, sponsored_vouchers, rides.sponsored_voucher_id, rides.sponsored_discreet |
| Admin | app/(dashboard)/sponsored-rides/page.tsx, 15 languages |
| Rider app | src/components/SponsoredCode.tsx, src/lib/sponsored.ts, confirm screen, 14 languages |
Check before launch. The sponsor's agreement sets the price share, the places, how codes are handed out, and how the operator bills the sponsor. Agree these with the sponsor and their lawyers. Under the LGPD, a trip to a Delegacia da Mulher can reveal sensitive facts about a person. Keep the program discreet, and never record who received a code in RideKit.