Proposed integration approach

Sator Tracking ↔ E-Certificate

Based on the API document you shared, this is the approach we suggest for connecting the two systems. It keeps your existing certificate endpoints and clarifies vehicle lookup, authentication, pricing, and the IremboPay checkout flow.

Version 1.0.0 23 September 2026 Sator Systems · Kigali Bearer token

1. Introduction

Thanks for sharing the API document. The certificate endpoints already cover most of the flow we need. The main point we suggest adjusting is authentication: this integration is server-to-server, so it should not depend on an individual customer's username and password.

POST /tracking/sign could technically work if it uses a dedicated integration account and has a documented token-expiry or refresh process. A service Bearer token is simpler and safer for both systems, so that is the preferred option below.

Current API documentSuggested integration approach
User signs in with username and password Each backend sends Authorization: Bearer <token>
Token tied to a logged-in user A credential tied to the Sator Tracking integration, not one employee
Session expires, sign-out, change password A service token, or a documented token refresh flow
A customer signing in Sator Tracking backend talking to e-certificate backend

People continue to sign in to Sator Tracking as they do today. Integration credentials stay on the servers. The dashboard only receives the public IremboPay fields: publicKey and invoiceNumber.

2. Authentication

Our preferred option is a Bearer token issued specifically for the integration. In that setup, these user-account operations are not part of the integration flow:

Both systems use the standard header:

Authorization: Bearer <partner_token>
Who calls whomWhich token
You → Sator Tracking (is this vehicle in our system?) Sator Tracking provides an integration token, shared through a secure channel.
Us → you (prices, start payment, PDF) E-certificate provides a service token, or dedicated service-account credentials with token refresh details.

Wrong or missing token → 401

{
  "success": false,
  "message": "Unauthorized"
}

3. Who does what

Sator TrackingE-certificate
Check the vehicle exists (plate, IMEI, chassis, owner) Templates and the rate for each allowed period
Display the amount returned by the e-certificate API Create the IremboPay invoice on your merchant account
Open the IremboPay widget in our dashboard Take the payment and issue the official PDF
Wait until paid, then show the PDF If our vehicle lookup returns 404, do not issue
The suggested ownership is simple: e-certificate remains responsible for IremboPay and the official certificate, while Sator Tracking provides the vehicle data. For new vehicle lookups, the proposed endpoint is GET /api/v1/vehicle/{key}.

4. Price and period

The e-certificate system should remain the source of truth for pricing. Sator Tracking will not calculate the certificate amount or keep a separate hardcoded rate.

The customer selects one of the period-and-rate options returned by the templates API. Sator Tracking sends the selected period and the selected templateId to POST /certificates. The e-certificate API then returns the final amount and currency. That returned amount is what Sator Tracking displays and what the IremboPay invoice charges.

ValueSource
Certificate templatesE-certificate templates API
Allowed periods and their ratesE-certificate templates API
Final amount and currencyPOST /certificates response

5. Payment flow

From the customer clicking Renew to having a PDF:

Customer opens Renew in Sator Tracking dashboard → GET e-cert templates (template + rate per allowed period) → Customer selects a template and one of its period rates → GET Sator Tracking /api/v1/vehicle/{key} (must be 200) → POST e-cert /certificates (templateId + period) → E-cert determines the amount and creates the IremboPay invoice → Returns final amount + currency + invoiceNumber + publicKey + widgetScriptUrl → Sator Tracking displays the returned amount without recalculating it → Dashboard: IremboPay.initiate({ publicKey, invoiceNumber }) → Customer pays in the IremboPay widget → Irembo notifies e-certificate (your merchant) → GET e-cert /certificates/references/{referenceId} 201 pending · 200 paid + certificateNumber → GET e-cert /certificates/{certificateNumber} (PDF)
ItemValue
Sator Tracking base URLhttps://dapi.satorrwanda.rw
E-certificate base URLTo be confirmed for host 165.232.70.85
Content-Typeapplication/json
CurrencyRWF

6. Sator Tracking vehicle API

The e-certificate backend can use this endpoint to confirm that a vehicle exists in Sator Tracking.

