Skip to main content
Affiliates use the Seyaha API to present activities to end users, handle bookings, and process payments (Moyasar or Stripe) — all via JWT authentication.
1

Get a JWT

Affiliates authenticate with a JWT issued by Seyaha. Obtain yours through the affiliate onboarding flow or contact [email protected] to provision credentials.Include the JWT in every request:
Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...
2

Browse activities

Fetch available activities for your user:
curl "https://api.seyaha.net/api/v1/affiliates/users/activities?currency=SAR&page=1&pageSize=10" \
  -H "Authorization: Bearer $AFFILIATE_JWT"
3

Create a booking

When the user chooses an activity and time, create a booking:
curl -X POST https://api.seyaha.net/api/v1/affiliates/users/add-booking \
  -H "Authorization: Bearer $AFFILIATE_JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "activity_id": "6744810075becd2ef8c140f7",
    "variation_id": "6751ad2d7533f379c9a1711b",
    "customer_details": {
      "name": "Ahmed Al-Rashid",
      "email": "[email protected]",
      "phone": "+966501234567"
    },
    "booking_details": {
      "booking_date": "2026-07-15",
      "booking_time": "10:00",
      "currency": "SAR",
      "guests": { "adult": 2, "child": 0, "infant": 0, "senior": 0 }
    }
  }'
4

Process payment

Initiate payment using Moyasar or Stripe. On success, booking status moves to Paid by Customer automatically.
curl -X POST https://api.seyaha.net/api/v1/affiliates/create-payment \
  -H "Authorization: Bearer $AFFILIATE_JWT" \
  -H "Content-Type: application/json" \
  -d '{
    "callback_url": "https://yourapp.com/payment/callback",
    "method": "Moyasar",
    "source": {
      "type": "creditcard",
      "name": "Ahmed Al-Rashid",
      "number": "4111111111111111",
      "cvc": "123",
      "month": "07",
      "year": "28"
    },
    "meta_data": { "booking_id": "67c896a6639e6ff76dd2f882" }
  }'
For Stripe, redirect the user to data.source.transaction_url. For Moyasar credit card, a transaction_url is returned only when 3DS is required.

What’s next

  • Activities — search, filter, and currency options
  • Bookings — full booking and payment reference