> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gojinko.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Flight Refund

> Check refund eligibility, commit a refund, or check refund status for a booked flight

<Accordion title="Tool description (what the LLM sees)" defaultOpen={false}>
  ```text theme={null}
  Check refund eligibility, commit a refund, or check refund status for a booked flight. No login required, authenticate with the Jinko booking reference and traveler last name.

  PREREQUISITES:
  - booking_ref (JNK-XXXXXX format) and last_name of the primary traveler from the booking confirmation email.

  WORKFLOW:
  1. action="check" with booking_ref + last_name → review eligibility, amounts, penalties
  2. If refundable and user confirms, action="commit" with booking_ref + last_name → capture refund_reference
  3. action="status" with booking_ref + last_name (+ optional refund_reference) → poll progress

  IMPORTANT:
  - Always check eligibility before committing.
  - Always get explicit user confirmation before committing a refund.
  - Some refunds require manual processing, the response flags support_level and is_automatable.
  - Refund amounts may include penalties.
  ```
</Accordion>

## Parameters

| Name               | Type                                     | Required | Description                                                                                                                                                                                                                                                                                                                                                                                                                                    |
| ------------------ | ---------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `action`           | `enum ("check" \| "commit" \| "status")` | Yes      | Action to perform: "check" to check refund eligibility, "commit" to confirm the refund, "status" to poll refund progress                                                                                                                                                                                                                                                                                                                       |
| `booking_ref`      | `string`                                 | Yes      | Jinko booking reference (e.g. JNK-A7B3X9). Found in the booking confirmation email.                                                                                                                                                                                                                                                                                                                                                            |
| `last_name`        | `string`                                 | Yes      | Last name of the primary traveler on the booking.                                                                                                                                                                                                                                                                                                                                                                                              |
| `order_id`         | `string`                                 | No       | Provider order ID. Optional, provided only by authenticated DevPlatform callers who already resolved it.                                                                                                                                                                                                                                                                                                                                       |
| `provider`         | `string`                                 | No       | Provider code (e.g., "travelfusion", "sabre"). Usually auto-detected from the booking.                                                                                                                                                                                                                                                                                                                                                         |
| `ticket_numbers`   | `array<string>`                          | No       | Specific ticket numbers to refund (for partial refunds). Omit for full booking refund.                                                                                                                                                                                                                                                                                                                                                         |
| `refund_reference` | `string`                                 | No       | Refund reference ID returned from a previous commit action. Required for status checks.                                                                                                                                                                                                                                                                                                                                                        |
| `user_intent`      | `string`                                 | No       | The end user's current request in their own words, e.g. "find a cheap flight to Tokyo in mid-June". Pass it as-is when short; otherwise condense the goal and constraints into 1-2 sentences. Strip personal identifiers (names, emails, phone numbers, addresses, payment details), replace them with placeholders like "\[name]". Optional and never changes the result of the call; Jinko uses it to understand demand and improve results. |

## Examples

**Check refund eligibility:**

```json theme={null}
{
  "name": "flight_refund",
  "arguments": {
    "action": "check",
    "booking_ref": "JNK-ABC123",
    "last_name": "Doe"
  }
}
```

`booking_ref` + `last_name` are always required. If the DevPlatform `order_id` is already known, pass it additionally to skip the booking lookup.

**Commit a refund after checking eligibility:**

```json theme={null}
{
  "name": "flight_refund",
  "arguments": {
    "action": "commit",
    "booking_ref": "JNK-ABC123",
    "last_name": "Doe"
  }
}
```

Response includes a `refund_reference`. Poll `refund_status` until terminal:

```json theme={null}
{
  "name": "flight_refund",
  "arguments": {
    "action": "status",
    "booking_ref": "JNK-ABC123",
    "last_name": "Doe",
    "refund_reference": "REF-xyz789"
  }
}
```

Terminal states: `succeeded`, `failed`, `cancelled`. Poll every \~15-30 seconds.

<Note>
  `check` is read-only and never triggers a refund. Always show eligibility + `refundable_amount` to the user and get explicit confirmation before calling `commit`.
</Note>
