# RenterCheck Partner API: integration guide

RenterCheck keeps a rental history for every renter in the Philippines, built
from the bookings rental businesses send it. Connect your booking system once:

1. **Every time a booking is created or changes, send it to RenterCheck.**
   RenterCheck saves it to the renter's history and answers with the renter's
   result (verdict, 300-850 score, history counts) on the same call.
2. **Show the result next to the renter** on your booking screen.
3. **Import your past bookings once** so your renters start with a history.

You can hand this whole document to your developer or AI coding assistant.

- Base URL: `https://www.rentercheck.ph/api/v1`
- Get keys: https://www.rentercheck.ph/partners
- Machine-readable spec: https://www.rentercheck.ph/api/v1/openapi.json
- Official libraries (optional): `@rentercheck/sdk` for JavaScript and TypeScript,
  `rentercheck/rentercheck-php` for PHP and Laravel, and a `<rentercheck-badge>`
  element for any web page: https://www.rentercheck.ph/developers/sdks

---

## 1. Keys and test mode

Send your key on every request:

```
Authorization: Bearer rc_test_xxxxxxxx_...
Content-Type: application/json
```

| Key | Prefix | What it touches |
| --- | --- | --- |
| Test | `rc_test_` | Only your own test data. Never real renters. Incidents are validated but not filed. |
| Live | `rc_live_` | Real renter histories and real results. |

Keep keys on your server (an environment variable such as
`RENTERCHECK_API_KEY`). Never put them in a browser or mobile app. You can
create and revoke keys yourself in the partner portal.

Check a key:

```bash
curl https://www.rentercheck.ph/api/v1/ping -H "Authorization: Bearer $RENTERCHECK_API_KEY"
# {"ok":true,"partner":{"name":"Your Rentals"},"mode":"test","verified":false,"countsTowardScores":false,"rateLimitPerMinute":300}
```

### Test numbers

With a test key, these phone numbers always return the same verdict, whatever
the name. Use them to build every badge state:

| Phone | Verdict | Meaning |
| --- | --- | --- |
| `0999 000 0001` | `VERIFIED` | Six clean rentals at three businesses |
| `0999 000 0002` | `NEW` | Booked before, no finished rental yet |
| `0999 000 0003` | `CAUTION` | A report is waiting for review |
| `0999 000 0004` | `FLAGGED` | A verified non-return |
| `0999 000 0005` | `NO_DATA` | Nothing on record |

Any other phone number is answered from the test bookings you sent.

---

## 2. Send a booking (the one call you need)

`POST /bookings`. Call it when a booking is created **and every time it
changes** (status, dates, amount). Sending the same `bookingId` again
updates the booking; it never creates a duplicate.

```json
{
  "bookingId": "BK-1042",
  "renter": {
    "fullName": "Maria Santos",
    "phone": "0917 555 0142",
    "email": "maria@example.com",
    "facebook": "https://facebook.com/maria.santos"
  },
  "status": "confirmed",
  "item": { "name": "Toyota Vios 2022", "category": "VEHICLE_CAR" },
  "startsAt": "2026-11-08T09:00:00+08:00",
  "endsAt": "2026-11-10T09:00:00+08:00",
  "amount": 4500,
  "renterConsent": true
}
```

Required: `bookingId`, `renter.fullName`, at least one of `renter.phone`,
`renter.email` or `renter.facebook`, `status`, `startsAt`, and consent
(`renterConsent: true` or a `consentAt` time).

- **Dates:** ISO date-time with an offset, or a Philippine local date such as
  `2026-11-08` or `2026-11-08 09:00`.
- **Status:** send your own word. RenterCheck understands:
  - `BOOKED`: booked, pending, reserved, confirmed, paid, ready, scheduled, upcoming, approved, awaiting payment, pending payment
  - `ACTIVE`: active, ongoing, in progress, started, picked up, checked in, out, rented, returning, overdue, disputed
  - `COMPLETED`: completed, returned, done, finished, closed, checked out, ended
  - `CANCELLED`: cancelled, canceled, void, voided, rejected, declined, expired, refunded
  - `NO_SHOW`: no show, noshow, did not show, not picked up
