Vehicle Financing Integration

Guide for exposing externally managed vehicle finance records inside oxide-banking.

Guide for exposing externally managed vehicle finance records inside oxide-banking.

This resource does not require a specific vehicle shop framework. The supported integration path is the exported vehicle-loan API in oxide-banking.

Relevant Exports

Use these exports from your vehicle financing resource:

  • RegisterVehicleLoan(...)
  • RecordVehicleLoanPayment(...)
  • CloseVehicleLoan(...)
  • GetVehicleLoan(...)

Intended Flow

Create the financing record

When a financed vehicle sale is created, register the loan with oxide-banking using the player's identifier and the finance metadata your script tracks.

Record installment payments

Whenever your shop resource collects a vehicle finance payment, also record that payment in oxide-banking.

Close the vehicle loan

When the financing is fully repaid, repossessed, or otherwise closed, close the linked banking loan record so it disappears from active loan views.

Config Notes

config/loans.lua includes:

Config.Loans.externalTypes = {
    ['vehicle'] = {
        label = 'Vehicle Financing',
        description = 'Managed by dealership',
        icon = 'fa-car',
    },
}

That external type is what allows vehicle finance records to appear as externally managed loans in the banking UI.

Collections Integration

If you want collateral seizure support, set:

Config.Loans.collections.collateralHandlerResource = 'your-resource-name'

That resource must expose:

SeizeLoanCollateral(citizenid, collateralType, collateralId, loanId) -> boolean

Verification

  1. Create a financed vehicle purchase in your vehicle system.
  2. Register the loan in oxide-banking.
  3. Open the banking UI and confirm the vehicle loan appears in the loan view.
  4. Record a payment and confirm the outstanding balance updates.
  5. Close the loan and verify it leaves the active-loan view.

Recommendation

Keep this integration generic and export-driven. Do not document oxide-banking as depending on a specific qb-* vehicle shop unless your actual vehicle system is hard-wired to one.