Skip to Content
Housr PortalServicesPayments (Stripe + Finix)

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:

  1. Create Identity — Creates a Finix identity with the user’s name, email, and phone
  2. Create Payment Instrument — Tokenizes the payment method using the client-provided token
  3. Create Authorization — Authorizes the payment amount
  4. 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
  • Boost_credit — Active credits applied to houses (with applied_at and expiry_at)
  • Boost_credit_price — Pricing tiers for credit packages
  • Boost_transaction — Purchase transaction records

Payment UI

The payment interface is a Livewire modal:

  • app/Http/Livewire/Landlord/PaymentModal.php — Handles payment form display
  • app/Http/Livewire/Landlord/Boosts.php — Boost dashboard wrapper
  • app/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.

Last updated on