- **Category** (optional): `CAMERA_EQUIPMENT`, `CLOTHING_FASHION`, `ELECTRONICS_GADGETS`, `VEHICLE_CAR`, `VEHICLE_MOTORCYCLE`, `VEHICLE_BICYCLE`, `REAL_ESTATE_CONDO`, `REAL_ESTATE_HOUSE`, `REAL_ESTATE_ROOM`, `FURNITURE_APPLIANCES`, `EVENTS_PARTY`, `TOOLS_EQUIPMENT`, `SPORTS_OUTDOOR`, `JEWELRY_ACCESSORIES`, `BABY_KIDS`, `OTHER`.
- **More contact details = better matching.** Phone and email match people
  reliably; a name on its own never does.

Response (`201` when new, `200` when updated):

```json
{
  "booking": { "bookingId": "BK-1042", "created": true, "status": "BOOKED", "countsTowardScore": true },
  "renter": {
    "renterId": "6f1c…",
    "mode": "live",
    "verdict": "VERIFIED",
    "badge": { "label": "Verified by RenterCheck", "detail": "Completed rentals on record and no verified incidents." },
    "score": { "value": 712, "band": "GOOD", "version": "v1" },
    "history": { "completedRentals": 6, "partners": 2, "noShows": 0, "cancellations": 1 },
    "incidents": { "verified": 0, "underReview": 0, "types": [] },
    "match": { "found": true, "confidence": "HIGH", "matchedOn": ["PHONE"], "nameAgrees": true, "warning": null }
  }
}
```

Store `renter.renterId` and `renter.verdict` on your booking if you want to
show them without calling again.

### Renter details and ID documents (optional)

Send more about the renter in the same `renter` object: `address` and
`governmentId` (`{ "type": "Passport", "number": "P1234567A" }`). Attach
the ID photo, driver's license, selfie, or proof of address with
`POST /bookings/{bookingId}/documents` (multipart: `file`, `kind` =
`GOVERNMENT_ID` | `DRIVERS_LICENSE` | `SELFIE` | `PROOF_OF_ADDRESS` | `OTHER`,
optional `idType`). One file per kind per booking; sending a kind again
replaces it. These details help RenterCheck admins verify identities and
review incidents. They are never returned to you or to any other partner.

### Update only the status or dates

`PATCH /bookings/{bookingId}` with any of `status`, `startsAt`, `endsAt`,
`returnedAt`, `amount`:

```json
{ "status": "returned" }
```

### Read a booking back

`GET /bookings/{bookingId}` returns the saved booking and a fresh renter result.

---

## 3. Check a renter without a booking

`POST /renters/check`, for example on an inquiry form or before you accept a
walk-in:

```json
{ "renter": { "fullName": "Maria Santos", "phone": "0917 555 0142" } }
```

The response has the same `renter` shape as above, plus `saved`. If RenterCheck
has never seen this renter, it adds them (`"saved": true`) so their future
bookings anywhere join the same record. A renter with no history returns
`"verdict": "NO_DATA"`.

### What the verdicts mean

| Verdict | Show | Meaning |
| --- | --- | --- |
| `VERIFIED` | Verified by RenterCheck | Completed rentals on record, no verified incidents |
| `NEW` | Known to RenterCheck | Booked before, no finished rental yet |
| `CAUTION` | Report under review | A report is waiting for review or the renter's reply |
| `FLAGGED` | Verified incident on record | RenterCheck verified at least one incident |
| `NO_DATA` | No data found on RenterCheck | Nothing on record yet |

If `match.warning` is not null, show it: the contact details matched a renter
under a different name, so staff should check the renter's ID.

---

## 4. Import past bookings

`POST /bookings/batch` with up to 200 bookings in the same shape as `/bookings`:

```json
{ "bookings": [ { "bookingId": "BK-0001", "...": "..." }, { "bookingId": "BK-0002", "...": "..." } ] }
```

Valid bookings are saved even when others in the batch are invalid. The
response lists `results` and `errors` (with the index and field) and uses
status `207` when some failed. Send batches one after another, oldest first.

---

## 5. Report an incident

When a rental ends badly (non-return, unpaid balance, damage, no-show):

`POST /incidents`

```json
{
  "externalIncidentId": "INC-77",
  "externalBookingId": "BK-1042",
  "renter": { "fullName": "Maria Santos", "phone": "0917 555 0142", "email": "maria@example.com" },
  "incident": {
    "type": "UNPAID_BALANCE",
    "date": "2026-11-10",
    "amount": 6200,
    "summary": "Returned a day late with fuel at 1/4. Agreed to pay by GCash, then stopped replying."
  },
  "attestation": { "truthful": true }
}
```

