Creating a Custom API Basket/Cart

Billy Fluck
Billy Fluck
  • Updated

By default the Spektrix iframes always direct customers towards the standard Basket/Cart page, which gives you and your customers all of the essential functionality for displaying what your customers are buying online. However, if you’re looking for ways to customise this step in the online journey – whether you want to offer functionality like Membership upsells in the basket/cart or display different information to your customers – you can create your own custom Basket/Cart page using our API v3.

Here’s an example of what the standard Basket iframe looks like:

In this article we’ll take a look at some examples of what it's possible to do using a custom Basket/Cart page, and give a non-technical breakdown of what’s involved in creating one. We’ll also point out where to find the appropriate technical information on our Developer Portal so that you can direct your web developer to where they need to look.

Why would I want a custom Basket/Cart page?

Creating a custom Basket/Cart page is a great way for you to take complete control of how your customers’ ticket selection is displayed and shown back to them at this final stage of the online booking process. It allows you to control exactly what details are displayed and how, and gives you more opportunities to upsell and create a booking path that works for you, your organisation, and your customers.

It’s an ideal next step if you’re already taking advantage of all of the standard online functionality provided by Spektrix, and are working closely with your web developer to make the most of all of the opportunities your website offers.

Because it involves using the Spektrix API v3 to build a page from scratch, setting up a custom Basket/Cart page is an involved process which rewards careful planning and a clear strategy in order to design exactly what you want the page to do.

NOTE: we would recommend implementing some or all of our suite of Web Components before you look into creating a custom Basket/Cart page. These are simpler and less involved to set up, but offer all manner of online benefits.

What could I do with a custom Basket/Cart page?

Setting up a custom Basket/Cart page involves tapping into the information available in the Spektrix API v3, which means the possibilities for what you could do are almost endless. Much like the Spektrix Web Components, what you want the page to look like and do is limited only by your imagination! That being said, here are some suggestions for what you might want to do.

Membership Upsells
Use the API to look at what’s in a customer’s basket/cart and display the details of exactly how much they could save by buying a Membership. By doing this you can show customers exactly what the benefits of purchasing a Membership might be, giving them all the information they need to make an informed decision on whether to take the plunge. You could even add a Membership Web Component right there and then, so that customers can add a Membership in a single click. Check out our Best Practice: Membership Upsells article for some useful advice on how to plan for and implement something like this as part of your wider Memberships strategy.

Dynamic upsells/donation asks based on basket value
In a similar way to a Membership Upsell, you could use the API to dynamically determine when to offer other upsells or donation asks; you might, for example, set a range, so if the basket value is up to a certain value then make a small donation ask, but over a higher value offer a Membership upsell instead. Adapting what’s being offered in a dynamic fashion like this allows you to be as flexible as possible, and tailor the Basket to what you think will best engage each type of customer.

This is a great example of functionality which already exists in the standard Spektrix checkout flow, but which you can use a custom Basket/Cart page to design and display in a tailored fashion which looks exactly how you want it to.

Group multiple items and display them as one bundle
If you’re using our Merchandise Web Component, you might already be allowing customers to buy groups of Merchandise items as a bundle, and add them to the basket with a single click. The standard Basket page will display each item separately, but if you add a Merchandise Attribute to each item so that you can group by the same Merchandise ID, in a custom Basket page you could display these as a single bundle. This then means everything shows up in the basket nice and clearly, and customers can then edit the whole bundle in the basket (if they want to remove it, or change the number of items).

NOTE: while the Merchandise items will show up as a bundle in the basket, they will still display as individual items in customers’ confirmation emails.

How do I make a custom Basket page?

As with anything you use your website for, we would recommend you think about how a custom Basket page might contribute towards your organisation’s wider goals and objectives before you start designing exactly what it should look like. Once you’ve determined what you would like a custom Basket page to do and why, you can then start working with your web developer to decide upon how it can do that.

Without going into too much technical detail, here’s some information you can provide to your web developer to help them understand what’s involved in putting together a custom Basket page:

  • Build a template for your basket/cart page which will retrieve what’s in the customer’s basket using the Basket endpoint in the Spektrix API v3 to then display that information in whatever way you want
  • You will need to be using a Custom Domain, to make sure you avoid any potential issues with third-party cookies in Safari. See this article for more information on Custom Domains
  • All of the appropriate technical documentation for using the API v3 can be found on our Developer Portal

When would a custom Basket not be the right solution for me?

  • If you are selling Ticket Subscriptions, it won't be possible to sell them online using a custom Basket yet.
  • If you use Fixed Series Subscriptions, Ticket Donations, Gift Memberships or Faciliated Booking, the custom Basket will lack information about the relationship between items. Get in touch to discuss whether / how these limitations may affect you.

A custom Basket page can be whatever you need it to be, as long as the information you want to use or display is available in the API v3. This means that there are no standard templates to work from, so you will need to work closely with your web developer to design the functionality and visuals.


If you have any technical questions about creating a custom Basket page you’ll need to pick those up directly with your web developer; however for anything else please don’t hesitate to get in touch with the Spektrix Support team.