Create Xero invoices from Paperform payments
Create or update a Xero contact and a draft sales invoice for each submission on your Paperform payment form, so the sale is in Xero. Test with one order first.
Last checked
What it does
When you take payments through a Paperform form (orders, deposits, registrations), the money goes through your payment gateway. The sale still has to be recorded in Xero, and doing that by hand for every order adds up.
For each new submission with a payment, a code step reads the payment total, turns the submission time into a YYYY-MM-DD date and builds one line item: "Paperform payment, submission" plus the submission ID, a quantity of 1 and the payment amount. Then the workflow creates or updates the customer as a Xero contact from their first name, last name and email, and raises a sales invoice for that contact, dated the day of the submission, with the reference "Paperform submission" plus the submission ID.
The template doesn't set an invoice status, so the invoice arrives in Xero as a draft for you to review. The line item has no account code or tax type yet: add them in Xero when you review the draft, or add them to the code step. The rule after the trigger only continues when the submission has a payment total above zero, so submissions without a payment never start the code step or reach Xero.
The steps
-
Paperform: New Submission
Starts the workflow every time the Paperform form you choose gets a new submission.
-
Stepper: Run code
Turns the submission time into a YYYY-MM-DD date and builds one line item with "Paperform payment, submission" plus the ID, quantity 1 and the payment amount.
-
Xero: Create/Update Contact
Creates the customer as a Xero contact named "First name Last name" from the form, with their first name, last name and email. If a contact with that name already exists, Xero updates it instead.
-
Xero: Create Sales Invoice
Creates a draft sales invoice for the contact from the previous step, dated and due on the day of the submission, with the reference "Paperform submission" plus its ID and the line item from the code step.
What you need connected
You also need a Stepper account. Each app's page lists every trigger and action Stepper has for it.
How to set it up
- Sign in to Stepper with your Paperform account. Every Paperform plan includes unlimited workflows, within fair use.
- Click Use this template in Stepper. Stepper copies the workflow into your account and asks you to connect Paperform and Xero if you haven’t already.
- In the Paperform trigger, choose your payment form. The template uses questions with the keys
firstName,lastNameandemail, and the code step reads the payment total from Paperform’s_charge.total. If your questions have other keys, pick your own answers with the data picker. - In each Xero step, choose your organization.
- In the invoice step, check the contact, dates, reference and line items. Contact is mapped to the contact ID from the Create/Update Contact step, and Line Items comes from the code step. The template leaves Status empty, so the invoice is created as a draft. The line item has no account code or tax type, so add them in Xero when you review the draft, or add
AccountCodeandTaxTypeto the line item JSON in the code step, using the codes your bookkeeper uses for these sales. - Make one real payment through your form (you can refund it afterwards) and run a test. Check in Xero that the draft invoice has the right amount, date and reference, then click Publish.
What you can change
- Line items. In the code step, replace the single “Paperform payment” line with the products from the submission, so the invoice shows what was bought.
- Which submissions count. The condition on the rule after the trigger checks Paperform’s
_charge.totalis above zero. Change it if you want to filter on a product or answer instead. The code step also stops the run if a total is missing, as a backstop. - Tax. Set the line amount type to match how your prices are entered, tax inclusive or exclusive.
- Currency. The template doesn’t set a currency, so Xero uses your organization’s base currency. If your form charges in a different currency, set Currency Code in the invoice step.