Prepayments

WATCH THE VIDEO

A prepayment is an amount paid in advance by a customer to a merchant for an order.

For example, customers order the custom-made furniture, which will be produced according to their requirements, like materials, parameters, color, design and so on. In this case, a merchant can ask for a payment in advance to make sure that when the furniture is finally made, a customer will definitely buy it.

NOTE

A prepayment is available for customers only if they pay the order online through a payment gateway.

How Prepayments Are Processed in Microsoft Dynamics AX

To settle a prepayment transaction for the order in Microsoft Dynamics AX, an accountant needs to create a payment journal for the customer's prepayment amount with the reference to the sales order and post it. Then, the accountant should mark the open prepayment transaction for settlement and create an invoice for the sales order. The invoice payment will be automatically settled with the prepayment transaction, meaning that the order has been paid by the customer.

When a customer pays an order in a Sana webshop online, all above mentioned steps can be automatically executed in Microsoft Dynamics AX.

Accountants do not need to create and post the payment journal and mark the open prepayment transaction for settlement. They just need to create an invoice and Sana will do the rest.

NOTE

When a customer pays an order in the Sana webshop online, the prepayment amount always equals to the total order amount.

Once the invoice is created, a customer can see it in the Sana webshop with the Paid status.

If you allow your customers to pay their orders online in the webshop during checkout, Sana can automatically post payment transactions in Microsoft Dynamics AX.

Set Up Prepayments Posting

To post payment transactions automatically, in Microsoft Dynamics AX click: Webshop > Common > Webshops. Select your webshop and on the Payment processing FastTab, select the Post prepayments automatically checkbox.

To post payment transactions, Sana uses a payment journal and offset account that are selected on the Payment processing FastTab.

Field  

Description 

Customer payment journal 

Select the customer payment journal. The selected payment journal is used for all orders paid by the customers from the Sana webshop. Only journals of the Customer payment type are shown in this field. 

Offset company accounts 

Select the legal entity where the prepayment transactions will be offset.
 

Offset account type 

Select the account type for the offset transaction to the customer payment. This is typically the Bank account type for customer payment journal lines. 

Offset account 

Select the account for the selected offset account type.

Offset account can be set up for a payment journal, a webshop and a payment method. The system uses the necessary offset account for the prepayment transaction according to the priority. See the explanation below.

Offset-transaction text

Select a description for the offset journal entry. 

Payment method code 

Select the payment method that is used for prepayment transactions.
 

Payment reference

A payment reference (PSP reference) is a piece of information that is used to easily identify a payment transaction. See the explanation below.

Post prepayments automatically 

Select this checkbox, if you want to post prepayment transactions automatically in Microsoft Dynamics AX, when customers pay their sales orders.

If the checkbox Post prepayments automatically is not selected, then when a customer pays the order online in the Sana webshop, an accountant should manually create a payment journal for a prepayment, post it and settle the prepayment transaction in Microsoft Dynamics AX.

Business customers can also pay their outstanding invoices online from the Sana webshop. Online payments of the open invoices from the Sana webshop are seamlessly integrated with the sales order processing and accounts receivable modules of Microsoft Dynamics AX and fully automated. For more information, see Online Invoice Payments

Offset Accounts

In Microsoft Dynamics AX you can set up offset account for a payment journal, a webshop and for a payment method.

When a customer pays for the invoice in the Sana webshop, the offset account that will be used for a prepayment is based on priority.

If the offset account is set up for a payment journal selected in the webshop settings and the checkbox Fixed offset account is selected, then an offset account from a payment journal is used for a prepayment transaction.

In case the checkbox Fixed offset account is not selected, then an offset account set for a webshop is used for a prepayment transaction.

If the checkbox Fixed offset account is not selected in the settings of a payment journal and offset account is not set up for a webshop, then an offset account from a payment method set in the Payment processing settings of the webshop is used for a prepayment transaction.

So, the priority is the following: Payment journal offset account (Fixed offset account checkbox is selected) > Webshop offset account > Payment method offset account.

Payment Journal Approval

All payment journals for customers' prepayments can be automatically approved by the AX user that is used for connection between Sana and Microsoft Dynamics AX. This user is specified in the ERP connection settings in Sana Admin.

To approve payment journals automatically, the AX user should be associated with the appropriate worker (user relations) and should be added to the group set on the payment journal you are using in Microsoft Dynamics AX and that is authorized to approve payment journals.

Step 1: Open the details of a payment journal set for your webshop. In the Approval section, select the Active checkbox and make sure that your AX user is added to the group selected in the Approve field.

Step 2: In Microsoft Dynamics AX click: System administration > Common > Users > Users. Select the AX user you are using and click Relations. Assign the appropriate Worker to the AX user.

If the AX user is correctly set up, then all payment journals for customers' prepayments will be automatically approved by this user and you can see it on the History tab of the payment journal.

Payment Method Status

All payment journals for customers' prepayments have a payment status in Microsoft Dynamics AX. Sana uses the payment status from the payment method set on the Webshops form.

You can see the payment status of the payment journal for a prepayment in the payment journal lines.

Payment Reference

NOTE

Applies to: Sana Commerce Cloud 10.0.43 and higher in Microsoft Dynamics AX

A payment reference (PSP reference) is a piece of information that is used to easily identify a payment transaction. There are three components – the Sana webstore, your Microsoft Dynamics AX system, and the payment service provider that you use to accept online payments from your customers. When a customer creates an order in the Sana webshop and pays online with a credit or debit card, the order will be saved to Microsoft Dynamics AX and the payment transaction will be created in the payment system you use for online payments. To find the required payment transaction in your payment system, you need some information, such as the payment transaction ID, the number of the customer who created the order, or the order ID. It may differ depending on the payment service provider you use.

Using the Payment reference field on the Webshops form, you can choose what information you want to store in the customers’ payment journals so that it can help you easily find the necessary payment transactions in your payment system.

The following options are available:

  • Customer - the ID of a customer who paid an order is saved to the customer’s payment journal.

  • Sales order - the sales order ID is saved to the customer’s payment journal.

  • PSP reference – the payment transaction ID is saved to the customer’s payment journal.

When a customer pays an order online in the webshop, Sana will store the payment reference you specified in the webshop settings in the customer’s payment journal in Microsoft Dynamics AX.

To see the payment reference stored in the customer’s payment journal, in Microsoft Dynamics AX click: Accounts receivable > Journals > Payments > Payment journal. Select the payment journal and click Lines. Check the Payment reference field.