Joining payments for the Prepay model

Joining payments for an account allows creating a single payment from several payments linked to prepaid orders.

In the platform, payments can be joined as follows:

  • Automatically — if a reseller selected the Unite payments for prolong and renew orders checkbox in the system settings (see General system settings, the Prepaid settings section). The automatically created joined payment is always linked to several prepaid prolong or renewal orders.
  • Manually — via the Customer Control Panel only (see Join payments in the Customer Control Panel guide). The manually created joined payment may not be linked to several orders, but may include top-up payments.

In this article:

Automatic joining payments for the Prepay model

Automatic creating a joined payment linked to several orders

Automatic creating a joined payment linked to several orders for the Prepay model is performed as follows:

  1. The platform attempts to join payments for an account every night when the billing process has completed the following actions:
    1. Create the required prolong orders and renewal orders for the account's subscriptions.
    2. Attempt to pay from the account balance for the created prolong orders — if the current date is the date specified in the Paid to attribute of the subscriptions (see Prolonging a subscription).
    3. Attempt to pay from the account balance for the created renewal orders — if the current date is the expiration date for the subscriptions with the activated Auto-renew option (see Auto-renewing a subscription).
  2. For created orders, the platform joins the linked payments if a payment complies with all the following conditions:
    • The payment has the Waiting for payment status.
    • The payment is linked to an order of one of the following types:
      • Prolong order regardless of the status of the Auto-renew option of the subscription.
      • Renewal order for the subscription with the activated Auto-renew option.
  3. For orders with the joined payments:
    1. The linked payments are cancelled.
    2. A single joined payment is created:
      • The amount of the joined payment is equal to the sum of the linked orders.
      • The joined payment has the Waiting for payment status.
  4. When a joined payment is created, the platform generates the Joined payment created event.
  5. For orders with the linked payments that are not included in the joined payment (including the case when only one order was created by the billing process), the platform generates the Order created events.

Automatic completing a joined payment linked to several orders

Automatic completing a joined payment linked to several orders is performed as follows:

  1. The platform attempts to complete a joined payment from the account balance when any of the following occurs:
    • The current date is the date specified in the Paid to attribute of a subscription for any of the linked orders.
    • The current date is the expiration date of a subscription for any of the linked orders.
  2. If the account balance has sufficient funds, after completing the joined payment, all linked orders are completed too.
  3. If the account balance does not have sufficient funds, only the subscriptions triggered the process of completing the joined payment are stopped. The joined payment remains in the Waiting for payment status.