Overview
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.
Activating the module
- If the plugin is included in your HostBill edition you can download it from your client portal.
- 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.
- Once you download the plugin extract it in the main HostBill directory.
- Go to Settings → Modules, find and activate Pay Now plugin.
- The plugin does not require any additional configuration.
Adding payment link to email template
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}
Generating payment link using Admin API
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" }