# Issuing Tickets

After defining a product it is time to sell it. Please check that the sales catalog is live for the sales channel and date you want to sell tickets.

# Showing the available products

To list the products that are available to a sales channel, the sales channel can use its API key to access the product endpoints.

# Creating/Issuing a ticket

A ticket is the combination of a product definition with the selected options and information of the traveler. When issuing a ticket, TapConnect responds with the unique ticket id, and something to present to the user that can be used to link to the ticket. This is usually a barcode and/or a service id. Please find these fields in the create ticket endpoint description of the API.

Please note that for most if not all operators, a ticket represents a travel right, and therefore monetary value. It is important to protect your API key and make sure that created tickets can be linked to a (financial) transaction.

# Activating a ticket and getting a barcode

After a ticket is issued by TapConnect and depending on the product defintion, it may need to be activated before a barcode can be created for it. The response to the create ticket API call will contain information on whether the ticket is activated or not. If the ticket is not activated, please use the activate endpoint to activate the ticket.

To fetch a UIC918-3 compliant aztec barcode or mobileplus token for the ticket, the barcode endpoint can be used.

Please note that for some products the barcodes expire and need to be regularly refreshed. This is a fraud protection mechanism to prevent people from traveling with copies of barcodes. To the client or webshop this process is almost transparent, as long as REST response cache headers (opens new window) are properly respected.