Billing & Payment
This page covers how the order summary, invoice preview, payment gateway selection, and payment processing work in HmSingleOrderAddon.
Order Summary
The order summary section at the bottom of the checkout page shows a real-time itemized breakdown:
| Line Item | Description |
|---|---|
| Product | Base product price for the selected billing cycle |
| Domain | Domain registration/transfer price (if applicable) |
| Config Options | Sum of all selected configurable option prices |
| Promo Discount | Discount amount (if a promo code is applied) |
| Tax | Tax calculated based on the customer’s country/WHMCS tax rules |
| Total Due Today | The amount charged at checkout |
The total updates dynamically as the customer changes their selections.
Promo Codes
Customers can enter a promo code in the order form. The code field is in the order summary section:
- Customer types their promo code
- Clicks Apply
- The discount is calculated and shown in the summary
Promo codes are managed in WHMCS Admin → Promotions. The order form supports all standard WHMCS promotion types:
- Percentage discounts
- Fixed amount discounts
- Free months
- One-time vs recurring discounts
URL pre-fill
Pre-fill a promo code via the URL so customers get the discount automatically:
checkout.php?a=add&pid=5&promocode=WELCOME10
Payment Gateways
Available Gateways
Payment gateways configured in WHMCS Admin → Payments → Payment Gateways appear in the payment section of the order form. Only active gateways with the correct currency support are shown.
Gateway Selection
If multiple gateways are active, the customer sees a list of payment options:
- Credit/Debit Card (via Stripe, Authorize.Net, etc.)
- PayPal
- Bank Transfer / Wire
- Any other active WHMCS gateway module
The customer selects their preferred gateway, and the appropriate payment fields or redirect button appears.
Credit Card Processing
If you use an on-site card gateway (e.g. Stripe):
- The card fields appear inline in the order form
- The customer enters card details without leaving the page
- Payment is processed when the order is submitted
PCI compliance
On-site card processing is handled entirely by your WHMCS payment gateway module and the gateway’s JavaScript SDK. HmSingleOrderAddon does not store or transmit raw card data. Ensure your chosen gateway is PCI-DSS compliant.
Redirect Gateways
For gateways like PayPal Standard:
- Customer clicks “Pay with PayPal”
- They are redirected to the gateway’s payment page
- After payment, they return to your WHMCS confirmation page
Bank Transfer / Zero-Value Orders
For bank transfer gateways or orders with a zero total (fully discounted):
- An invoice is created but not immediately paid
- The order status is set to “Pending” until payment is confirmed
- WHMCS sends the customer an invoice email with payment instructions
Invoice Generation
When a customer completes checkout:
- WHMCS creates an invoice for the order
- If payment is immediate (card/PayPal), the invoice is marked as Paid
- The order status advances to Active (if auto-provisioning is enabled)
- A confirmation email with the invoice is sent to the customer
Renewal Invoices
Renewal invoices for subscriptions are generated automatically by WHMCS based on your auto-generate invoice settings (System Settings → Automation Settings → Invoice Generation). They are not handled by the addon.
Taxes
Tax calculation follows your WHMCS tax configuration:
- Go to Payments → Tax Rules to set up tax rules
- Tax can be calculated pre-tax (exclusive) or inclusive depending on your region settings
- The order form shows the correct tax amount in the order summary
Info
Some countries require tax to be shown inclusive in the displayed price. WHMCS’s tax display mode setting (Payments → Tax) controls this globally and the order form respects it.