Bookkeeping Data for Payment Balances

With the finleap connect integration and the ability to capture payments from various payment providers via the Self-Service Extension, JustOn is becoming a leading system to receive payment information. Accordingly, it allows for writing bookkeeping data for payment balances. These records can then be exported to bookkeeping systems like DATEV or SAP.

Ideally, you generate bookkeeping data from payment balances on a daily basis. To this end, JustOn provides a dedicated scheduled job. Once generated, you can export the bookkeeping data to accordingly configured CSV files, like DATEV posting batch or SAP CSV, which can then be transferred to the corresponding accounting system.


The support for generating bookkeeping data from payment balances is available as of JustOn 2.57.

Payment bookkeeping data concepts

Bookkeeping data as generated from payment balances can hold account numbers, which are, typically, debtor numbers and bookkeeping accounts related to bank accounts or payment provider accounts. The data is able to track changes made to payment balances, like amount change or deletion. Payment bookkeeping data is unalterable with regard to balance assignment and overpayment splitting in order to keep the data clean.

Data structure

Bookkeeping data is structured in booking periods and booking details. Booking periods and booking details are in a master-detail relationship.

A booking period represents one month in bookkeeping. Hence, they aggregate the booking details produced for this month. Booking periods are grouped by tenants.

A booking detail represents a record in an accounting ledger. JustOn creates one booking detail per payment balance change.

The following fields are mapped from the balance to the booking detail:

Balance Field Booking Detail Field
Account Account
Amount Amount
Date Booking Date, Payment Date
Type Type
Id Balance

JustOn generates booking details for balances of the following types: Payment, Refund, Prepayment, Payout, Write-off. All other balance types are ignored.

Since payment balances are subject to change, like amount modification, deletion or splitting, JustOn does not track payment balances and booking details in a one-to-one relationship, but uses a payment hash instead. The following Balance fields are used to compute the hash: Account, Date, Payment Method, Payment Provider, Reference, Transaction No and Type. This means, all balances where these fields have the same value are aggregated to the same booking detail.


JustOn uses the Booking Detail field Balance to link back to the first balance. This does not guarantee, however, its accuracy in case of a balance split or recombination. Use this field for information or navigation purposes only.

The bookkeeping data creation does not update existing payment booking details. JustOn always creates a new booking detail record to track an individual payment balance change.

JustOn tracks amount modifications to existing balances as new booking details with a new amount. That is, a change by a delta of 5,00 EUR results in a new booking detail with an amount of 5,00 EUR.

Deleted balances are written off: JustOn creates a new booking detail, reverting the amount, like Amount * (-1).

For more detailed information about payment bookkeeping data, examples, etc., see Bookkeeping Data for Payment Balances.

Enabling Bookkeeping Data Generation

In order to enable the creation of bookkeeping data, the feature must be activated in the global settings.

  1. In Setup, open Custom Settings.

    In Salesforce Lightning, navigate to Custom Code > Custom Settings.

    In Salesforce Classic, navigate to Develop > Custom Settings.

  2. Click Manage in the row of Global Settings.

  3. Click Edit in the Default row.
  4. Select the checkbox Create Bookkeeping Data.
  5. Click Save.

    Once enabled, the payment bookkeeping data is generated upon job execution.

Enabling Contra Accounts for Payment Bookkeeping Data

In double-entry bookkeeping, every entry to an account requires a corresponding opposite entry to a contra account (also known as offsetting account), which is credited to offset a debit or debited to offset a credit. To support this scenario, JustOn can copy the contra account number from the optional Account field ON_DebtorNo to the Booking Detail field Business Partner Account Number. In this context, the business partner represents a debtor or creditor, and hence, the contra account.


The support for contra account numbers is available as of JustOn 2.57.

To create the custom field ON_DebtorNo on the Account object:

  1. Navigate to the fields list of the Account object.
  2. Create the following new field.

    API Name Data Type Description Example Values
    ON_DebtorNo Text (255)
    Specifies the contra account number for booking details. If configured as a formula, it can determine the value based on other fields. 1234567

Scheduling Payment Bookkeeping Data Generation

You can set up a job in order to have booking details generated from payment balances automatically on a regular basis.


Be aware of the following specifics:

  • JustOn recommends to schedule the payment bookkeeping data job for daily execution.

    The payment bookkeeping data job must run at least once per week, otherwise it does not detect all new, changed or deleted balances. The detection of deleted balances is improved if they are still available in the recycle bin. If you delete balances on a regular basis, you must align the operations for creating payment bookkeeping data and emptying the recycle bin.

  • For the payment bookkeeping data creation to work, the global setting Create Bookkeeping Data must be selected.

  • The payment bookkeeping data creation supports the custom Account field ON_DebtorNo. The debtor number is used as the primary bookkeeping account number for a payment booking detail, see Assigning Bookkeeping Accounts.
  • The payment bookkeeping data creation supports the custom Balance field ON_ProviderFee for calculating the payment provider fees based on your payment provider contract. If the field is not available or empty, JustOn uses the standard Provider Fee field, see Handling Provider Fees.

The payment bookkeeping data creation job does not require additional parameters. That is, you can set up the job directly for the corresponding Apex class BatchBalanceExportJob. For details, see Scheduling Concepts.

To schedule the payment bookkeeping data creation job, you can use either JustOn's Scheduled Jobs page or Salesforce's Schedule Apex functionality. For details, see Scheduling a Job.

Via JustOn's Scheduled Jobs page:

  1. Open the Scheduled Jobs page.

    Use the following URL, or, if you are already logged in, append apex/apex/ONB2__JobsSetup to your org's domain name.

    As of JustOn 2.52, you can access the Scheduled Jobs page via the JustOn configuration app (App Launcher > JustOn Configuration > Jobs Setup).

  2. From the Apex Job drop-down list, select Export Balances Job.

    The Job Name field is automatically set to BatchBalanceExportJob.

  3. From the Start Time drop-down list, select the preferred execution time.

  4. Optionally, edit the displayed cron expression to adjust the execution time.
  5. Click Schedule.

    This sets up the payment bookkeeping data creation to be executed at the specified time.


From the Scheduled Jobs page, you can also run the job immediately.

Via Salesforce's Schedule Apex functionality:

  1. In Setup, open Apex Classes.

    In Salesforce Lightning, navigate to Custom Code > Apex Classes.

    In Salesforce Classic, navigate to Develop > Apex Classes.

  2. Click Schedule Apex on top of the list.

  3. Specify the details as required.

    • Job Name
    • Apex Class: BatchBalanceExportJob
    • Frequency: Weekly, with all weekdays selected
    • Start
    • End
    • Preferred Start Time
  4. Click Save.

    This sets up the payment bookkeeping data creation to be executed at the specified time.

For more details about job scheduling, see Scheduling a Job in the JustOn documentation and Schedule Apex in the Salesforce Help.