Setup Required:

If we would like to post the payments automatically, the Scheduled Payment flag needs to be Enabled on the Payment Methods list.

 

The Scheduled Pmt. Jnl. Template Name and the Scheduled Pmt. Jnl. Batch Name needs to be set on the Payment Gateway Setting page.  

 

Job Queue Entry:

To schedule and post the payment automatically, we need to create a Job Queue Entry Card.  This needs to point to the right Codeunit and needs to the set the correct timings.  When you are ready with the setup set the Status to Ready.

 

Any payments due for the selected schedule payment (i.e. any posted sales invoices with the payment method which is currently due) will be processed by the Job. The Job Queue will process any scheduled payments with Ready Status and where the Next Payment Date is today.

 

Scheduled Payment Card:

The Scheduled Payment can be set for the combination from the General Tab (Account Type, Account No., Payment Method Code, Currency Code, Cardholder No., and Payment Card).

We can specify the first date in the First Payment field and the Frequency specifies if the payment is recurring and the frequency of the next payment.

The Next Payment Date Formula specifies the date formula for the payment recurrence to calculate the Next Payment date.

The Final Payment specifies the final payment.

 

Run the scheduled payment manually once in the foreground from the Scheduled Payment Card with the Process Payment action.

 

If the Job Queue fails (Status is Error) after the payment taken, then we can use the Show Error to see the actual error and check the created lines with the Open Journal Batch action.

 

You must resolve any issues and post the Cash Receipt Journal manually, otherwise risk talking double payments if you can run the job again.

Then need the Status to set Ready again and wait for the next running.

We can see the Scheduled Payment Log Entries by using the Log Entries action.

 

Payment Gateway Log:

After the Sales Order posted the Payment Gateway Log automatically created. The payment is taken against the journal line which is then applied to one or many source documents. The transaction uses the Default Payment Cardholder’s details.