Shopping cart icon on website

In order to provide a functional integration between the website and the Ticketmatic sales flows, it is a good idea to have a shopping cart icon on the website that links back to the Ticketmatic basket page. This way, users can easily switch between the website and Ticketmatic sales flows, allowing them to order tickets for multiple events.

Ideally, the shopping cart icon gives an indication of the number of tickets that is currently in the basket.

Typically, this icon is shown in the website header, and could look for example like this:


It is up to the website builder to implement this icon on the website. In summary, it works like this:

  • When a user is redirected from the Ticketmatic ticket sales flow to the website, we provide an ordercode in the returnurl. This ordercode should be stored locally.
  • Ticketmatic provides an endpoint to retrieve the contents of the current basket, with this ordercode as parameter.
  • Website builder uses the results of this endpoint call to visualise the shopping cart icon
Previously, Ticketmatic provided a basket plugin to make this implementation convenient. This basket plugin relied on a third-party cookie mechanism to get the information about the current basket in the website. Due to tightening security restrictions in browsers, this approach is not working anymore in all browsers. Safari for example restricts these third-party cookies.

Returnurl ordercode

When a user wants to navigate away from the Ticketmatic ticket sales flow, he is redirected to the website landingpage as specified in the returnurl parameter. Ticketmatic will add several parameters in the querystring, more info here. One of these parameters is ordercode. This parameter will contain a unique string representing the currently active basket.

The website builder should store this ordercode locally in the session.

Endpoint to retrieve basket content

Using the ordercode, you can retrieve the summary contents of the current basket at the following endpoint{accountcode}/basket/{ordercode}

This endpoint will return the information in json format:

2  "nbroftickets": 2,
3  "nbrofproducts": 0,
4  "totalamount": 45.5

Basket url

When the user clicks on the shopping cart icon, he should be redirected to the Ticketmatic basket page. This is a fixed link that depends on the ticket sales flow setup configured and should be provided to you by Ticketmatic support. It has following form:{accountcode}/basket/{ticketsalesflowsetupid}


We're always happy to help! Send us an e-mail