We first recommend developing an integration against the playground
environment to test your implementation before attempting to integrate with the production environment. While the playground environment is designed to behave as closely to production as possible, minting real NFTs, it is not billed and it is safe to create test events.
You are free to use the playground environment in your own development, testing, or staging environments.
Verifying An Action
After creating an event or ticket on the Ticket Engine API you may wish to verify that your integration is successful. There are two ways to do this:
- Using the actions API endpoint.
- Checking the blockchain records.
- Looking for updates to the Ticket Explorer.
Using the API
When making calls to the /stream endpoint you will have the option to provide a callbackUrl
when creating an event. Whenever there is a status update available, a POST request will be sent to this URL containing a promise UUID that you can use to query /actions
If a callbackUrl
was not provided, you will also have been returned an actionPromise
in the body of the /stream response. This can be used to query /actions periodically for updates. This process is detailed more within the Asynchronous Confirmation page.
Using the Blockchain
It is also possible to query the blockchain directly using the Subgraph as this will automatically index new blockchain records in real-time as transactions are confirmed. If you wish to ensure that the blockchain records are being created successfully you can query the Subgraph.
Each record on-chain will be associated to your integrator ID that will have been provided as part of onboarding. Should you need to find this again using the Subgraph, this is possible with the following query:
{
integrators {
id
name
}
}
Once you have your ID (below, "1") is is then possible to write a query to see your most recently created events, the tickets associated with that event, as well as any actions that have occurred on each ticket:
{
events(where: { integrator: "1" }, orderBy: blockTimestamp, orderDirection: desc) {
id
eventIndex
name
tickets(orderBy: blockTimestamp, orderDirection: desc) {
id
tokenId
usageEvents {
type
txHash
}
}
}
}
Using the Ticket Explorer
The Ticket Explorer is used as a tool for ticket buyers to see more information about their ticket or understand more about the activity happening on OPN Ticketing Ecosystem. The Ticket Explorer updates in real-time and can act as a tool to view NFT tickets that you create.
Once an action has been confirmed you will be able to use the nftId
and the explorerUrl
from the /actions response to view the ticket on the explorer. The explorer URL can be opened in a web browser to show the history of actions on that ticket along with the links to the blockchain transactions.