Magento - Automatically import invoices/credits through API

Hi,

I am just looking at moving from Sage Accounts to QuickFile for doing our accounts, I am currently exporting all invoices / credits and payments from Magento and importing them into Sage at the end of the month and then reconciling the SagePay & Paypal accounts to double check everything is ok.

I have been looking at the QuickFile API and giving it a quick test to see if I can get Magento to automatically export each invoice as they are created, this appears to be fairly simple to achieve but I am not sure what to do with the payments.

I see it is possible to import a payment to a client through the API, but is it possible to assign a payment to an invoice? Or is it better to not import the payments, and let QuickFile import the payments from Paypal & SagePay?

Cheers,
Tim

In the method Payment_Create you can supply InvoiceID (optional). This will link the payment to a given invoice.

You can just create the invoices and it’s fairly trivial to then match those payments in the bank area to the invoices. I would personally adopt this method as using Payment_Create will be much more involving on the coding side and you’ll need to do some sort of lookup to grab the InvoiceID first.

Thanks for the reply Glen, I should have looked at the schema, for some reason I only looked at the example code and just assumed.

I think I will try matching payments in QuickFile first and see how quick it is, but I think I will probably end of coding it to attach the payment to the invoice as we are processing over 600 orders a month now, so trying to make things as little work as possible.

Odd question, but if I was to import the payments with the invoice, if I then imported a bank statement/feed in QuickFile, would it notice the duplicates? Or would it just import everything?

Duplicates will occur unless the amount, date and reference matches on the bank transaction, in which case the feed will skip over it. But I’d say that’s tricky to get right, one wrongly positioned punctuation mark and it’s no longer considered a duplicate.

Ok, thank you. I will test and see.

Is it possible to import the VAT amount on an invoice line? Or do you only accept the VAT rate? If it is only the rate this will be my stumbling block as I need the invoice totals to match exactly and I am sure I will get some rounding problems if I can’t import the VAT amount.

Only the percentage is entered and the actual VAT amount is calculated from that figure. Here is the schema reference:

You can use multiple line with multiple rates if required.

Thats a shame, due to our payments been taken through the website where the VAT is computed by Magento, I am pretty sure we will get some non matching invoices and payments in QuickFile due to the VAT rounding.

Is this something you think you will add to QuickFile in the future, the ability to override the VAT amount on a line & invoice total basis?

It’s a tricky one as this is very much hard-wired into our system. We don’t allow arbitrary VAT amounts to be added on sales invoice, everything is driven by the VAT rate. Changing this I’m pretty sure will be a big job. For this to work we’d need to introduce an editable VAT amount column in the sales invoice screen and numerous other areas. I can’t see us touching this anytime soon…sorry to disappoint.

Ok, no worries, thought it would be a big update. Looks like I am going to have to use one of your very expensive competitors. :unamused:

I am very impressed with QuickFile and have recommended you to a couple of people that are going to use it for what it is designed for. All the best.

Sorry to dig up this old thread however a few things have changed since @Glenn’s previous response.

Our API does now allow custom VAT amounts to be specified. Also we have since integrated QuickFile to Zapier so you can use Zapier as a middle ground to automate a number of interactions with Magento.

https://zapier.com/zapbook/magento/quickfile/

Hi @QFMathew, thanks for letting me know.

1 Like

Hi Tim can you tell how do you achieved that ? " I can get Magento to automatically export each invoice as they are created, this appears to be fairly simple to achieve "
Thank you

2 posts were split to a new topic: How do I set the rate for the Flat Rate scheme?