Skip to navigation

Cancelling

Cancel a whole booking in one call
View as Markdown

You cancel a whole booking in a single call. The API cancels the full booking and emails the confirmation on its own.

Cancellation flow: send the cancel, booking is cancelled, confirmation email
Cancellations always succeed

All cancellation requests are approved, and the associated tickets are cancelled within the cancellationTimeLimit period. The refund amount, however, differs depending on the agreed policies with SAR.

Send the cancel

Call OTA_CancelRQ with the W1 record locator in uniqueID (type 14) and set cancelType to Commit.

{
"version": "2.001",
"pos": {
"source": [
{
"isoCurrency": "SAR",
"requestorID": { "id": "AGENT001", "name": "Sample Travel", "type": "5" },
"bookingChannel": { "type": "OTA" }
}
]
},
"uniqueID": [{ "id": "N6G2NW", "type": "14" }],
"cancelType": "Commit"
}

What comes back

The response returns status CANCELLED for the same locator.

{
"success": {},
"uniqueID": [{ "type": "14", "id": "N6G2NW" }],
"segment": [],
"status": "CANCELLED",
"timeStamp": "2026-05-01T09:45:27.963Z",
"version": 2.001,
"retransmissionIndicator": false
}

The railway sends the cancellation email to the CTC contact automatically. You do not send it yourself. If the traveler needs it again, resend it.

This covers full cancellation, which is what production supports. For the complete request and response, see the GO7 cancel_booking page.

How is the refund amount determined?

The refund amount is calculated based on the fare and cancellation policies agreed with SAR. This includes the refund amount, the refund percentage, and any other refund-related terms defined in that agreement. The system checks those rules for your agency on every cancellation and applies the matching one.

You are responsible for refunding your clients. The refunded amount is credited to your wallet. Returning that amount to your clients is your responsibility, not SAR’s.

Refunds are credited to your wallet

SAR credits the refund to your wallet. You are responsible for passing it on to your clients.

Read the penalty before you cancel

The booking tells you what a cancellation costs, so you can show the traveler the charge before you commit. Every booking response, and OTA_ReadRQ, carries the penalty rules for each segment under fareInfos.fareInfo[].ruleInfo.chargesRules. The ones that matter are in voluntaryRefunds.TPA_Extensions.penaltyRules.

"ruleInfo": {
"chargesRules": {
"voluntaryRefunds": {
"TPA_Extensions": {
"penaltyRules": [
{
"passengerTypeCode": "ADT",
"rules": [
{
"currency": "SAR",
"refundable": true,
"base": 15.00,
"tax": 2.25,
"total": 17.25,
"vat": 15.00,
"applyFromTime": "2026-05-19T14:21:00Z",
"applyUntilTime": "2026-05-20T14:01:00Z",
"description": [
{ "locale": "en_GB", "value": "Between 20 minutes - 24hours (%)" },
{ "locale": "ar_SA", "value": "Between 20 minutes - 24hours (%)" }
]
},
{
"currency": "SAR",
"refundable": true,
"base": 50.00,
"tax": 7.50,
"total": 57.50,
"vat": 15.00,
"applyFromTime": "2026-05-20T14:01:00Z",
"applyUntilTime": "2026-05-20T14:21:00Z",
"description": [
{ "locale": "en_GB", "value": "Less than 20 minutes (%)" },
{ "locale": "ar_SA", "value": "Less than 20 minutes (%)" }
]
}
]
}
]
}
}
},
"tpaextensions": {
"confirmationTimeLimit": "2026-05-17T10:49:00Z",
"updateTravellersTimeLimit": "2026-05-17T10:20:00Z",
"cancellationTimeLimit": "2026-05-20T14:01:00Z"
}
}

Rules are grouped by passenger type, so an adult, a child, and an infant can each carry a different charge. Within a group, each rule covers one time window. Find the rule whose window contains the moment you cancel and show its total.

FieldWhat it is
passengerTypeCodeThe passenger type the rules apply to: ADT, CHD, or INF.
refundableWhether a voluntary refund is allowed under this rule.
base, tax, totalThe penalty before tax, the tax on it, and the sum.
vatThe VAT percentage applied to the penalty, so 15.00 means 15%.
currencyThe currency of the amounts.
applyFromTime, applyUntilTimeThe window this rule covers, in UTC.
descriptionThe rule in words, in English (en_GB) and Arabic (ar_SA).

The same block also carries voluntaryChanges.TPA_Extensions.penaltyRules. The railway returns it for reference only: voluntary changes to a ticketed journey are not supported, so do not offer them. A segment that has been cancelled carries no rule information at all.