Payment links


Payment links module enables your customers to pay for their invoices without the need to log-in. When the new invoice is generated the customer can receive a "pay now" link which once visited will automatically log the client in only to make a payment. If the customer attempts to visit any HostBill section unrelated to the payment session, they will be automatically logged out.


  1. If the plugin is included in your HostBill edition you can download it from your client portal.
  2. If the plugin is not included in your HostBill edition you can purchase it from our marketplace and then download it from the client area.
  3. Once you download the plugin extract it in the main HostBill directory.
  4. Go to Settings → Modules, find and activate Pay Now plugin.
  5. The plugin does not require any additional configuration. 

When sending a new invoice to the customer over email HostBill uses Client: Invoice:New email template (Settings → Email Templates → Client Emails). 
You should edit this email and add following variable to it (this variable will be replaced with valid PayNow url):

Make a fast payment for this invoice: {$invoice.db_id|paymenturl}

If using HostBill 2023-11-27 or higher, You can update invoice template in Document templates section, in your code you can add QR code with payment link using following block.

Note that this change will only affect PDF invoice, you would not see a QR code on HTML version of invoice

<barcode code="{$invoice.db_id|paymenturl}" type="QR" class="barcode" size="1" error="M" disableborder="1" />

Payment Links module extends HostBill's admin API by adding new call for it: payNowGenerate 

When executed, API will return paynow_url in JSON  response body, allowing your customer to make payment without login.

Required Paramters:

  • invoice_id - unpaid invoice id to generate payment link for

Sample Request:

GET /admin/api.php?api_id=API_ID&api_key=API_KEY&call=payNowGenerate&invoice_id=ID

Sample Response:

{
	"paynow_url": "https://url.to.your.hostbill/?cmd=paynow&id=2tg13412crt123gasd2345123t13452431tg23451234",
	"success":	"true"
}