The Custom gateway is intended for manual payment methods such as bank transfers, cash, checks, or any other offline workflow you handle yourself.
How It Works
Section titled “How It Works”- Client selects "Custom" at checkout
- FOSSBilling displays your configured instructions
- Client follows the instructions to pay you
- You receive the payment
- You manually mark the invoice as paid in FOSSBilling
Configuration
Section titled “Configuration”Go to Configuration → Payment gateways → Custom.
Two template fields:
- Single payment information — For one-time payments
- Subscription information — For recurring payments (if supported)
Both support Twig templates and HTML.
Available Variables
Section titled “Available Variables”| Variable | Type | Description |
|---|---|---|
invoice | array | Full invoice data: total, currency, line items, buyer info |
_client_id | int | ID of the paying client |
Example Templates
Section titled “Example Templates”Bank Transfer Instructions
Section titled “Bank Transfer Instructions”<div style="padding: 20px; border: 1px solid #ddd; border-radius: 8px;"> <h3>Bank Transfer Instructions</h3> <p>Please transfer the following amount to our bank account:</p> <ul> <li><strong>Amount:</strong> {{ invoice.total }} {{ invoice.currency }}</li> <li><strong>Reference:</strong> {{ invoice.serie_nr }}</li> <li><strong>Bank:</strong> Example Bank</li> <li><strong>IBAN:</strong> GB00 XXXX 0000 0000 0000 00</li> <li><strong>BIC/SWIFT:</strong> EXAMPLEXX</li> </ul> <p>Your invoice will be marked as paid once we confirm the transfer (1-3 business days).</p></div>Conditional by Currency
Section titled “Conditional by Currency”Show different instructions based on invoice currency:
% if invoice.currency == 'EUR' % <p>Transfer to: DE00 0000 0000 0000 0000 00</p>% elseif invoice.currency == 'USD' % <p>Transfer to: 1234567890 (Routing: 021000021)</p>% else % <p>Contact support for {{ invoice.currency }} payment instructions.</p>% endif %Wrap the above with the standard Twig delimiter characters ({ and }) when using in your template.
Debugging
Section titled “Debugging”To see all available data in the invoice variable, temporarily enable debug mode and add this to your template:
<pre>{{ dump(invoice) }}</pre>Remember to disable debug mode when you're done!
Marking Invoices as Paid
Section titled “Marking Invoices as Paid”After receiving payment:
- Go to Invoicing → Invoices
- Find the invoice
- Click "Mark as paid"
- The system activates services and emails the client
Source Code
Section titled “Source Code”The Custom adapter is at src/library/Payment/Adapter/Custom.php. It's a simple example of how payment adapters work.