Types: `NON_RETURN`, `UNPAID_BALANCE`, `DAMAGE_DISPUTE`, `PROPERTY_DAMAGE`,
`FAKE_INFO`, `THREATS_HARASSMENT`, `SCAM`, `LATE_PAYMENT`,
`CONTRACT_VIOLATION`, `ABUSIVE_BEHAVIOR`, `NO_SHOW`, `OTHER`.

RenterCheck sends the renter a private link to respond (7 days by default),
by email or, when there is no email, directly from RenterCheck staff. The link
is never returned to you. An admin checks your proof before the report counts.
Attach proof with `POST /incidents/{id}/evidence` (multipart field `file`,
images or PDF up to 10 MB, optional `type`), and follow the case with
`GET /incidents/{id}`:

```json
{
  "reportId": "3b0e…",
  "externalIncidentId": "INC-77",
  "created": true,
  "reportStatus": "PENDING",
  "appeal": { "status": "AWAITING_RESPONSE", "deadline": "2026-11-17T09:00:00.000Z", "submittedAt": null },
  "outcome": null,
  "decidedAt": null,
  "renterNotified": { "email": true }
}
```

You see whether the renter responded, never what they said.

---

## 6. How to wire it into your system

**Send on every change.** Call `POST /bookings` from the code that saves a
booking: when it is created, confirmed, started, returned, cancelled, or marked
a no-show, and when dates or amount change.

**Do not lose updates.** The safest pattern is an outbox:

1. In the same database transaction that saves the booking, insert its id into a
   `rentercheck_outbox` table (or set a `rentercheck_synced_at = null` flag).
2. Right after the transaction commits, send the booking with `POST /bookings`
   and clear it from the outbox. Do not make the user wait on it: use a short
   timeout and carry on if it fails.
3. A background job (hourly is enough) sends anything still in the outbox.
4. On a network error or a `5xx`, retry later with backoff (1, 5, 30
   minutes...). Because `bookingId` makes the call idempotent, retries are
   always safe.
5. On a `422`, log `error.details` and fix the data. Retrying unchanged data will
   fail the same way.

A database trigger that fills the outbox catches every code path that touches
bookings: your website, your admin, and any marketplace integrations.

**Show the result.** Put the badge next to the renter's name on your booking
list and booking page. Use `renter.verdict` for the color and `renter.badge.label`
for the text, and show `renter.score.value` when it is not null.

**Tell your renters.** Your terms or booking form must say that bookings are
shared with RenterCheck (rentercheck.ph) to build renter histories. Send
`renterConsent: true` only for bookings made under those terms.

### With the official libraries

```ts
// npm install @rentercheck/sdk   (Next.js, Nuxt, Express, Bun, Deno, Workers)
import { RenterCheck } from "@rentercheck/sdk"
const rentercheck = new RenterCheck() // reads RENTERCHECK_API_KEY
const { renter } = await rentercheck.bookings.save({ bookingId: "BK-1042", renter: { fullName: "Maria Santos", phone: "0917 555 0142" }, status: "confirmed", startsAt: "2026-11-08", renterConsent: true })
```

```php
// composer require rentercheck/rentercheck-php   (Laravel auto-registers a facade and <x-rentercheck-badge>)
$result = RenterCheck::bookings()->save(['bookingId' => 'BK-1042', 'renter' => ['fullName' => 'Maria Santos', 'phone' => '0917 555 0142'], 'status' => 'confirmed', 'startsAt' => '2026-11-08', 'renterConsent' => true]);
```

```html
<!-- Any page: show a result your server got from RenterCheck -->
<script src="https://www.rentercheck.ph/sdk/badge.js" defer></script>
<rentercheck-badge verdict="VERIFIED" score="712"></rentercheck-badge>
```

The libraries retry rate limits and server errors, and throw an error with
`status`, `code`, and `details` for anything else. Without a library:

### Node.js / TypeScript

