Shopping Service API

The Paylogic Shopping Service API is a RESTful API that allows you to do many things, like retrieving information about events and products, as wel as buying, personalizing and transferring tickets.

Getting started

A Basic ticket purchase flow is described below, which is a good way to get started if you’re looking to build a ticket shop.

  • You can also start by familiarizing yourself with our concepts and conventions by jumping to Concepts.

  • Or dive straight in and check out Resources and actions.

Basic ticket purchase flow

This section describes a basic flow for providing a ticket shop.

Get a list of events

Start by getting a list of events Events.

[GET] https://shopping-api.paylogic.com/events

Example response

{
    "_links": {
        // Links are omitted from example
    },
    "_embedded": {
        "shop:event": [
            {
                "_links": {
                    "self": { "href": "https://shopping-api.paylogic.com/events/0c2019503cd666fb35c5a3dbd7bafe86" },
                    "curies": [{ "name": 'shop', "href": "https://shopping-api-docs.paylogic.com/documentation/{rel}.html", "templated": true, "type": "text/html" }],
                    "profile": { "href": "https://shopping-api-docs.paylogic.com/documentation/event.html", "type": "text/html" },
                    "shop:products": { "href": "https://shopping-api.paylogic.com/products?event=https://shopping-api.paylogic.com/events/0c2019503cd666fb35c5a3dbd7bafe86" },
                    "shop:ticketshop": { "href": "https://shop.paylogic.com/b77c6f845d5e43cfb5750931ff20b143", "type": "text/html" }
                },
                "uid": "0c2019503cd666fb35c5a3dbd7bafe86",
                "merchant_name": "Ms. Christiana Lesch events",
                // Some event data omitted from example
            }
        ]
    }
}

In the _embedded.shop:event section you will find all events you have access to.

Pick an event you want to sell products for and use the self reference to fetch a Storefront.

Retrieve the Storefront for your event

The Storefront resource contains all data you need to render available products in a shop as it contains all products, pricing and availability.

[GET] https://shopping-api.paylogic.com/storefront?event=https://shopping-api.paylogic.com/events/0c2019503cd666fb35c5a3dbd7bafe86

Example response

See Storefront. It contains a lot of data so it’s omitted here.

Creating an order

Using the products in the Storefront response, you can create an order.

[POST] https://shopping-api.paylogic.com/orders
{
    "products": [
        {
            // The product refers to a product in the Storefront response.
            "product": "https://shopping-api.paylogic.com/products/12365478654238976585643567854323",
            "quantity": 2
        }
    ],
    "consumer": {
        "first_name": "John",
        "last_name": "Doe",
        "email": "john.doe@paylogic.eu",
        "country": "NL",
        "ip": "127.0.0.1"
    },
    "payment_method": "ghr57d5h3gd162fb35c5a3db57ghrydg",
    "shipping_method": "87a5quvndhe162fb357alt872705zr2j",
    "redirect_url": "http://www.example.org/redirect_url", // The user will be sent here after payment
}

Example response

See Orders. It contains a lot of data so it’s omitted here.

Payment and redirect

When creating an order and the order requires a payment, the response will contain a payment link in the _links section of the response. You should navigate a user to this url to pay for their order. When the payment is either successful or failed, users will be redirected to the redirect_url that was provided when creating the order.

Personalization

Your event may be configured to require a name and possibly other details for each ticket. This data can be added in multiple ways after creating the order. We offer multiple ways of adding personalization:


This is the end of a basic purchase flow, but there are many more things the Shopping Service API is able to do. Jump to the Resources section for a complete overview.

Concepts

We reuse various concepts throughout our various resources and actions in our API.

Resources

Resources are the various parts of the Shopping Service API that you can interact with. See Getting started if you’re not sure where to look.

Objects

These objects are used as part of multiple resources. We also link to objects in the documentation on resources.

Release notes

We update Release notes when we make changes.