For invoices to be automatically marked as paid in Xero, you must specify Payment Gateway Mappings for each payment method as set out below.
The WHMCS -> Xero payment synchronisation option in the module is designed to create bank transactions in Xero based on those logged in the WHMCS transaction list for the WHMCS payment gateways that exist. In most cases, you would only want to use this feature for payments that are made by your customers through gateways that do not have a feed for Xero, i.e. Stripe, otherwise you will get duplicate bank transactions.
Take for example a company that receives payments in three ways, Bank Transfer, Credit Card (via Stripe) and PayPal. They would handle payments from each as follows:
Bank Transfer - Set up a bank account in Xero that receives feeds from their bank (or by importing statements). When the Xero -> WHMCS payment sync is run, invoices marked as paid in Xero will be marked as paid in WHMCS. The Payment Gateway mapping account number for Bank Transfer will be left empty to avoid duplicate transactions in Xero.
Credit Card - Set up a bank account in Xero called 'Virtual Stripe Account' (Xero will ask for the bank account number, you can just enter zeros i.e. 00000 in this field). This will be a virtual bank account that represents your account with Stripe. In WHMCS you would select this account in the module configuration under Payment Gateways for Credit Card (Stripe) payments. When the sync runs, transactions will be created in Xero for payments made on your website and the related invoices will be marked as paid. When Stripe transfers the money into your primary bank account, you can mark this as a transfer from the Stripe virtual bank account. That leaves you with a balance in the virtual bank account which should be equal to your stripe fees. To handle Stripe's Bank Fees, you would enter Stripe's monthly invoice into Xero by using the "Spend Money" feature on the virtual bank account.
PayPal - You can choose between the two above methods, as PayPal provide a feed for transactions you might want to manually reconcile it using a feed into Xero. Alternatively, you can disable the PayPal feed for Xero and do things automatically in the same way you would with Stripe.
It is also important that you have your "Next Transaction ID" setup correctly
From our FAQ (http://www.edgehosting.co.uk/clients/knowledgebase/23/FAQ.html):
Q. How do I find my 'Next Transaction ID'?
A. In WHMCS, go to 'Billing' -> 'Transaction List'. When you click on the Edit button next to a Transaction, the URL will show the ID, for example (&id=1001).