Skip to content

Commit

Permalink
added stripe routes
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniel von Ahn authored and Daniel von Ahn committed Jan 29, 2025
2 parents 0e8524b + b3b905a commit 4bfd002
Showing 1 changed file with 104 additions and 28 deletions.
132 changes: 104 additions & 28 deletions tixbase_api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,22 @@ components:
slug:
type: string
description: URL-friendly identifier for the organization
oauth2:
type: object
properties:
accessTokenUrl:
type: string
description: URL for OAuth2 token request
userUrl:
type: string
description: URL for user information request
required:
- accessTokenUrl
- userUrl
required:
- name
- slug
- oauth2

OrganizationResponse:
type: object
Expand All @@ -68,6 +81,8 @@ components:
expiresAt:
type: string
format: date-time
oauth2ClientSecret:
type: string

Event:
type: object
Expand Down Expand Up @@ -154,21 +169,28 @@ components:
Tickets:
type: object
properties:
ownerId: string
ownerEmail: string
eventId: string
ownerId:
type: string
ownerEmail:
type: string
eventId:
type: string
tickets:
type: array
items:
ticketId: string
row:
type: string
description: Row number (if seated event, else null)
seat:
type: string
description: Seat number (if seated event, else null)
categoryName: string
description: Name of the ticket category
type: object
properties:
ticketId:
type: string
row:
type: string
description: Row number (if seated event, else null)
seat:
type: string
description: Seat number (if seated event, else null)
categoryName:
type: string
description: Name of the ticket category

BurnTicket:
type: object
Expand All @@ -177,31 +199,35 @@ components:
type: string
seat:
type: string
description: Seat number (if seated event, else null)
description: Seat number (if seated event, else null)
row:
type: string
description: Row number (if seated event, else null)

BurnTickets:
type: object
properties:
ownerId: string
eventId: string
ownerId:
type: string
eventId:
type: string
tickets:
type: array
items:
ticketId:
type: string
description: UUID of the ticket to burn
row:
type: string
description: Row number (if seated event, else null)
seat:
type: string
description: Seat number (if seated event, else null)
categoryName:
type: string
description: Name of the ticket category
type: object
properties:
ticketId:
type: string
description: UUID of the ticket to burn
row:
type: string
description: Row number (if seated event, else null)
seat:
type: string
description: Seat number (if seated event, else null)
categoryName:
type: string
description: Name of the ticket category

TicketListing:
type: object
Expand Down Expand Up @@ -297,6 +323,18 @@ components:
enum: [completed, failed]
payment_intent_id:
type: string
Code:
type: object
properties:
code:
type: string
description: Authorization code for OAuth2 flow
redirectUri:
type: string
description: Redirect URI for OAuth2 flow
required:
- code
- redirectUri

paths:
/organizations:
Expand Down Expand Up @@ -941,6 +979,44 @@ paths:
"500":
description: Internal server error

/oauth2/code:
post:
summary: Posts OAuth2 authorization code
description: Posts the authorization code for OAuth2 flow
tags:
- OAuth2
security:
- ApiKeyAuth: []
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/Code"
responses:
"200":
description: Authorization code posted successfully
headers:
Set-Cookie:
description: User session cookie
schema:
type: string
content:
application/json:
schema:
type: object
properties:
userState:
type: string
enum: [loggedIn, notCreated]
"400":
description: Invalid input parameters
"401":
description: Invalid API key
"500":
description: Internal server error


/stripe/onboarding:
post:
summary: Onboard a user to Stripe
Expand Down Expand Up @@ -1034,4 +1110,4 @@ paths:
"401":
description: Invalid API key
"500":
description: Internal server error
description: Internal server error

0 comments on commit 4bfd002

Please sign in to comment.