6.1 Get vehicle by key

This can replace the separate /vehicles/plateNumber/{plateNumber} and /vehicles/serialNumber/{serialNumber} calls in the shared document.

GET /api/v1/vehicle/{key}

{key} can be the plate, the IMEI / device serial, or our numeric vehicle id. If the plate has spaces, encode them (RAD%20292%20T). It has to match how we stored it.

Header: Authorization: Bearer <sator_token>

200: vehicle exists

{
  "success": true,
  "data": {
    "id": 42,
    "make": "TOYOTA",
    "imei": "352544071445473",
    "plate_number": "RAD 292 T",
    "chassis_number": "YVZE4C4A7WB20794",
    "vehicle_type": "van",
    "status": "online",
    "tenant": {
      "id": "...",
      "name": "Karinda DESIRE",
      "contact_email": "owner@example.com",
      "phone": "078xxxxxxx",
      "address": "Kigali"
    }
  }
}
E-certificate vehicle fieldFrom this response
plateNumber / registrationNumberdata.plate_number
imeiNumber / deviceSerialNumberdata.imei
chassisNumberdata.chassis_number
makedata.make
typedata.vehicle_type
ownerNamesdata.tenant.name
ownerTelephoneNumberdata.tenant.phone
ownerEmaildata.tenant.contact_email

404 vehicle is not registered in Sator Tracking; certificate issuance should stop.
409 more than one vehicle matched that key.
401 bad token. 400 invalid key.

{ "success": false, "message": "Vehicle not found" }

The response includes chassis_number. The current search keys are plate, IMEI, and numeric id. Search by chassis can be added if it is required by the integration.

7. Proposed use of the e-certificate APIs

The existing resource paths can remain as documented. For automated calls, we suggest service authentication as described in section 2. To open checkout in the Sator Tracking dashboard, the response from POST /certificates would also need the public IremboPay fields: IremboPay.initiate({ publicKey, invoiceNumber }).

7.1 Templates and rates by period

Sator Tracking uses this endpoint to load the certificate choices. Each template returns its allowed periods together with the rate for each period, so no price calculation is required in Sator Tracking.

GET /certificates/certificate-templates/countries/{countryId}

Header: Authorization: Bearer <ecert_token>

[
  {
    "id": "temp001",
    "name": "GPS tracking certificate",
    "currency": "RWF",
    "periodRates": [
      { "period": 1, "amount": 2000 },
      { "period": 3, "amount": 5500 },
      { "period": 6, "amount": 10000 }
    ]
  }
]
period is the certificate duration in months, and amount is the complete rate for that period. Points to confirm: the available period-rate options and which countryId and issuer values apply to Rwanda. POST /certificates returns the final amount again before payment.

7.2 Certificates for a vehicle

GET /certificates/vehicles/{plateNumber}

Encode the plate if it has spaces. We use this to show what is already issued and when it expires.

Same array as in your document: certificateNumber, expiryDate, paymentStatus, status, period, and so on.

7.3 Start buy / renew

In the proposed flow, this endpoint creates the IremboPay invoice on the e-certificate merchant account. The e-certificate backend determines the final amount using its own pricing rules and returns it to Sator Tracking.

POST /certificates

Request

{
  "vehicle": {
    "ownerNames": "Karinda DESIRE",
    "registrationNumber": "RAD 292 T",
    "plateNumber": "RAD 292 T",
    "make": "TOYOTA",
    "chassisNumber": "YVZE4C4A7WB20794",
    "deviceSerialNumber": "352544071445473",
    "imeiNumber": "352544071445473",
    "ownerTelephoneNumber": "078xxxxxxx",
    "ownerEmail": "owner@example.com",
    "type": "van",
    "simNumber": "078xxxxxxx"
  },
  "issuer": 1,
  "paymentMethod": "MOBILE",
  "period": 3,
  "templateId": "temp001",
  "referenceId": "550e8400-e29b-41d4-a716-446655440000",
  "requestId": "6ba7b810-9dad-11d1-80b4-00c04fd430c8"
}
FieldNotes
referenceIdA UUID generated by Sator Tracking and used to check payment status.
requestIdAn idempotency UUID. Repeating the same value should return the original result rather than create another certificate.
periodMonths, 1–6.
templateIdFrom your templates endpoint.
Invoice contactUse vehicle.ownerNames, vehicle.ownerTelephoneNumber, and vehicle.ownerEmail. A separate customer object is not required.
paymentMethodMOBILE like in your document (MoMo / Irembo checkout).

