In Business Central, search for "Cash Receipt Journal" and select the cash receipts journal that is required.

Now that Payments have been made to Payment Gateway from the sales documents, we need to log those payments in Business Central, ensuring they link to the relevant source documents. 

Select the Actions/Functions/Suggest Pmt. Gateway Payment action. This allows filtering on the entries by day/week or a customer. Note: Using this Suggest Pmt Gateway Payment function ensures that Business Central can link the payment to the associated Payment Gateway entry automatically. Manually creating Cash Receipt Journal lines will not allow you to do this, hence why this process should be used at all times. If a line is created by using this function but the line is then amended, the link is automatically broken. 

You can also filter by entries selecting whether you want Business Central to only return Payment Entries, Refund Entries or both by using the toggles below. Leaving both blank will return no entries.  

This action will bring out any known Payment from the Payment Gateway log (or Refund) and create the entry for you, automatically applying the entries to the relevant "Posted Sales Invoice" in Business Central. The tick in Applied Yes/No means the payment successfully matched to one or more invoices. To see what has been applied against, go to the Actions/Functions/Apply Entries action.

When the system inserts the Journal line it will attempt to find one or more invoices that have been posted from the Order against which the payment was originally taken. This could be multiple invoices. It will match them up and set the Applies to ID for them, ready for posting.

If the system does not find invoices to match against, these can be set manually using the Set Applies to ID action, on the Apply Customer Entries page. This action can be found under the Process action.

Journal lines for Payments (entries from the "Payment Gateway Log" will show on the journal as Document Type 'Payment', whilst refunds (pulled from the "Payment Gateway Refund Log") will show as a 'Refund' line. 

In order to provide more visibility for the entries, additional fields are displayed on the "Cash Receipt Journal". Each entry line now displays the Payment Method Code as well as the Payment Gateway Amount (the amount that was paid to the Payment Provider inclusive of VAT) and the related Payment Gateway Entry No this relates to. 

For Document Type lines 'refund', the Payment Gateway Refund Entry No is shown as well as the Payment Gateway Refund Amount from the "Payment Gateway Refund Log" (the amount refunded back to the Payment Provider). 

Once the journal is posted, the "Payment Gateway Log" will now display the Cust Ledg Entry No which is the entry for the payment that was just posted in Business Central via the "Cash Receipt Journal". 

Adhoc payments in the Cash Receipt Journal

In the instance of wanting to make an ad-hoc card payment using Payment Gateway to the Payment Provider that does NOT relate to a specific Order/Invoice, you can do this directly from the "Cash Receipt Journal".  

Firstly, create an entry in the journal with Document Type as 'Payment' and specify that this is for Account Type 'Customer'. Select the customer No this relates to. In Amount, add in the value of the payment as a minus value, i..e '-300'. Ensure the Payment Method Code on the line is your Payment Provider. 

In the ribbon within the Home tab, select the Payment Gateway action. 

This will display the "Payment Gateway Payment" screen, exactly as you'd use it from a "Sales Order/Invoice". You would confirm the Cardholder and whether this is a New card or existing within this screen and press Ok once the information is correct. 

Enter the card information or proceed with the payment until it has been a success. This will create a brand new entry in the "Payment Gateway Log" with no Source Subtype or Source No because it has not been done via an existing Sales document. 

Because the "Payment Gateway Log" entry has been created, the journal entry now has the Payment Gateway Entry No linked to the line. 

From the "Cash Receipt Journal" ribbon, you can now use the Apply Entries action in the ribbon to select which Invoices you want the payment to be made against. When the Cash receipt is then posted, the "Customer Ledger Entries" screen is updated with the new payment line and is applied to the invoices you specified. The Customer Ledger Entry no is also available from the "Payment Gateway Log" entry.