API Specification
Visa Cancel API
Cancel a visa application and process refund
Endpoint
POST
/api/b2b/visa/cancel.php
This API allows cancellation of a visa application. Refund eligibility depends on the current processing stage and visa policy.
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 |
|---|---|---|---|
ApplicationId | integer | Required | Visa application ID |
Remarks | string | Optional | Reason for cancellation |
Request Example
JSON Response
{
"api_key": "YOUR_API_KEY",
"ApplicationId": 1001,
"Remarks": "Customer changed travel plans"
}
cURL Example
curl -X POST "https://enjoyholidayhub.com/api/b2b/visa/cancel.php" \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "X-API-Key: demo_123456789" \
-d '{
"ApplicationId": 1001,
"Remarks": "Customer changed travel plans",
"api_key": "demo_123456789"
}'
Response Example
JSON Response
{
"status": true,
"data": {
"cancel_id": 701,
"application_id": 1001,
"status": "cancelled",
"refund_amount": 3000,
"refund_status": "processing"
}
}
Response (Error)
ERROR / NOTICE
Cancellation not allowed or application already processed
JSON Response
{
"status": false,
"message": "Cancellation not allowed or application already processed"
}
Important Notes
- ⚠️ Cancellation depends on application status
- ❌ Applications already approved/rejected may not be cancellable
- 💰 Refund depends on processing stage
- ⏳ Refund processing may take time
- 🛂 Always check status before cancelling