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.
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.
This section describes a basic flow for providing a ticket shop.
Start by getting a list of events Events.
[GET] https://shopping-api.paylogic.com/events
{
"_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.
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
See Storefront. It contains a lot of data so it’s omitted here.
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
}
See Orders. It contains a lot of data so it’s omitted here.
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.
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:
By your application. Your application will add personal details to all tickets.
Bt the user who created the order. Order creators will add personal details of themselves and their friends to all tickets.
By friends of the user who created the order. Order creators will add their own personal details for one ticket, and send out a request to friends to do the same.
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.
We reuse various concepts throughout our various resources and actions in our API.
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.
These objects are used as part of multiple resources. We also link to objects in the documentation on resources.
We update Release notes when we make changes.