Balances
PayBridge supports balance payments, where reference numbers and amounts can be imported to the system, and then queried and paid for on the website. You must first import balances to the system before balance payments can be made.
To accept balance payments, a service must be created in PayBridge. This should be created as a card service which is:
- of type Billed
- assigned to a fund with a code that matches the fund code of imported balances
- have a check digit assigned which matches the format of the imported balances' reference numbers.
Managing balances
Balances are managed via the PayBridge menu.
If your account has permission to access balances, you navigate to their management area by the following:
- Click the PayBridge icon in the left navigation bar. The PayBridge menu will open.
- Click the Balances link.
The 'Total balances in the system' count and 'Last updated' date shows how many balances are currently stored in PayBridge and when records were last updated.
Importing balances
Balances can either be imported by uploading a file through the Control Center, or by uploading a file directly to your application server.
Via the Control Center
- Navigate to the Balance management area in the Control Center
- Select the File to import and click the Save button.
PayBridge will return an error if the file could not be imported. Files are processed in the background every 10 minutes and you can opt to be notified when your file imports by setting a notification email address.
When a file is uploaded and accepted, a log entry is created for the file. Files waiting to be imported are given a Pending status.
Via uploading a file to the application server
The import process can be automated by uploading balance files directly from you cash management system. You will need access to the filesystem of your server, once granted upload files directly to the /path/to/jadu/var/PayBridge/account_balanace_files
directory. Files will be picked up by the background task and imported. Files uploaded this way will only appear in the log once the import task has run. It is not possible to get a notification email when uploading files via FTP. PayBridge supports CSV and fixed-width for balance files.
If virus scanning is enabled in the Jadu Central, balance files will be automatically scanned for viruses, and rejected if malicious content is found.
CSV file format
Your CSV file should use the following format:
(fund code),(reference number),(sign),(balance)
02,9876541,+,201.00
If the CSV file to be imported contains a header row, the import process will detect the header row and ignore the first row.
Fixed-width format
Each record in the fixed-width file should be on a separate line. Records should match the following format, with unused characters filled with spaces:
Field | Width | Alignment |
---|---|---|
Fund code | 2 | N/A - should always be two digits |
Reference number | 14 | Left |
Sign | 1 | N/A - should always be one character |
Balance | 11 (including a decimal point and two decimal places) | Right |
Example: 02 029876541 + 201.00
Import log
The balance import log interface details files that are waiting to be and file that have been imported. Details of each import can be reviewed by clicking the View link in the row.
If the file was uploaded directly to the import folder the user will be listed as FTP User otherwise the Uploaded By column will name the admin who uploaded the file via the Control Center.
There are 3 possible status of files in the log:
Status | Notes |
---|---|
Pending | This file is waiting to be imported and will be imported when the background task runs next (every 10 minutes). |
Imported | This file has been imported and the import was successful, no further action is required. Details of how many balance records were processed, created and updated are displayed as well as the email address the notification was sent to if configured. |
Error | If the import task cannot read the file to import or the file failed virus scanning the file will be flagged as an error and the file is not processed. Alternatively, the file may contains lines that are not valid. Details of how many lines were processed, created and updated are shown as well as the email address the notification email was sent to. Lines the were not processed because they did not meet the format required are listed and a download link allows the admin to download the file to review. |
Delete all balances
It is possible to delete all balances in the system. It is advisable to use Admin Privileges to restrict which administrators can view this option. To delete all balances:
- Navigate to the Balance management area in the Control Center
- Open the Actions menu and select Delete all balances from the available options. A window will open asking you to confirm you wish to delete all balances.
- Confirm that you wish to delete all balances and the data will be deleted. The balances page will show the number of balances currently in the system to be 0.
This action is irreversible, and should not be used on a production environment unless absolutely necessary.
Querying a balance
To query a balance:
- Login as a user of the website and visit [your website]/payments/balance. This will load the Balances homepage.
- Enter a reference number, and click the Find. If the reference number has been imported, the balance to be paid will be displayed.
- Click the Make a payment button to proceed to PayBridge.
The Make a payment button will only be displayed if a single service can be found that meets the necessary requirements:
- the service must be 'Billed'
- the service must be live
- the service must have a fund code that matches the fund code of the balance record
- the service must have a check digit which the reference provided validates against