💰 How GetSter Money Works

Explained simply — so anyone can understand it.

🎯 The Big Picture

When a customer orders food, they pay one total amount. That total gets split up between different people:

Customer pays 5,720 XAF
  ├─ Restaurant gets their food price
  ├─ Logistics gets the delivery fee (if GetSter delivers)
  ├─ GetSter keeps commission + service fee
  └─ CamPay takes processing fees

Think of it like a pie 🥧 — the customer buys the whole pie, and each person gets their slice.


🧾 What's in the Customer's Bill?

The customer sees these lines at checkout:

Line itemWho gets it
Displayed item price
Base price + markup (if any)
Restaurant gets base price
GetSter keeps markup
Delivery fee
Fixed fee for delivery
Driver or Restaurant
Service fee
% of subtotal
GetSter
Provider fee
CamPay's processing cut
CamPay

📊 All the Fees, Explained

① Commission (5%)
This is GetSter's cut from the restaurant's price. The restaurant sets their food price at 3,000 XAF. GetSter takes 5% = 150 XAF. The restaurant receives 2,850 XAF. The customer never sees this — it happens behind the scenes.

② Service Fee (2%)
This is an extra charge to the customer on top of the food price. It's like a "platform fee" for using GetSter. The customer sees it on their receipt. It goes 100% to GetSter.

③ CamPay Collect Fee (2%)
CamPay (our mobile money provider) charges this when the customer pays. It's the cost of processing the mobile money transaction. By default, the customer pays this (it's added to their total).

④ CamPay Payout Fee (1%)
When we send money TO the restaurant (payout), CamPay charges us again. This comes out of GetSter's profit. It's the cost of transferring money from our CamPay wallet to the restaurant's mobile money.

⑤ Markup (0% default)
This is a hidden price increase that the customer pays but the restaurant never sees. If markup is 2%, a 1,000 XAF item shows as 1,020 XAF to the customer. The restaurant still gets paid based on their original 1,000 XAF base price. The 20 XAF difference goes straight to GetSter as extra revenue. Currently set to 0% (disabled).


🤔 Who Pays the Provider Fee?

The "fee absorption rule" decides who eats the CamPay collect fee:

RuleWhat happens
Customer pays
(default)
Fee is added on top of the customer's bill. GetSter and restaurant are unaffected.
Platform absorbs Customer pays less. GetSter's profit goes down because GetSter eats the fee.
Restaurant absorbs Customer pays less. Restaurant receives less because the fee is deducted from their payout.

🚗 Delivery: Two Scenarios

Scenario A: Restaurant delivers themselves

Customer pays total
  └─ Restaurant gets: food price + delivery fee
     (minus commission)
  └─ GetSter gets: commission + service fee
  └─ CamPay gets: processing fees

Simple! The restaurant handles everything, so they get the delivery fee too.

Scenario B: GetSter Logistics delivers

Customer pays total
  └─ Restaurant gets: food price only
     (minus commission)
  └─ Logistics driver gets: delivery fee
     (minus GetSter's logistics cut)
  └─ GetSter gets: commission + service fee
     + logistics cut + markup
  └─ CamPay gets: processing fees

The delivery fee is split between the driver and GetSter. The "Logistics cut" slider controls how much GetSter keeps from the delivery fee.

Example: Delivery fee = 500 XAF, Logistics cut = 15%
Driver gets: 500 × 85% = 425 XAF
GetSter keeps: 500 × 15% = 75 XAF

🏦 How Money Flows in Our Bank

Here's exactly what happens step by step when a customer places an order:

Step 1: Customer pays via mobile money
The money goes into our CamPay wallet (a system wallet we control). Think of this as GetSter's "bank account" at CamPay.

Step 2: Money is HELD
The entire amount is locked (put "on hold") in the CamPay wallet. Nobody can touch it until the food is delivered. This protects everyone.

Step 3: Driver delivers → OTP confirmed
When the driver confirms delivery (via OTP code), the system runs the settlement:

Total held money gets split:

1. Release hold on CamPay wallet
2. Credit restaurant wallet → food price
3. Credit logistics wallet → delivery portion
4. Credit GetSter revenue → our fees
5. Reserve payout fees → for when we pay out

Step 4: Payout to restaurant
If the restaurant is set to "autopay", GetSter immediately sends their money to their mobile money number via CamPay. If set to "accumulate", money stays in their GetSter wallet until they request a withdrawal.

Step 5: CamPay sends money
CamPay transfers the money to the restaurant's phone. CamPay charges us the payout fee (1%) for this transfer. This cost comes out of GetSter's profit.


⚠️ What If Something Goes Wrong?

Payment fails?
No money moves. The PaymentTransaction is marked "failed". Nothing happens to any wallet.

Payout fails?
CamPay couldn't send money to the restaurant? The held funds are released back into the restaurant's wallet. They can try again later.

Server crashes mid-settlement?
On startup, the server runs recoverPendingSettlements() which finds any "stuck" settlements and finishes them.

Refund needed?
The customer gets GetSter Cash (credit in their wallet). No real money is sent back to their mobile money — it goes to their GetSter balance for future orders.


💎 GetSter's Profit Formula

GetSter Gross =
   Commission (from restaurant)
  + Service Fee (from customer)
  + Markup (hidden in price)
  + Logistics Cut (if GetSter delivers)

GetSter Net =
   Gross
  − CamPay payout fee
  − Provider collect fee (if platform absorbs)

Play with the sliders on the right to see exactly how each parameter affects the final numbers! →

GetSter pricing calculator

Mirrors calculateFeeBreakdown() from paymentService.ts. Markup applied per item, then summed.

Country
XAF — amounts rounded to nearest 5 (CFA has no coins < 5)
Order items
Item Base Displayed Qty Line total
Cart subtotal (displayed prices) 0 XAF
Order extras
Delivery fee 500 XAF
GetSter Cash applied 0 XAF
Fee rates (from system_financial_config)
Defaults match the seeded config rows in appwrite_init.js
Commission % (from restaurant) 5%
Service fee % (charged to customer) 2%
CamPay collect fee % 2%
CamPay payout fee % 1%
Item display markup % 0%
Provider fee absorbed by
Delivery type
Customer pays
GetSter net profit
Restaurant receives
CamPay fees paid
Customer checkout breakdown
Items subtotal (displayed prices)
Delivery fee
Service fee (GetSter)
Provider fee (CamPay)
GetSter Cash applied

Total to pay via mobile money
Payout breakdown (on delivery OTP)
Restaurant payout
Commission earned (from restaurant)
Service fee earned
Markup captured
GetSter gross revenue
CamPay payout fee (1%)

GetSter net profit