Repository navigation
Webhook Plugins
StrikeOut provides the flexibility to use and add plugins to enhance its functionality. With plugins, you can create custom integrations that suit your specific needs, saving you valuable development time. If you create a plugin for a payment integration, we encourage you to consider sharing it to contribute to the StrikeOut community.
StrikeOut comes with two built-in plugins:
The CSV Payments plugin is a simple yet powerful tool that allows you to generate CSV files containing payment information. It serves as a convenient way to keep track of payments and enables easy importing and exporting of accounting data. The plugin's source code is designed to be easily understandable, making it a helpful resource for learning how to create your own plugins.
FrontAccounting is an open-source, double-entry, web-based accounting software. As StrikeOut's creators use FrontAccounting for their own business, they have developed a plugin specifically for it. The FrontAccounting plugin offers advanced functionality, including the ability to account for transactions, deposits, and customer accounts receivables. To configure the plugin, follow the instructions below:
To gain access to your company file, you need to provide the appropriate information to establish a connection to your database. You can find this information in the root installation directory of your FrontAccounting setup, named config-db.php. The required fields include:
- Hostname
- Database User Name
- Database User Password
- Database Name
- Company Table Offset
If you have successfully connected to your company database, a new setting field will appear for adjusting the plugin according to your requirements.
The configuration options for the FrontAccounting plugin are as follows:
-
FA User: Enter the username that will be used to record transactions. It is recommended to create a dedicated user in FrontAccounting specifically for StrikeOut.
-
Bank Account: Select the bank account where the payments will be deposited. Create an account in FrontAccounting named "Strike" or a similar name and choose it in this setting.
-
Debit Account: This is the ledger account that the transaction will be debited to (+). The plugin will automatically select the debit ledger account associated with the bank account. It is generally recommended not to change this unless you have specific requirements and knowledge of accounting principles.
-
Credit Account: Select the account where the credit (-) should be recorded to balance the accounts. For example, if you want to record sales, choose your sales account. If customers are issued invoices, select your accounts receivable account.
-
Account options:
-
Bank Deposit: This option records the payment method payment and credits the desired account. For example, it can be used for customer payments received directly for sales or for transferring funds from a checking account (-) to a Payment Method account (+).
-
Customer Payment (Invoice): This option matches the invoice number provided in the
custIdfield with an invoice in the FrontAccounting database and applies the payment to the appropriate customer account. -
Customer Payment (Debtor #): This option applies the payment to the FrontAccounting
debtor_no, which is equivalent to a customer number. However, note that this number may not be easily accessible. -
Customer Payment (Tax ID): This option matches the payment to the client with the corresponding tax ID field in FrontAccounting.
Note: If a Customer Payment cannot find a matching reference, it will be recorded as a Bank Deposit in the appropriate account and will be logged in the fa.log file. You can modify the deposit in FrontAccounting to associate it with the customer and apply it to the correct account as needed.
To create your own plugin, follow these steps:
- Place your webhook.php file in the /webhooks/ directory.
- Create a folder with any necessary assets for the plugin to function.
- To add the plugin to the main index icon page and the navigation menu, include the following files in your plugin folder:
- /folder-name/inc/ui/index-menu.php: Contains the content you want to add to the main index page.
- /folder-name/inc/ui/nav-menu.php: Contains the content you want to add to the navigation menu.
- When a merchant clicks on these links, they will be directed to the root of your folder, which should contain your index.php file.
Basic Plugin Directory Structure:
Webhooks/
->Your-Dir/
->inc/
->ui/
->index-menu.php
->nav-menu.php
->index.php
->Your-webhook.php
By following this structure and creating the necessary files, you can develop custom plugins for StrikeOut, extending its functionality and tailoring it to your specific requirements.


