Payments (Stripe + Finix)
The Portal supports two payment processors, split by region:
- Stripe — UK payments (GBP)
- Finix — US payments (USD)
Both are used for purchasing boost credits — paid house promotion credits that landlords buy to increase their listing visibility.
StripePaymentService
File: app/Services/StripePaymentService.php
Package: stripe/stripe-php
Configuration
STRIPE_SECRET_KEY=sk_...The API key is read directly via env('STRIPE_SECRET_KEY') in the constructor.
Methods
createPaymentIntent($quantity, $price)
Creates a Stripe PaymentIntent for boost credit purchases.
- Amount:
$price(in pence, pre-calculated by caller) - Currency:
gbp - Description:
"$quantity Boost Credits" - Payment methods: Card only
Returns the Stripe PaymentIntent object. The client-side Stripe.js SDK completes the payment flow.
FinixPaymentService
File: app/Services/FinixPaymentService.php
Configuration
FINIX_API_URL=https://finix.sandbox-payments-api.com/ # or production URL
FINIX_USERNAME=
FINIX_PASSWORD=
FINIX_MERCHANT_ID=All values read via env() directly.
Methods
createPayment($token, $creditsToPurchase, $totalCost)
Handles the full Finix payment flow for boost credit purchases:
- Create Identity — Creates a Finix identity with the user’s name, email, and phone
- Create Payment Instrument — Tokenizes the payment method using the client-provided token
- Create Authorization — Authorizes the payment amount
- Capture Payment — Captures the authorized amount
- Amount:
$totalCost * 100(converted to cents) - Currency:
USD - Authentication: HTTP Basic Auth with Finix credentials
Throws an exception if the capture state is not SUCCEEDED.
finixRequest($endpoint, $body) (private)
Helper for making authenticated POST requests to the Finix API.
BoostService
File: app/Services/BoostService.php
The BoostService orchestrates the boost credit purchasing flow, using either StripePaymentService or FinixPaymentService depending on the region.
Key Methods
getDeals()— Returns available boost credit packages (excluding single-credit purchases)getBoostBalance()— Returns the current boost credit balance for the logged-in user/company- Handles boost credit application to houses, expiry tracking, and transaction recording
Related Models
Boost_credit— Active credits applied to houses (withapplied_atandexpiry_at)Boost_credit_price— Pricing tiers for credit packagesBoost_transaction— Purchase transaction records
Payment UI
The payment interface is a Livewire modal:
app/Http/Livewire/Landlord/PaymentModal.php— Handles payment form displayapp/Http/Livewire/Landlord/Boosts.php— Boost dashboard wrapperapp/Http/Livewire/Landlord/BoostDeal.php— Package selection
The payment modal renders either Stripe Elements (UK) or Finix’s tokenization (US) based on config('app.USA').
Important Note
Per the Housr architectural decisions, new payment integrations should use RyftPay, not Stripe or Finix. The existing Stripe/Finix integrations are legacy and specific to the boost credits feature.