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).
-
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.
-
Click Schedule Apex on top of the list.
-
Specify the details as required.
- Job Name, like
Direct Debit Job
orCredit Transfer Job
, respectively -
Apex Class:
DirectDebitPaymentRunJob
for SEPA Direct DebitCreditTransferPaymentRunJob
for SEPA Credit Transfer
-
Frequency:
Weekly
orMonthly
(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
- Job Name, like
-
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.
-
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.
-
Click Schedule Apex on top of the list.
-
Specify the details as required.
- Job Name, like
Payment Run Job
- Apex Class:
PaymentRunJob
- Frequency:
Weekly
orMonthly
(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
- Job Name, like
-
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.
-
Create a flow to call the Apex class PaymentRunJob.
- Click to enter Setup, then navigate to Process Automation > Flows.
- Click New Flow.
- Select
Screen Flow
and click Create. -
Click and add the following Action element.
Option Value Action Execute Payment Run
Specify a label and an API name as required.
-
Click Save.
Specify a label and an API name as required.
-
Execute the payment run flow.
- Open the payment run flow in the Flow Builder or the detail view.
- 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:
- Click to access the App Launcher, and select Setup Cash Management.
-
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.
-
Click Edit.
This launches a screen flow that shows the global configuration input fields.
-
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.
-
Click Save to save your settings, then Finish to complete the screen flow.