yeah x-cart team sorted me with this one
with this which will pass the amount which is total ex shipping and including any discount from coupon codes)
Code:
{section name=oi loop=$orders}
{assign var="aff_order" value=$orders[oi].order}
{math assign="temp_total" equation="x-y" x=$aff_order.total y=$aff_order.shipping_cost}
{literal}
<script language="javascript" src="https://scripts.affiliatefuture.com/AFFunctions.js"></script>
<script language="javascript">
var merchantID = 965;
var orderValue = {/literal}'{$temp_total}'{literal};
var orderRef = {/literal}'{$aff_order.orderid}'{literal};
var payoutCodes = '';
var offlineCode = '';
AFProcessSaleV2(merchantID, orderValue, orderRef,payoutCodes,offlineCode);
</script>
{/literal}