Do you take Stripe payments and want to create a Xero Invoice and Payment automatically? This can be done with Zapier!
Zapier is an online service that automatically connects apps together. So when a Stripe payment is received it triggers what Zapier calls a “Zap” (which we are about to create) using the details from Stripe to create an Invoice and Payment in Xero
Step 1 – Sign up to Zapier
You can sign up to Zapier with a 14-day full trail. After that trial ends you will need to Upgrade to a paid plan to work with Xero as it’s classified as one of their “Premium” platforms. Zapier plans start at US$25/month or US$240/year if paid upfront.
Side Note. The Stripe payments I used while setting this up where created by the WordPress membership plugin MemberPress so you’ll see some references to fields specific to MemberPress.
Step 2 – Log in to your Stripe and Xero accounts
Log in to Stripe and Xero accounts as you will need access to them shortly.
Step 3 – Create a Zap
- Login to Zapier
- Go to https://zapier.com/apps/stripe/integrations/xero
- Scroll down the page and click on Make a Zap with Stripe.
- On the “Select Stripe Trigger” page select New Charge. Then click Save + Continue
- On the “Select Stripe Account” page either select a previously connected Stripe account, or if you don’t have one click on Connect an Account.
- If you clicked on Connect an Account it will show a popup “Allow Zapier to access your Stripe Account” with directions on how to access API key for stripe. Click on this link.
- In Stripe click Reveal live key token.
- Copy the API key (it needs to be one that starts with “sk_live_”) and then paste it in the popup windows API key textbox. Click Yes, Continue.
- With the Stripe account selected click on Save + Continue.
- On the “Set up Stripe Charge” page change “Include Failed Charges” to no as we don’t want to handle failed charges, just successful ones. Click Continue.
- This will load a sample of charges from Xero. Take a look at them by clicking on the down arrow and if more than 1 option choose the most appropriate. Click Continue.
- On the “Choose an Action App” page search and select Xero.
- On the “Select Xero Action” page choose Create Sales Invoice. Click Save + Continue.
- On the “Select Xero Account” page select Xero account used on other Zaps or click Connect an Account and follow steps to make the connection. Click Save + Continue.
- On the “Setup Xero Sales Invoice” set up all the fields as needed. This is customised to your requirements but I used the following settings, with the values in [] from the sample data:
- Contact Name: [Source Name]
- Email Address: [Cust Email]
- Status: Approved
- Due Date: [Created Formatted]
- Reference: [Transaction Source]
- Sent to Contact: yes
- Line Description: [Cust Subscriptions Data Plan Name] Membership
- Line Quantity: 1
- Line Unit Price: [Amount]
- Line Account Code: [Membership Fees]
- Line Tax Type: [GST on Income]
- Click Continue.
- Check Zap works on the “Testing” page by clicking Send Test to Xero. This will generate a Xero Sales Invoice immediately, but marked as Unpaid.
- The final OPTIONAL step is to create a payment in Xero. To do this add another action by clicking on the + on the left side.
- On the “Choose an Action App” click on the Xero icon which should be displayed, if not do a search.
- On the “Select Xero Action” page choose Create Payment. Click Save + Continue.
- On the “Select Xero Account” page there should already be a Xero account from earlier so make sure correct account is selected then click Save + Continue.
- On the “Set up Xero Payment” page set up all the fields as required. This is customised to your requirements but I used the following settings, with the values in [] from the samples
- Invoice Number: [Create Sales Invoice][Invoice Number]
- Paid To: [Membership Fees]
- Note. The account that you select must be setup to take payments. This can be done in Xero, go to Settings > Chart of Accounts. Select account and make sure checkbox “Enable payments to this account” is ticked.
- Amount: [Create Sales Invoice][Total]
- Reference: [New Charge][ID]
- When finished setting up payment click Continue.
- This will enable you to test the payment which is completely optional (but recommended). Click Send Test to Xero. This will immediately create a payment in Xero and mark the previously tested invoice as paid.
- If happy with how it works click Finish.
- Give the Zap a name like “Create Invoice and Payment from new Stripe Charges”
- If you are ready for it to start working click on the OFF switch to turn it on.
Once the Zap is turned on Zapier will poll for any new Stripe charges every 5 – 15 minutes depending on the plan you signed up for.
0 Comments