Troubleshooting
There can be different reasons why you cannot process payments with your Sana Pay account, for example wrong settings in the Sana Pay add-on or in the Sana Pay payment system.
Below you can also see some of the problems and their causes that you may encounter when using Sana Pay and configuring something wrong. The information in this article may help you find the cause of the issue, if there are any, and fix them when using Sana Pay.
Before you can start figuring out what the problem is, you need to enable troubleshooting. This option is available in the Sana Pay add-on settings. Enable this option to diagnose, identify, and resolve issues if any occur. It includes more detailed and extensive logging.
To find out the reason, the first step is to check the Sana logs. In Sana Admin click: System > Logs. Check the trace logs and payment logs. For example, if something wrong with the checkout process, most probably you will find the reason in the trace log.
Trace log example:
If something wrong with the integration between Sana Commerce Cloud and Sana Pay, most probably you will find the reason in the payment log.
Payment log example:

When you create an order and pay it online through a payment provider, and you see the page Order processed successfully, this means that the order is created and saved to the ERP system. But it has nothing to do with your payment.
It may happen that right after placing the order you can open your order details and see that the payment status of your order is In progress for example. That is because when a customer pays for an order using a credit or a debit card, the payment must be processed before the funds are transferred to your merchant account. Therefore, there is usually a delay between the moment when the customer pays for the order and when the merchant receives the payment. It can take a few minutes or even days.
If the payment system returns that the payment transaction was successfully processed, then everything is fine, and the payment status will change to Paid.
But if something is wrong with the payment transaction, and the payment provider is not able to process the payment, for example because there is not enough money on the customer’s account, then the payment will be canceled. In this case the order will be removed from the ERP system and the customer will not be able to open it in the order history.

Example of the error in the payment log:
Sana Pay exception: Response: '{"status":422,"errorCode":"216","message":"Field 'shopperReference' may not be less than 3 characters.","errorType":"validation","pspReference":"861619421151047F"}'
This is Sana Pay limitation. The customer ID in your ERP system must be at least 3 characters or more. When a customer pays an order through Sana Pay, customer ID is sent to Sana Pay. Sana Pay does not allow to use customer IDs less than 3 characters.

If you are experiencing the 403 Not Allowed or Forbidden error which can come along with error codes: 010, 802 and 701, most likely your webservice user (API credentials) (eg. ws@Company.[YourCompanyAccount]) is missing the Checkout webservice role. Please, contact your Sana Commerce representative to check this.

One of the reasons that you cannot process payments successfully can be Sana Pay risk rules. If you cannot process payments successfully, for example you see the Order Canceled page, it might be that the Sana Pay risk rules are too strict. Please, contact your Sana Commerce representative to check this.