P
pawabloX
DocumentationDeveloper Guide

Getting Started with pawa-proxy

Build betting apps easily with real data - no technical setup required!

🎯 Important: Choose Your Brand First!

Before making any API calls, you must select which betPawa brand/market you want to work with. This choice determines:

  • Currency: GHS (Ghana), NGN (Nigeria), KES (Kenya), UGX (Uganda)
  • Regional Features: Available sports, betting options, and payment methods
  • Styling & Branding: Colors, logos, and UI elements specific to each market
  • Language & Localization: Text content and date/time formats

💡 Once selected, use the same brand consistently throughout your entire application session.All API requests will include the x-pawa-brand header with your chosen brand or query parameter (e.g., brand-nigeria).

🌍 Proxy Overview
A simple way to access betPawa APIs during development

When developing on Replit or v0, you can proxy any betPawa API request through:

https://pawa-proxy.replit.app/

For example:

https://pawa-proxy.replit.app/api/preference/v1/component-data?x-pawa-brand=betpawa-ghana

📋 Understanding Component Data

The component-data endpoint is one of the most important APIs for building betPawa-style applications. It provides essential configuration data including:

  • Brand-specific styling and theme configurations
  • Feature flags and component visibility settings
  • Localization and language preferences
  • Regional betting rules and restrictions
  • UI component configurations and layouts

📚 Detailed Documentation

For complete component-data API specification, parameters, and response schema, visit: Component Data API Documentation

🔐 Authentication
How to authenticate with the proxy service

To authenticate, use the following endpoint:

POST https://pawa-proxy.replit.app/api/user/v1/authenticate

Payload:

{ "username": "user-phone", "password": "user-password" }

Response:

{ "sessionToken": "sess_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX" }

📚 User API Documentation

For complete User Service API specification, authentication details, and all available user endpoints, visit: User Service API Documentation

💬 Example Implementation Prompt

Here's an example prompt you can use with AI assistants to implement user authentication:

Example Prompt:

Create a login page for betpawa-nigeria using the API defined in @docs/api/user.yaml, with https://pawa-proxy.replit.app as the base URL, and do not use credentials: 'include' or any CSRF-related credentials handling.
Video example
Watch how looks like a login page for betpawa-nigeria using the API defined in @docs/api/user.yaml.
v0 Assistant Demo
Demo showing how to use @v0/system-prompt.txt with Replit Assistant

✅ Important

Store this sessionToken in your frontend app.

All subsequent requests must include this token as a Bearer in the Authorization header.

Example:

GET /api/ledger/v1/funds/balance
Authorization: Bearer sess_XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Response:

{ "balance": 10.745, "currency": "GHS" }
🚀 Start Building Without Backend
Develop your frontend faster and easier

Once authenticated, you can develop your frontend (e.g. V0) without running a backend, using the proxy for all data access. This makes local development much faster and easier. ❤️

✨ Faster Development

No need to set up complex backend environments

🔄 Real Data

Work with actual API responses, not mock data

🛠️ Focus on UI

Concentrate on frontend without backend distractions

📋 Component Data Example
Try the component data endpoint

Component Data

GET
/api/preference/v1/component-data?x-pawa-brand=betpawa-ghana
curl -X POST "https://pawa-proxy.replit.app/api/user/v1/authenticate"
🤖 AI-Friendly Endpoints
Live data from simplified endpoints

New, simplified endpoints with real, live data:

🔥 Popular Events

GET
/apiplus/events/popular
curl -X GET "https://pawa-proxy.replit.app/apiplus/events/popular" \ -H "x-pawa-brand: betpawa-ghana"

🔴 Live Events

GET
/apiplus/events/live
curl -X GET "https://pawa-proxy.replit.app/apiplus/events/live" \ -H "x-pawa-brand: betpawa-ghana"

💡 Pro Tip

You can provide the x-pawa-brand either as a header (recommended) or as a GET parameter (?x-pawa-brand=betpawa-ghana) for easier testing. All data above is fetched live from the API!

📚 Full API Documentation
Explore all available endpoints

For a complete list of all available endpoints and their documentation, visit:

💬 Example Prompt for v0/Replit
Copy this prompt to quickly build a betting app with live data

Use this example prompt when working with v0 or Replit to quickly create a betting interface with live data:

Load upcoming betting events from https://pawa-proxy.replit.app/apiplus/events/live?x-pawa-brand=betpawa-ghana and display them under the login form together with event details, 1x2 markets and their odds. Example api response: { "status": "success", "data": [ { "start_time": "2025-05-28T19:00:00Z", "competition": "Football - International - UEFA Conference League", "event_name": "Real Betis Seville - Chelsea FC (n)", "event_id": "27279048", "sr_id": "58267485", "scoreboard": [], "markets": [ { "name": "1X2 | Full Time", "selections": [ { "id": "1199575943", "name": "1", "odds": "4.45", "hot": 0 }, { "id": "1199575944", "name": "X", "odds": "3.70", "hot": 0 }, { "id": "1199575945", "name": "2", "odds": "1.90", "hot": 1 } ] }, { "name": "Double Chance | Full Time", "selections": [ { "id": "1199578566", "name": "1X", "odds": "1.92", "hot": 0 }, { "id": "1199578568", "name": "X2", "odds": "1.23", "hot": 1 }, { "id": "1199578567", "name": "12", "odds": "1.31", "hot": 0 } ] }, { "name": "Both Teams To Score | Full Time", "selections": [ { "id": "1199578829", "name": "Yes", "odds": "1.83", "hot": 1 }, { "id": "1199578830", "name": "No", "odds": "1.98", "hot": 0 } ] } ] } ] }

💡 How to use this prompt

  • • Copy the prompt above
  • • Paste it into v0 or Replit Agent
  • • The AI will create a complete betting interface with live data
  • • Modify the prompt to add more features or change the design

v0 Usage

Paste the prompt directly into v0 chat to generate a complete React component with live betting data

Replit Usage

Use with Replit Agent to build a full Next.js app with authentication and live betting features