Documentationv1.0 Beta

API Reference

Developer Resources

The UniTick API provides comprehensive endpoints for integrating with the platform. All endpoints are RESTful and return JSON responses with proper error handling and status codes.

API Endpoints

Payment API

  • POST /api/payment/process
  • POST /api/token-approval
  • GET /api/payment/status
  • POST /api/payment/verify
  • GET /api/payment/history

Ticket API

  • GET /api/tickets
  • GET /api/tickets/[id]
  • POST /api/tickets/verify
  • GET /api/tickets/qr/[id]
  • POST /api/tickets/transfer

API Features

RESTful

Standard HTTP methods

JSON

Structured responses

Secure

Authentication required

Authentication

Authentication Methods

Supabase Auth

All API endpoints require valid Supabase authentication tokens.

JWT token in Authorization header

Session Management

Sessions are managed automatically by Supabase with secure token refresh.

Automatic token refresh

Response Format

Success Response

{
  "success": true,
  "data": {
    "orderId": "12345",
    "transactionHash": "0x...",
    "tickets": [...]
  },
  "message": "Order created successfully"
}

Error Response

{
  "success": false,
  "error": "INSUFFICIENT_FUNDS",
  "message": "Insufficient UTICK balance",
  "details": {
    "required": "100.50",
    "available": "50.00"
  }
}

Status Codes

  • 200 - Success
  • 201 - Created
  • 400 - Bad Request
  • 401 - Unauthorized
  • 500 - Server Error

Rate Limits

  • 100 requests/minute
  • 1000 requests/hour
  • 10,000 requests/day
  • Higher limits for verified apps
  • Contact for enterprise limits