BILLmanager Knowledge Base
en En
es Es

Affiliate program revenue not credited

The following terms are used in the article:

Problem

The referrer was not credited with the partner reward.

Cause

The affiliate program expired and was then extended. However, the reward was not credited automatically.

Diagnostics

There are potential risks involved in altering a database. We do not recommend making manual edits to the database, as it can disrupt the correct operation of the platform.

Create a backup of the platform before performing any actions with the database.

To confirm the cause, check in the DB whether there are unpaid records (payment = NULL) for the period under review:

  1. Connect to the server with the platform via SSH. For more information about connecting via SSH, see Workstation setup.
  2. Connect to the DB:
    MySQL
    mysql billmgr
  3. Run the query:
    SELECT * FROM referralprogram_reward WHERE payment IS NULL and cdate = '2026-04-01'
    Comments:
    • 2026-04-01 is the date of the partner reward. For example, cdate = '2026-04-01' means the reward for April based on March expenses.

An empty output means that the reward entry was not created. This confirms the issue.

Solution

To solve the issue, call the affiliatemonthly function again:

  1. Connect to the server with the platform via SSH. For more information about connecting via SSH, see Workstation setup.
  2. Run the command:
    /usr/local/mgr5/sbin/billmaintain --command affiliatemonthly --date 2026-03-01 --params nopayments
    Comments:
    • --date 2026-03-01 — the command will credit the reward for April based on March expenses;
    • --params nopayments — this parameter indicates that no payment is required, only an entry needs to be created in the referralprogram_reward table.
  3. Follow the instructions in the Diagnostics section to check the created entries.
    Example output
    SELECT * FROM referralprogram_reward WHERE payment IS NULL and cdate = '2026-04-01' \\G
    *************************** 1. row ***************************
     id: 19844
     referralprogram: 3
    referralprogram_rule: 3
     referral_account: 39223
     referer_account: 39652
     amount: 4.5000
     currency: 50
     expense: 575817
     payment: NULL
     cdate: 2026-04-01
    *************************** 2. row ***************************
    The entry means that the reward was accrued but not paid out.
  4. Credit the payments:
    /usr/local/mgr5/sbin/billmaintain --command referralpayment --date 2026-03-01
    Comments:
    • --date 2026-03-01 — the payment crediting period. The parameter is specified for the previous month. To get cdate = '2026-04-01', specify --date 2026-03-01.
Useful tips