How Biller Payments and TillPayments Surcharge Distribution Work
Source: customer_payments_controller.rb:120-156, customer_payment.rb:207-270
- Biller payments are split into separate payments per customer: items are grouped by customer_id, a new payment is created and processed for each customer
- The original biller payment is zeroed out and closed with a note summarizing all sub-payments created
- TillPayments surcharge is distributed proportionally across EFTPOS payment methods by amount
- The surcharge is then split proportionally across payment items
- Each invoice is adjusted for its share of the surcharge amount
- Remainder handling ensures rounding discrepancies land on the last item (not redistributed)
- Assembly Payments processing saves the receipt number before processing begins
Support scenarios
- "How does a biller payment get distributed?" -> it is split into separate payments per customer; each customer gets their own payment record
- "The biller payment shows zero after processing" -> this is expected; the original is zeroed and closed, with individual customer payments created in its place
- "The TillPayments surcharge doesn't add up exactly" -> rounding remainders are placed on the last payment item; minor cent discrepancies are expected
- "Where does the Assembly Payments receipt number come from?" -> it is captured from the payment terminal response before the payment is processed