API Specification
Visa Pricing API
Get pricing details for a visa type
Endpoint
POST
/api/b2b/visa/pricing.php
This API returns pricing details for a selected visa type including base price, taxes, and service charges.
API Key Authentication
Authenticate requests via HTTP Header or Request ParameterEnjoy Holiday Hub APIs authenticate requests using your unique secret API Key. You can provide your key in either of the following standard formats:
Method 1: Header (Recommended)
Send key in standard HTTP header:
X-API-Key: demo_123456789
Method 2: Body / Query
Send key in JSON payload or query param:
"api_key": "demo_123456789"
Demo Sandbox Key:
Get your production key in Agent Portal
demo_123456789
Request Parameters
| Field | Type | Required | Description |
|---|---|---|---|
VisaTypeId | integer | Required | Selected visa type ID |
Request Example
JSON Response
{
"api_key": "YOUR_API_KEY",
"VisaTypeId": 5
}
cURL Example
curl -X POST "https://enjoyholidayhub.com/api/b2b/visa/pricing.php" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-API-Key: demo_123456789" \
-d '{
"VisaTypeId": 5,
"api_key": "demo_123456789"
}'
Response Example
JSON Response
{
"status": true,
"data": {
"visa_type_id": 5,
"base_price": 5000,
"tax": 500,
"service_charge": 300,
"total_amount": 5800
}
}
Response (Error)
ERROR / NOTICE
Pricing not available
JSON Response
{
"status": false,
"message": "Pricing not available"
}
Important Notes
- 💰 Total amount = base price + tax + service charge
- 📊 Pricing may vary based on visa type
- 🔁 Always fetch pricing before applying
- 🛂 Service charge may include processing fees