Creating An Automated Split Invoice Payment System with Stripe

A tool for parents to pay tuition invoices where payments are automatically split between the tutor and the tutoring company.

About The Client

Founded by Emma Walton in 2010, Riviera Tuition provides a range of tuition services for students from Key Stage up to A-Level across Torbay, Teignbridge, Exeter and South Devon. With a large number of highly experienced tutors, they offer 1:1 tuition tailored to each student to help them succeed.

You might have seen the case study for the automated PDF student reports created for Riviera Tuition

 

The Problem

Riviera Tuition have many students on their learning programmes. Each month, the admin team will issue invoices to the parents of students for payment.

Since Riviera Tuition have over 30 self-employed tutors who deliver the tuition, and each tutor has a different group of students that they look after, this creates a lot of administrative work to ensure each tutor is paid correctly.

The Riviera Tuition team needed a way for each tutor to be paid for each of the tuition that they delivered, and for Riviera Tuition to be paid their management fee. This needed to be as automated and as simple as possible.

 

The Project Requirements

What the Riviera Tuition ideally wanted to happen:

  1. The parent would be sent an invoice for tuition services
  2. The parent would pay for the tuition using a debit or credit card
  3. The tutor receives their tuition fee as soon as the invoice is paid
  4. Simultanously Riviera Tuition receives their management fee

If steps 2, 3 and 4 could be automated, this would significantly reduce the administration needed from the Riviera Tuition team.

The system would also need to ensure any card processing fees were deducted from the management fee, and not the money that the tutor would receive.

Riviera Tuition were already creating their invoices in an application called TeachWorks. This software is designed for tutoring businesses for managing tutors and students. Emma wanted a solution that meant they could continue using the invoice tool within Teachworks.

 

The Technology Involved

  • Stripe – The online debit and credit card processing software
  • TeachWorks – A software tool designed for tutoring schools to manage tutors and students
  • WordPress – Used as a platform for hosting the integration

 

Requirement 1 – Making it easy for parents to pay

Parents are directed to a portal page where they can enter their invoice number and their surname. This looks up the invoice and confirms the invoice total.

Once the invoice details have been retrieved, the parent is then prompted to securely enter their card details for payment. Payment is processed by Stripe, the card processing software.

When the payment was successfully processed, we wrote code that automatically sends the parent a payment receipt and updates TeachWorks to mark the invoice as paid. Again, this reduced administrative work from the Riviera Tuition team, as they didn’t need to manually reconcile invoice payments.

 

Requirement 2 – Syncronise invoices from TeachWorks with payment system

To ensure that parents pay the right amount for an invoice, we needed to fetch invoice data from TeachWorks using their API.

Using custom code, we created a tool that fetched each invoice and extrapolated data to ensure that the right tutor was being paid when the invoice was paid.

To correctly match tutors to the right information from each invoice, we asked the TeachWorks team to add some additional data to their Invoice API. Surprisingly, they added this feature within a couple of days, and this made it significantly easier to extract Tutor information from invoices.

 

Requirement 3 – Handle different fees depending on the tuition

Riviera Tuition have different fees for each type of lesson delivered by tutors. Therefore, the system must automatically deduct the right fee for each tuition entry on the invoice.

To solve this, we created a commission table, where the Riviera Tuition team can enter and adjust each of the commission levels. We created this interface so that the admin team could make changes at any time without any technical support.

 

Requirement 4 – Make it easy for tutors to get paid

Since we’ve created custom code that pays a tutor directly when an invoice is paid, the payment system needs to know how to pay a tutor.

We created code to automatically process each tutor’s payments by taking advantage of Stripe’s connected accounts capability.

Each tutor needs a Stripe account registered with their self-employed business. This makes it possible for the system to take payments on the tutor’s behalf.

They then securely connect their account to the payment system using Riviera Tuition’s payment tool.

Connecting a tutor to the payment system

Then our custom code brings together everything to take into account payment fees and Riviera Tuition’s management fees (using the commission levels) so that the tutor gets paid each time an invoice is paid.

 

The End Result

Riviera Tuition now has an automated payment system that allows tutors to get paid quickly, significantly reducing the administrative work needed to match tuition fees with tutors.

Card processing fees and management fees for Riviera Tuition are deducted at source too, again reducing the administration work needed by both tutors and Riviera Tuition around paying fees.

The system has already processed thousands of payments, and is loved by both parents and Riviera Tuition!