action.skip

Configuring Payment Run

← Setting Up Payments/Payouts Management

JustOn Cash Management can execute payment runs in order to automatically initiate payment operations on a regular basis.

Summary

Depending on whether your org has integrated with a bank or with a payment service provider, the payment run configuration differs:

  • To automatically execute SEPA Direct Debit orders or SEPA Credit Transfer orders via an EBICS-based bank connection, you schedule the Apex class DirectDebitPaymentRunJob or CreditTransferPaymentRunJob, respectively.

    For details, see Configuring SEPA Payment Run.

  • To automatically execute payments via a payment service provider, you schedule the Apex class PaymentRunJob.

    For details, see Configuring PSP Payment Run.

Configuring SEPA Payment Run

JustOn Cash Management can execute SEPA payment runs in order to automatically initiate bank transfers on a regular basis.

To this end, JustOn Cash Management provides two dedicated Apex classes

  • DirectDebitPaymentRunJob for SEPA Direct Debit, and
  • CreditTransferPaymentRunJob for SEPA Credit Transfer.

These Apex classes are to be scheduled using the standard Salesforce Schedule Apex functionality.

Note

Users who intend to schedule a SEPA payment run must be able to access the relevant EBICS bank account credential record. There are two ways to achieve this:

  • The user has created the relevant EBICS bank account credential record, or
  • The relevant EBICS bank account credential record is not locked to the user who has created it (see Sharing Bank Access Configurations).
  1. Click to enter Setup, then 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, like Direct Debit Job or Credit Transfer Job, respectively
    • Apex Class:

      • DirectDebitPaymentRunJob for SEPA Direct Debit
      • CreditTransferPaymentRunJob for SEPA Credit Transfer
    • Frequency: Weekly or Monthly (with an according day of week or day of month setting)

    • Start
    • End

      Required, so if you want it to run virtually forever, select a date far in the future.

    • Preferred Start Time

  4. Click Save.

    This sets up the SEPA payment run to be executed at the specified time.

Configuring PSP Payment Run

JustOn Cash Management can execute payment runs in order to automatically collect payments via a payment service provider on a regular basis.

Scheduling Payment Run

JustOn Cash Management provides the dedicated Apex class PaymentRunJob, which is to be scheduled using the standard Salesforce Schedule Apex functionality.

  1. Click to enter Setup, then 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, like Payment Run Job
    • Apex Class: PaymentRunJob
    • Frequency: Weekly or Monthly (with an according weekday or day of month setting)
    • Start
    • End

      Required, so if you want it to run virtually forever, select a date far in the future.

    • Preferred Start Time

  4. Click Save.

    This sets up the payment run to be executed at the specified time.

Ad hoc execution

Certain circumstances may require to execute the payment run on an ad hoc basis. To this end, you can execute the Apex class using a flow whenever required.

  1. Create a flow to call the Apex class PaymentRunJob.

    1. Click to enter Setup, then navigate to Process Automation > Flows.
    2. Click New Flow.
    3. Select Screen Flow and click Create.
    4. Click and add the following Action element.

      Option Value
      Action Execute Payment Run

      Specify a label and an API name as required.

    5. Click Save.

      Specify a label and an API name as required.

  2. Execute the payment run flow.

    1. Open the payment run flow in the Flow Builder or the detail view.
    2. Click Run.

This will immediately execute the payment run.

Adjusting Payment Run Retry Threshold

If a payment provider causes too many (by default, 10) temporary failures in consecutive payment runs, JustOn Cash Management will deactivate it. To define the deactivation threshold according to your org's requirements:

  1. Click to access the App Launcher, and select Setup Cash Management.
  2. Open the Global Configuration tab.

    Users who intend to access the global configuration must be assigned the System Administrator profile and explicitly allowed accessing the Global Configuration dialog.

  3. Click Edit.

    This launches a screen flow that shows the global configuration input fields.

  4. In the Payment Provider Configuration section, specify the intended value in the Retry Threshold field.

    The threshold defined here will apply to all payment providers.

  5. Click Save to save your settings, then Finish to complete the screen flow.