Create URL link to directly go to 'Pay Online' page

I am trying to create an invoice using the API and then somehow forward the user directly to the payment screen. So far I have managed to use the Client_LogIn API endpoint to get a link to the individual invoice which works well but it would be better to avoid the inevitable confusion of the user needing to then click on two more buttons before making payment.

Ideally the payment screen would be integrated directly in our web portal but it looks like you block embedding the invoice page from being embedded in an iframe which is understandable.

Can you offer any advice as to how I could best implement the above please?

Hello @benmcintyre

I did find this in the forum which may help.

Thanks for the suggestion @QFSteve

I had seen that thread before but unfortunately I cannot get the System_Login to perform as that thread suggests. When I try using the cited example URL (i.e. <![CDATA[payInvoices.aspx?acc=…) then the resulting generated link returns an exception saying the link is invallid.

I think what is happening is that the System_Login routine is working but the link I am trying to navigate to is possibly invalid?

Do you know if there is a URL that I can request which would take the user to the pay invoice page for a specific invoice?

@QFSteve, or anyone else, do you know if instead of me trying to embed the invoice into our application I integrate with Stripe directly and get a payment intent ID from there can I then create the invoice in QuickFile and somehow allocate the payment intent from stripe to the invoice such that the payment gets tagged correctly? I have had a good look but cannot see an API method to do this.

The only way I can currently think of integrating the payment provider into our own application is to create the invoice through the API, use Client_Login to get the HTML of the payment page, retrieve the payment hash from there, implement the stripe payment provider UI in our own application and then finally create a POST request to PayWithStripe.aspx passing in the confirmation IDs from stripe and the hash, much like your own code does. It just feels a very clunky way to do things and would undoubtedly break at some point in the future.

Although fetching the URL for the invoice using Client_Login (or System_Login) works, opening the URL in a new window is typically blocked by the browser.

Any suggestions?


Hello @benmcintyre

As the API can produce a link to preview the invoice, we may be able to adapt it to redirect.

I have raised this with the development team to look into for you.

Thanks @QFSteve

Having investigated the stripe API a bit more it might be preferable to just implement the payment provider in our own UI. What I am lacking is any way of linking up the stripe payment through your API to the invoice. I am trying to avoid needing to manually tag payments.

If I create the invoice, manage the payment provider myself and then use the Create_Payment method to mark the invoice as paid via the Stripe account I will presumably get a duplicate when the data feed from Stripe imports the transaction will I not?

I think I am looking for something like your /WebServices/htmlTpl/PayWithStripe.aspx endpoint. Perhaps I am massively overcomplicating things though?


Can anyone else from @QFSupport offer any assistance please? Ultimately I am trying to embed the payment process into our own web application to improve the customer experience but I am trying to avoid the need to manually tag payments.

I can take the payment using Stripe manually which gives me the stripe payment intent & method IDs, I just require a way to assign them to an invoice so that when the automated feed from Stripe comes through it gets tagged correctly. Perhaps it would be possible to add a property to the Create_Invoice or Create_Payment API for example that takes the stripe information?

Thanks, Ben

Hello @benmcintyre

The old feature mentioned above was removed when an update was completed on the client area due to it’s complexity. However, it’s being reviewed.

For now you would have to use a third party system to take payments if needed.

Yep, no problem with the 3rd party system (I have implemented stripe) but once the payment is taken how can I link it to the invoice to avoid tagging and mark it as paid for the customer?

Hello @benmcintyre

I will have to wait for the development team to investigate to see what the outcome is.

Rest assured they are looking into the issue and I will come back to you once I hear back

1 Like

Hi @benmcintyre

There are two options here…

If you’re using the Stripe feed built into QuickFile, you would need to manually tag the invoice from within your account using the web interface.

The other option is, linked with your setup with Stripe, you can use our API to automatically log the payment and assign it to the invoice. This is through the Payment_Create endpoint: Payment_Create API Schema

However, using the second option may cause duplicates if you’re also using the Stripe feed as the feed would have no way of matching up the feed item and your API created item.

Just to throw an extra point out there, the option @QFSteve mentioned above was removed, but we’re currently looking at the feasibility of adding this back in. We can’t make any promises at this stage, but it would allow a user to go through the standard payment flow in QuickFile and prevent the duplicates, too. We’ll keep you posted on progress with this.

Hi @QFMathew yes, we are currently using the stripe feed to import the transactions into Quickfile.

Manually tagging the invoice isn’t really an option as that would create more of a business process than we have already.

Ideally I would use the Payment_Create method to mark the invoice as paid and pass through a reference at the same time (i.e. the payment intent ID or the charge ID from Stripe) which your feed processing code could use to match up the records in the hope that your import routine could skip the duplicate? Or I could name the transaction in Stripe the same way as you do to include the invoice number?

Another option might be that we accept that if we mark the invoice as paid using the API then the system will generate a duplicate record in the stripe bank feed and we could then delete it programmatically. Unfortunately I can only see a method for creating transactions in the stripe data feed. Would it be possible to add a method to delete bank transactions through the API?

Another option might be if you could somehow add an option to the Stripe feed settings with a string that could be used to filter transactions from the feed if it was included in the payment description? i.e. if we set the description on the Payment Intent in Stripe to ‘ExcludeFromImport: Invoice #1234’ could you simply not import it?

Hi @benmcintyre

I have good news :slight_smile:

You can now use the Invoice_Get API endpoint which will return a new item value:

Body > InvoiceDetails > DirectPreviewUri

Simply add &act=pay on the end of this URL, and this URL can be used for payments for that invoice.

This would then work in the same way as if a user logged in to pay for the invoice through QuickFile.

Hope that helps!