Payment services integration
The online invoicing functionality within Xero presents some great opportunities for Xero customers to utilize payments services to streamline the payments process and more effectively manage their cashflow.
Background: video overview of sales & online invoicing in Xero.
Payment services that integrate with Xero and pass our standard Add-on partner review process, will become an official Xero Add-on partner and will be promoted in the Xero Add-on directory.
The steps to become a certified Xero Add-on partner are outlined in our partner page – this includes the initial marketing requirements to promote the application as an official Xero Addon partner.
Online invoicing & API
With the release of payment services in early June, a ‘custom url’ option has been made available. This will allow the payment button on online invoices presented in Xero, to be connected to an external web address the Xero customer configures it to.
Once configured, the ‘Pay now’ button on a Xero online invoice will be mapped to this url:
A number of customer and invoice specific template tags can be passed into this URL so an external application can identify the associated Xero customer and invoice, provided they have previously connected the service with their Xero organisation using the Xero API.
Once payment has been processed, a payment can be applied to the invoice via the API, marking it as paid and completing the process.
The process flow would work something like this:
- A Xero customer finds a payment service in the Add-on directory, or is already a customer of both services.
- Within that payment service application, a user connects to their Xero organisation (an API connection). The user should also select any applicable defaults, such as the account in Xero to which invoice payments should be applied.
- Once complete, they are given a url to add to invoices sent from Xero. Something like: https://www.PaymentService.com/xero/?invoiceNo=[INVOICENUMBER]org=[SHORT CODE]&amount=[AMOUNTDUE] they take this and update their settings in Xero.
- When one of their customers is sent an online invoice, they can click on the “Pay now” link and they will be redirected to the url above with the values corresponding to the current invoice
- Using the Xero API, the service can check the organisation the invoice belongs to (using the SHORTCODE value) and then retrieve the invoice in question (using the InvoiceNumber & AmountDue values). This will allow the service to populate the amount outstanding, currency etc, and indeed verify that the invoice has not yet been paid.
- Once payment has been processed, a payment can be applied via the API, so the invoice is now marked as paid.
- The user is redirected back to the online invoice, where they will see the invoice is now marked as paid, confirming completion of the process.