Ambiguous API Response for Invoice_Create

Firstly, thanks for the excellent product and any assistance that can be offered.

I am using the API to integrate into my product but have came across an error that I can’t seem to get around.

I have created an item and want to create a recurring monthly invoice for it. I am sending the following data and getting the followin response (format is a printed PHP array)

    [InvoiceData] => Array
            [InvoiceType] => RECURRING
            [ClientID] => 898808
            [ClientAddress] => Array
                    [Address] => 
                    [CountryISO] => GB

            [Currency] => GBP
            [TermDays] => 7
            [Language] => en
            [RecurringInvoiceData] => Array
                    [Interval] => 1MONTH
                    [Frequency] => 60
                    [StartDate] => 2014-09-22
                    [SendByEmail] => 1
                    [SendByPost] => 0
                    [ActivateOnCreation] => 1

            [InvoiceLines] => Array
                    [ItemLines] => Array
                            [ItemLine] => Array
                                    [ItemID] => 0
                                    [ItemName] => One domain a month
                                    [ItemDescription] => Choose 1 domain a month, pay monthly
                                    [UnitCost] => 1
                                    [Qty] => 1




    [Header] => Array
            [MessageType] => Response
            [SubmissionNumber] => 1411368558899

    [Body] => Array
            [Errors] => **Object reference not set to an instance of an object.**


I can’t find any pertinent references to this error so I’m unsure whether it’s a bug or an issue with the data I’m sending.

I do have “Recurring purchases” checked in my Quickfile account if that makes any difference.

Best Regards

Just to check, you are sending this as XML to Quickfile?

Do you have a copy of the XML you are sending at all please?

Are you able to take the XML and paste it into the Sandbox area? Do you get the same response there?

You can access your sandbox from the My Apps section in QuickFile.


I have replicated this error and we’re looking into this now.


We’ve issued a fix that should get rolled out this afternoon. If you want to bypass the error in the mean time you should be able to do so by supplying a Purchase Reference. The error is due to the recurring invoice API always expecting a purchase ref.


Thank you for looking into it.

I kind of assumed it was out of my control as I tried 100 variations of the data and studied the schema closely. I tried using a purchasereference but it doesn’t seem to fit anywhere other than in the SingleInvoiceData type. Putting it in there complains that the RecurringInvoiceData no longer belongs in the request. I get the same response in the sandbox, looking forward to the patch this afternoon.

<Invoice_Create xmlns="" xmlns:xsi="" xsi:schemaLocation="">

I believe this has now been resolved, please would you kindly retry your code.

My request went through fine, I believe it is working now.

Thank you for addressing the problem, much appreciated.

1 Like

This topic was automatically closed after 9 hours. New replies are no longer allowed.