200: suggested response when the invoice is ready. These additional fields allow Sator Tracking to open the IremboPay widget:

{
  "referenceId": "550e8400-e29b-41d4-a716-446655440000",
  "amount": 5500,
  "currency": "RWF",
  "period": 3,
  "invoiceNumber": "IPAY-XXXX",
  "publicKey": "<your IremboPay public key>",
  "widgetScriptUrl": "https://dashboard.irembopay.com/assets/payment/inline.js",
  "locale": "EN"
}

The dashboard uses only these public fields. The IremboPay secret key remains on the e-certificate server:

IremboPay.initiate({
  publicKey,
  invoiceNumber,
  locale: IremboPay.locale.EN,
  callback: function (err) { /* then poll 7.4 */ }
});

7.4 Payment status

The e-certificate system issues the certificate after receiving payment confirmation from IremboPay. Sator Tracking checks the status through this endpoint instead of checking settlement directly with IremboPay.

GET /certificates/references/{referenceId}

Following the shared document, Sator Tracking can check about 5 seconds after checkout closes, then retry up to 3 times at 10-second intervals.

CodeMeaning
201Payment pending; retry
200Paid; body includes certificate.certificateNumber
FailedPayment failed. The shared document uses 401; we should confirm whether this remains the intended application-level response.
{
  "code": 200,
  "description": "Payment done successfully",
  "certificate": {
    "certificateNumber": "CERT-...."
  }
}

An optional signed payment webhook from e-certificate to Sator Tracking would reduce polling, but it is not required for the first integration.

7.5 Official certificate PDF

GET /certificates/{certificateNumber}?check=true

Suggested response: the PDF file with Content-Type: application/pdf.

The existing send=true email option can remain. Sator Tracking can also fetch the file and present it in the dashboard.

8. Errors

JSON is enough. Please do not send stack traces.

{ "success": false, "message": "Vehicle not found" }
HTTPMeaning
400Validation
401Missing or bad Bearer token
404Vehicle or certificate not found
409More than one match, or we sent the same requestId twice
429Rate limit

9. Integration details to confirm

  1. The full base URL on 165.232.70.85 (HTTPS, port, and any path prefix).
  2. Authentication choice: service Bearer token, or dedicated /tracking/sign credentials with token expiry and refresh details.
  3. countryId, issuer, and templateId for Rwanda.
  4. Which period-rate options apply to each certificate template.
  5. Whether POST /certificates can return invoiceNumber, publicKey, widgetScriptUrl, and the final amount.
  6. Test credentials and two or three sample plates.
  7. Whether a payment-confirmed webhook is available or polling should remain the only confirmation mechanism.

Sator Tracking will share its vehicle-lookup token through a separate secure channel.

10. Testing after integration

Once both sides are connected in the test environment, we can verify the complete flow together using a known Sator Tracking vehicle and an IremboPay sandbox payment.

  1. Use a known plate to confirm the vehicle lookup returns 200 and the expected vehicle details.
  2. Try an unknown plate and confirm the lookup returns 404.
  3. Call an endpoint without the Bearer token and confirm it returns 401.
  4. Load the certificate templates and confirm each allowed period and its rate match the e-certificate system.
  5. Select a template and period, then confirm Sator Tracking displays the final amount and currency returned by the API without recalculating them.
  6. Open the IremboPay widget and complete a sandbox payment.
  7. Check the payment reference. It may return 201 while pending, followed by 200 with the certificate number.
  8. Download the PDF using the certificate number and verify the vehicle, price, issue date, and expiry date.
  9. Repeat the request with the same requestId and confirm that a second certificate is not created.