Booking status lifecycle
Booking Attempt → (payment received) → Paid by Customer → (cancelled) → Cancelled
Create a booking
POST /api/v1/resellers/add-booking
curl -X POST https://api.seyaha.net/api/v1/resellers/add-booking \
-H "x-api-token: $RESELLER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"activity_id": "6744810075becd2ef8c140f7",
"variation_id": "6751ad2d7533f379c9a1711b",
"customer_details": {
"name": "Jane Smith",
"email": "[email protected]",
"phone": "+966501234567"
},
"booking_details": {
"booking_date": "2026-07-15",
"booking_time": "10:00",
"currency": "USD",
"guests": { "adult": 2, "child": 1, "infant": 0 },
"pickup_address": {
"address": "Riyadh Marriott Hotel",
"lat": 24.6877,
"lng": 46.7219
}
}
}'
const res = await fetch('https://api.seyaha.net/api/v1/resellers/add-booking', {
method: 'POST',
headers: {
'x-api-token': process.env.RESELLER_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify({
activity_id: activityId,
variation_id: varId,
customer_details: {
name: 'Jane Smith',
email: '[email protected]',
phone: '+966501234567',
},
booking_details: {
booking_date: '2026-07-15',
booking_time: '10:00',
currency: 'USD',
guests: { adult: 2, child: 1, infant: 0 },
},
}),
});
const { data: booking } = await res.json();
// booking.status === 'Booking Attempt'
// Save booking._id for the payment-success call
status: "Booking Attempt". The slot is reserved but not
confirmed until payment is posted.
Confirm after payment
Once your payment gateway confirms payment, post the external payment ID to convert the booking toPaid by Customer:
POST /api/v1/resellers/payment-success
curl -X POST https://api.seyaha.net/api/v1/resellers/payment-success \
-H "x-api-token: $RESELLER_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"booking_id": "67c896a6639e6ff76dd2f882",
"external_payment_id": "pay_1N9dvSLkdIwHu2QOxgMtN9dE"
}'
const res = await fetch('https://api.seyaha.net/api/v1/resellers/payment-success', {
method: 'POST',
headers: {
'x-api-token': process.env.RESELLER_TOKEN,
'Content-Type': 'application/json',
},
body: JSON.stringify({
booking_id: bookingId,
external_payment_id: paymentGatewayId,
}),
});
const { data: confirmedBooking } = await res.json();
// confirmedBooking.status === 'Paid by Customer'
Cancel a booking
Cancellation processes a refund according to the activity’s cancellation policy.
Only bookings with status
Paid by Customer can be cancelled. Cancellation is
irreversible — there is no undo endpoint.POST /api/v1/resellers/bookings/cancel-booking
curl -X POST https://api.seyaha.net/api/v1/resellers/bookings/cancel-booking \
-H "Authorization: Bearer $RESELLER_JWT" \
-H "Content-Type: application/json" \
-d '{ "booking_id": "67c896a6639e6ff76dd2f882" }'
const res = await fetch(
'https://api.seyaha.net/api/v1/resellers/bookings/cancel-booking',
{
method: 'POST',
headers: {
'Authorization': `Bearer ${resellerJwt}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({ booking_id: bookingId }),
}
);
Look up bookings for a user
GET /api/v1/resellers/users/bookings/{user_id}
curl "https://api.seyaha.net/api/v1/resellers/users/bookings/$USER_ID?page=1&pageSize=10" \
-H "x-api-token: $RESELLER_TOKEN"
const params = new URLSearchParams({ page: '1', pageSize: '10' });
const res = await fetch(
`https://api.seyaha.net/api/v1/resellers/users/bookings/${userId}?${params}`,
{ headers: { 'x-api-token': process.env.RESELLER_TOKEN } }
);
Booking object reference
| Field | Description |
|---|---|
_id | Booking ID |
status | Booking Attempt / Paid by Customer / Cancelled |
partnerConfirmation | Pending / Confirmed / Rejected / Not Required |
bookingDate | Date of the activity (YYYY-MM-DD) |
bookingTime | Time of the activity (HH:mm) |
price.totalPrice | Total amount charged |
external_payment_id | Payment gateway reference (set after payment-success) |
