Navigate to Settings → Developer to access credentials and configuration options
for the Affiliate API. This section is intended for
developers building custom booking experiences — not needed if you only use affiliate links.
Authentication overview
The Affiliate API uses JWT (JSON Web Token) authentication. JWTs are tied to a
user session and carry identity and permission claims.
Unlike a static API token, JWTs have a limited lifetime. For production integrations,
users authenticate via OAuth and receive a fresh JWT per session. For development,
you can generate a long-lived test token below.
Development test token
For testing and building your integration before setting up production auth:
- Go to Settings → Developer
- Click Generate test token
- Copy the JWT — it is valid for 90 days
- Use it in API calls:
Authorization: Bearer <token>
Test tokens have full access to your affiliate account including creating bookings
and processing payments. Never embed them in client-side code or commit them to
version control. Regenerate your test token if you suspect it has been exposed.
To revoke a test token before it expires, click Revoke token next to it in
the Developer Settings page. You can generate a new one at any time.
Production authentication flow
For a live integration where your end users log in:
- Register your redirect URI with Seyaha — go to Developer → OAuth settings and
click Add redirect URI
- Direct users to the Seyaha login URL provided in Developer Settings
- After login, Seyaha redirects to your URI with a short-lived authorization code
- Exchange the code for a JWT by calling the token endpoint
- Use the JWT in
Authorization: Bearer headers — default TTL is 1 hour
- Refresh before expiry using the refresh token returned alongside the JWT
Contact [email protected] to request OAuth setup for your account.
API base URL
User-scoped endpoints are under:
Store these alongside your credentials in your environment configuration.
Your affiliate ID
Your affiliate account identifier is shown at the top of the Developer Settings page.
Include it when contacting support so we can locate your account quickly.
When creating bookings via the API, the JWT automatically associates the booking with
your affiliate account — you do not need to pass your affiliate ID as a parameter.
Webhook configuration
Receive real-time events for bookings attributed to your account:
- Click Add webhook endpoint
- Enter your publicly accessible HTTPS endpoint URL
- Select the events to receive:
- Click Save endpoint
Seyaha sends a POST request with a JSON body and a x-seyaha-signature header
for verification. See Webhooks for the HMAC signature
verification algorithm (same scheme used across all Seyaha webhook types).
Testing your webhook
Click Send test event next to any saved endpoint to receive a sample payload.
The test event is marked with "test": true in the payload so your handler can
ignore it in production.
Testing your integration
Use the Test connection button to verify your JWT is valid:
A 200 OK with a data array confirms your token is active.
Next steps