OpheliaDocs
Search docs⌘K
DashboardCreate an account
Verticals

Entertainment

Provider-specific behavior for the entertainment vertical, including party_size as ticket quantity.

"vertical": "entertainment"StubHubOTP
termAn event, team, artist, or venue, e.g. "The Weeknd", "Hamilton".lifecycleSearch returns each event's ticket listings in metadata.sections, each with a listing_id, section, row, seats, price and quantity. Pick one and pass its listing_id in metadata when booking; that targets the exact ticket, so no price cap is needed. party_size is the ticket quantity and customer.email is used for delivery. StubHub guest checkout can then stop for two actions, each returned as requires_action: a verification code sent to the buyer's phone or email (next_action.type "otp"), and card details (next_action.type "payment"). Send the card up front in metadata.payment and the card step is answered from it; a re-prompt for a corrected card still comes back to you. Submit each to /continue; always check next_action.type and send the matching body until status is confirmed. Purchased tickets cannot be cancelled through Ophelia.
curl
# 1. Search events — party_size is required (the ticket quantity); results only
# include listings that can fulfill it. Each venue's metadata.sections lists them.
curl -X POST https://api.opheliaos.com/v1/venues/search \
-H "Authorization: Bearer YOUR_LIVE_KEY" \
-H "Content-Type: application/json" \
-d '{
"vertical": "entertainment",
"term": "The Weeknd",
"location": "New York, NY",
"datetime": "2026-11-14T19:30:00Z",
"party_size": 2
}'
# → venues[].metadata.sections = [
# { "listing_id": "L123", "section": "104", "row": "12",
# "seats": "Seats 7-8", "price": "$145.00", "quantity": 4 }, ... ]
# → venues[].image = "https://media.stubhubstatic.com/stubhub-catalog/..."
 
# 2. Book the listing you chose — venue_id from the event, listing_id from sections.
# No max_price is required because the listing_id pins the exact ticket.
curl -X POST "https://api.opheliaos.com/v1/bookings" \
-H "Authorization: Bearer YOUR_LIVE_KEY" \
-H "Idempotency-Key: events-001" \
-H "Content-Type: application/json" \
-d '{
"vertical": "entertainment",
"venue_id": "ven_11223344",
"datetime": "2026-11-14T19:30:00Z",
"party_size": 2,
"customer": {
"name": "Jane Smith",
"email": "jane.smith.diner@gmail.com",
"phone_number": "+15555555555"
},
"metadata": { "listing_id": "L123", "section": "104", "row": "12" }
}'
# → "status": "requires_action", next_action.type "otp" (StubHub sent a verification code)
 
# 3. Submit the code → returns requires_action again, now for payment
curl -X POST "https://api.opheliaos.com/v1/bookings/bkg_11223344/continue" \
-H "Authorization: Bearer YOUR_LIVE_KEY" \
-H "Content-Type: application/json" \
-d '{ "otp_code": "123456" }'
# → "status": "requires_action", next_action.type "payment"
 
# 4. Submit the card → returns "status": "confirmed"
curl -X POST "https://api.opheliaos.com/v1/bookings/bkg_11223344/continue" \
-H "Authorization: Bearer YOUR_LIVE_KEY" \
-H "Content-Type: application/json" \
-d '{
"payment": {
"card_number": "4111111111111111",
"exp_month": "12", "exp_year": "2027", "cvv": "123",
"name_on_card": "Jane Smith",
"address_line1": "123 Market St", "city": "San Francisco",
"state": "CA", "postal_code": "94103", "country": "US"
}
}'