Now that the invoice has been created successfully and emailed to your customer, we now need to implement steps to discover the payment outcome whenever the customer chooses to pay their invoice.
Since this can happen at any time between invoice creation and it's expiry date, how can we do this?
Of course, we can log-in to the N-Genius Online portal to see whether an invoice has been paid, but since we do not know when the customer will pay it, this approach relies heavily on manual effort and is therefore inefficient for merchants processing large volumes of payments via the invoicing service.
Similarly, a query service is available on the N-Genius Online APIs, which may also be useful (see the Retrieve order status section for more information), but - again - this will likely be an inefficient method in most real-life cases.
Instead, we recommend the use of one of the following two methods to discover the payment outcome:
Email notifications
By configuring the default email notification address in the N-Genius Online portal, we can be notified every time there is an attempt to pay an invoice.
To do so, simply log-in to the N-Genius Online portal and navigate to Settings > General > Email Notifications. You may then enter the preferred email address to receive these updates and enable them using the toggle provided.
This email address will now receive a message every time one of your customers attempts to pay their invoice, whether successful or unsuccessful.
Web-hook notifications
To achieve a greater level of automation for your invoicing service, and perhaps to drive your fulfilment or CRM systems, we recommend the use of the N-Genius Online web-hooks facility.
This facility will send a JSON data-block to a secure URL of your choice (on your server, or environment) whenever a key event, such as a successful or failed authorization, takes place against one of your invoices.
For more information on web-hooks, and how to configure and make use of them, please refer to the Consuming web-hooks section.