Payment Schedules
unaric payment schedule contains the information needed to drive the creation of payments where they need to recur automatically every payment schedule is linked to an authorisation, which stores the customer's payment details their only function is to create payment records, linked to authorisations (saved payment methods) on a fixed schedule so that these payments can be collected automatically alternatively, you can use your own objects (such as invoices or orders) to drive the automatic creation of payment records rather than using payment schedules key fields field description authorisation set to the authorisation record that should be used to collect the schedule payment frequency the frequency at which the payment should be collected regular amount the amount that should be taken from each payment next payment date the date that you want the payment schedule to start collecting this will be updated (according to the frequency) each time the schedule collects status active , inactive , or expired statuses status description active (previously in force) the default status the schedule is active and will collect inactive the schedule is not collecting expired in cases a final payment date has been set and is due, the record will be set to expired after the final payment create payment schedules from existing authorisation on the unaric payments authorisations tab, navigate to the authorisation record you want to use for the payment schedule select the dropdown arrow by the payment schedules related list and click new the correct authorisation will already be pre populated fill in the rest of the required fields click save to finish the payment schedule is now active, and will collect overnight each time the following conditions are met the next payment date is set to either today, or is in the past the status of the payment schedule is set to in force the status of the authorisation attached to the payment schedule is in force deactivate payment schedule if you wish to temporarily stop the payment schedule from collecting, then edit the record, and change its status from in force to inactive direct debits take time to process as such, ensure the payment is taken from the customer's bank account on the correct date the whole cycle starts a number of days before the actual due date ("next payment date") the number of days is a configuration parameter that is set to 4 by default if you make a payment schedule inactive during that window then there might already be a payment being processed that you will need to deal with separately processing payment schedules in order to process payment schedules the unaric repeat payment scheduled job needs setting up in salesforce, navigate to setup > environments > jobs > scheduled jobs navigate to setup > custom code > apex classes click the schedule apex button configure the new job as follows job name asperato repeat payment (recommended) apex class click the magnifying glass and select batchprocesspaymentschedules schedule apex execution frequency as per requirements recurs every week on select all checkboxes start date choose a date (defaults to today) end date set a date far in the future (e g , 12/31/2050) preferred start time set a time (e g , 04 00 or 05 00) click save to finish ensure that the user account you use to recreate the scheduled job has the system administrator profile this is necessary to grant the job the required permissions to access the aggregateresult entity