Record a ticket purchase from external partner
curl --request POST \
--url https://api-staging.tickify.io/partners/purchases \
--header 'Content-Type: application/json' \
--header 'x-partner-key: <api-key>' \
--data '
{
"eventKey": "2c344fed-1642-404b-b572-a3fb53b0fac2",
"items": [
{
"tierKey": "550e8400-e29b-41d4-a716-446655440000",
"quantity": 2
}
],
"couponCode": "SUMMER24",
"upsellKeys": [
"up-123"
],
"affiliateKey": "miles_test",
"waiverAccepted": true,
"currency": "USD",
"metadata": {}
}
'import requests
url = "https://api-staging.tickify.io/partners/purchases"
payload = {
"eventKey": "2c344fed-1642-404b-b572-a3fb53b0fac2",
"items": [
{
"tierKey": "550e8400-e29b-41d4-a716-446655440000",
"quantity": 2
}
],
"couponCode": "SUMMER24",
"upsellKeys": ["up-123"],
"affiliateKey": "miles_test",
"waiverAccepted": True,
"currency": "USD",
"metadata": {}
}
headers = {
"x-partner-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-partner-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
eventKey: '2c344fed-1642-404b-b572-a3fb53b0fac2',
items: [{tierKey: '550e8400-e29b-41d4-a716-446655440000', quantity: 2}],
couponCode: 'SUMMER24',
upsellKeys: ['up-123'],
affiliateKey: 'miles_test',
waiverAccepted: true,
currency: 'USD',
metadata: {}
})
};
fetch('https://api-staging.tickify.io/partners/purchases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-staging.tickify.io/partners/purchases",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'eventKey' => '2c344fed-1642-404b-b572-a3fb53b0fac2',
'items' => [
[
'tierKey' => '550e8400-e29b-41d4-a716-446655440000',
'quantity' => 2
]
],
'couponCode' => 'SUMMER24',
'upsellKeys' => [
'up-123'
],
'affiliateKey' => 'miles_test',
'waiverAccepted' => true,
'currency' => 'USD',
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-partner-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-staging.tickify.io/partners/purchases"
payload := strings.NewReader("{\n \"eventKey\": \"2c344fed-1642-404b-b572-a3fb53b0fac2\",\n \"items\": [\n {\n \"tierKey\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"quantity\": 2\n }\n ],\n \"couponCode\": \"SUMMER24\",\n \"upsellKeys\": [\n \"up-123\"\n ],\n \"affiliateKey\": \"miles_test\",\n \"waiverAccepted\": true,\n \"currency\": \"USD\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-partner-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-staging.tickify.io/partners/purchases")
.header("x-partner-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"eventKey\": \"2c344fed-1642-404b-b572-a3fb53b0fac2\",\n \"items\": [\n {\n \"tierKey\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"quantity\": 2\n }\n ],\n \"couponCode\": \"SUMMER24\",\n \"upsellKeys\": [\n \"up-123\"\n ],\n \"affiliateKey\": \"miles_test\",\n \"waiverAccepted\": true,\n \"currency\": \"USD\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.tickify.io/partners/purchases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-partner-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"eventKey\": \"2c344fed-1642-404b-b572-a3fb53b0fac2\",\n \"items\": [\n {\n \"tierKey\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"quantity\": 2\n }\n ],\n \"couponCode\": \"SUMMER24\",\n \"upsellKeys\": [\n \"up-123\"\n ],\n \"affiliateKey\": \"miles_test\",\n \"waiverAccepted\": true,\n \"currency\": \"USD\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"orderId": "sess_abc123",
"externalOrderId": "order_12345",
"ticketsCreated": 2,
"totalGross": 599.98,
"totalFee": 29.99,
"totalNet": 569.99
}Partner Purchases
Record a ticket purchase from external partner
Record a ticket purchase where the partner handled payment externally
(e.g. on their own Stripe/PayPal) and Tickify mints the tickets.
**Request shape matches /tickets/purchase** — no prices, no buyer email,
no order id. The buyer is the authenticated partner user (API key identified),
and pricing is resolved server-side via the quote logic.
**Flow:**
1. Partner sells ticket on their platform
2. Partner calls this endpoint with { eventKey, items, ... }
3. Tickify creates tickets, mints NFTs, delivers to the partner user's wallet/claim flow
4. Financial transaction recorded with historical fee snapshot
5. Webhook sent to partner (`purchase.completed`)
**Required fields:**
- `eventKey`: Tickify event ID
- `items[]`: Array of { tierKey, quantity } — prices resolved server-side
- `couponCode`, `upsellKeys`, `affiliateKey`, `waiverAccepted`: Same semantics as /tickets/purchase
- `currency`: ISO 4217 (default: USD)
POST
/
partners
/
purchases
Record a ticket purchase from external partner
curl --request POST \
--url https://api-staging.tickify.io/partners/purchases \
--header 'Content-Type: application/json' \
--header 'x-partner-key: <api-key>' \
--data '
{
"eventKey": "2c344fed-1642-404b-b572-a3fb53b0fac2",
"items": [
{
"tierKey": "550e8400-e29b-41d4-a716-446655440000",
"quantity": 2
}
],
"couponCode": "SUMMER24",
"upsellKeys": [
"up-123"
],
"affiliateKey": "miles_test",
"waiverAccepted": true,
"currency": "USD",
"metadata": {}
}
'import requests
url = "https://api-staging.tickify.io/partners/purchases"
payload = {
"eventKey": "2c344fed-1642-404b-b572-a3fb53b0fac2",
"items": [
{
"tierKey": "550e8400-e29b-41d4-a716-446655440000",
"quantity": 2
}
],
"couponCode": "SUMMER24",
"upsellKeys": ["up-123"],
"affiliateKey": "miles_test",
"waiverAccepted": True,
"currency": "USD",
"metadata": {}
}
headers = {
"x-partner-key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'x-partner-key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
eventKey: '2c344fed-1642-404b-b572-a3fb53b0fac2',
items: [{tierKey: '550e8400-e29b-41d4-a716-446655440000', quantity: 2}],
couponCode: 'SUMMER24',
upsellKeys: ['up-123'],
affiliateKey: 'miles_test',
waiverAccepted: true,
currency: 'USD',
metadata: {}
})
};
fetch('https://api-staging.tickify.io/partners/purchases', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api-staging.tickify.io/partners/purchases",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'eventKey' => '2c344fed-1642-404b-b572-a3fb53b0fac2',
'items' => [
[
'tierKey' => '550e8400-e29b-41d4-a716-446655440000',
'quantity' => 2
]
],
'couponCode' => 'SUMMER24',
'upsellKeys' => [
'up-123'
],
'affiliateKey' => 'miles_test',
'waiverAccepted' => true,
'currency' => 'USD',
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"x-partner-key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api-staging.tickify.io/partners/purchases"
payload := strings.NewReader("{\n \"eventKey\": \"2c344fed-1642-404b-b572-a3fb53b0fac2\",\n \"items\": [\n {\n \"tierKey\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"quantity\": 2\n }\n ],\n \"couponCode\": \"SUMMER24\",\n \"upsellKeys\": [\n \"up-123\"\n ],\n \"affiliateKey\": \"miles_test\",\n \"waiverAccepted\": true,\n \"currency\": \"USD\",\n \"metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("x-partner-key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api-staging.tickify.io/partners/purchases")
.header("x-partner-key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"eventKey\": \"2c344fed-1642-404b-b572-a3fb53b0fac2\",\n \"items\": [\n {\n \"tierKey\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"quantity\": 2\n }\n ],\n \"couponCode\": \"SUMMER24\",\n \"upsellKeys\": [\n \"up-123\"\n ],\n \"affiliateKey\": \"miles_test\",\n \"waiverAccepted\": true,\n \"currency\": \"USD\",\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-staging.tickify.io/partners/purchases")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["x-partner-key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"eventKey\": \"2c344fed-1642-404b-b572-a3fb53b0fac2\",\n \"items\": [\n {\n \"tierKey\": \"550e8400-e29b-41d4-a716-446655440000\",\n \"quantity\": 2\n }\n ],\n \"couponCode\": \"SUMMER24\",\n \"upsellKeys\": [\n \"up-123\"\n ],\n \"affiliateKey\": \"miles_test\",\n \"waiverAccepted\": true,\n \"currency\": \"USD\",\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"orderId": "sess_abc123",
"externalOrderId": "order_12345",
"ticketsCreated": 2,
"totalGross": 599.98,
"totalFee": 29.99,
"totalNet": 569.99
}Authorizations
Partner API Key (tk_live_... or tk_test_...)
Body
application/json
Purchase details
Tickify event ID
Example:
"2c344fed-1642-404b-b572-a3fb53b0fac2"
Minimum array length:
1Show child attributes
Show child attributes
Example:
"SUMMER24"
Example:
["up-123"]
Example:
"miles_test"
Example:
true
Example:
"USD"
Custom metadata
Response
Purchase recorded successfully