```ts
const RENTERCHECK = "https://www.rentercheck.ph/api/v1"

export async function sendBookingToRenterCheck(booking: {
  id: string; renterName: string; phone?: string; email?: string; status: string
  start: string; end?: string; amount?: number; itemName?: string
}) {
  const response = await fetch(`${RENTERCHECK}/bookings`, {
    method: "POST",
    headers: { Authorization: `Bearer ${process.env.RENTERCHECK_API_KEY}`, "Content-Type": "application/json" },
    body: JSON.stringify({
      bookingId: booking.id,
      renter: { fullName: booking.renterName, phone: booking.phone, email: booking.email },
      status: booking.status,
      item: booking.itemName ? { name: booking.itemName } : undefined,
      startsAt: booking.start,
      endsAt: booking.end,
      amount: booking.amount,
      renterConsent: true,
    }),
  })
  if (response.status === 429 || response.status >= 500) throw new Error("RenterCheck busy, retry later")
  const body = await response.json()
  if (!response.ok) throw new Error(`RenterCheck rejected booking ${booking.id}: ${JSON.stringify(body.error)}`)
  return body.renter // { verdict, badge, score, renterId, ... }
}
```

### PHP (Laravel, WordPress, plain PHP)

```php
function send_booking_to_rentercheck(array $booking): array {
    $ch = curl_init('https://www.rentercheck.ph/api/v1/bookings');
    curl_setopt_array($ch, [
        CURLOPT_POST => true,
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_TIMEOUT => 20,
        CURLOPT_HTTPHEADER => [
            'Authorization: Bearer ' . getenv('RENTERCHECK_API_KEY'),
            'Content-Type: application/json',
        ],
        CURLOPT_POSTFIELDS => json_encode([
            'bookingId' => (string) $booking['id'],
            'renter' => ['fullName' => $booking['renter_name'], 'phone' => $booking['phone'], 'email' => $booking['email']],
            'status' => $booking['status'],
            'startsAt' => $booking['start_date'],
            'endsAt' => $booking['end_date'],
            'amount' => (float) $booking['total'],
            'renterConsent' => true,
        ]),
    ]);
    $body = json_decode(curl_exec($ch), true);
    $status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    curl_close($ch);
    if ($status >= 400) throw new RuntimeException('RenterCheck: ' . json_encode($body['error'] ?? $body));
    return $body['renter'];
}
```

### Python

```python
import os, requests

def send_booking_to_rentercheck(booking: dict) -> dict:
    response = requests.post(
        "https://www.rentercheck.ph/api/v1/bookings",
        headers={"Authorization": f"Bearer {os.environ['RENTERCHECK_API_KEY']}"},
        json={
            "bookingId": str(booking["id"]),
            "renter": {"fullName": booking["renter_name"], "phone": booking.get("phone"), "email": booking.get("email")},
            "status": booking["status"],
            "startsAt": booking["start"],
            "endsAt": booking.get("end"),
            "amount": booking.get("amount"),
            "renterConsent": True,
        },
        timeout=20,
    )
    if response.status_code == 429 or response.status_code >= 500:
        raise RuntimeError("RenterCheck busy, retry later")
    response.raise_for_status()
    return response.json()["renter"]
```

---

## 7. Errors and limits

Errors always look like:

```json
{ "error": { "code": "invalid_request", "message": "…", "details": [ { "path": "renter.phone", "message": "…" } ] } }
```

| Status | Code | What to do |
| --- | --- | --- |
| 400 | `invalid_json` | Send valid JSON. |
| 401 | `unauthorized` | Check the key and the `Bearer ` prefix. |
| 403 | `partner_suspended`, `insufficient_scope` | Contact RenterCheck. |
| 404 | `not_found` | Send the booking first, or check the id and key mode. |
| 422 | `invalid_request` | Fix the fields listed in `details`. |
| 429 | `rate_limited` | Wait and retry. Limit: 300 requests per minute per key. |
| 5xx | `internal_error` | Retry later with backoff. |

## 8. Trust and data rules

- Anyone can connect and go live. Your live bookings are saved immediately, but
  they **count toward renter scores only after your business is verified**
  (complete business verification in your RenterCheck profile). `/ping` shows
  `countsTowardScores`.
- Only send bookings whose renters agreed to share them with RenterCheck.
- Responses never contain a renter's name, phone, email, Facebook, or birth
  date, even ones you sent. You get statuses, counts, a score, incident types
  with their review status, and RenterCheck's opaque `renterId`.
- Results never reveal which businesses a renter used, incident dates or
  amounts, what another business reported, or what a renter said in response.
- Matching uses phone, email, and Facebook. Placeholder values such as "000",
  "none", or a sample number are ignored.
- Every request is logged against your key (without renter details) and shown
  in your partner portal.
