> For the complete documentation index, see [llms.txt](https://docs.phptravels.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.phptravels.com/modules/flights/pkfare.md).

# Pkfare

PKfare flights API for PHPTRAVELS: get PKfare API credentials, enter them in the flights module, run test searches and bookings, then switch to live.

### About PKfare

PKfare is a B2B flight distributor that gives travel agencies access to airline fares, including consolidator and low-cost content, through an API. PHPTRAVELS lists PKfare as a supplier in the **Flights** module, so its fares can appear in your flight results beside your other suppliers, priced with your markup.

### Before you begin

* A PKfare agency account with API access for your company. PKfare approves partners and sets deposit or credit terms.
* The API credentials PKfare issues to your agency, for the test environment and later for production. Check the exact values with your PKfare account manager.
* An installed and licensed PHPTRAVELS website with admin access.

### Enter the credentials

1. Log in to `yourdomain.com/admin`.
2. Open **Settings > Modules** and select **PKfare** in the flights list.
3. On the **General** tab, enable the module, keep **Dev mode** on development and choose the module currency.
4. On the **Credentials** tab, paste the PKfare values into their labelled fields. Click **Test** if it appears, then save.
5. Add B2C and B2B margins on the **Markup** tab.

### Run a test

1. Search a route PKfare sells, one adult, a few weeks ahead.
2. Open a fare and check the baggage, fare rules and total price.
3. Make a test booking and confirm the PKfare reference is saved on the booking in the admin.
4. Check the customer confirmation email and the invoice.
5. When the result is correct, enter production credentials and switch **Dev mode** to production.

### Common errors

* **Signature or authentication error** -- the credentials are wrong, or test values are used in production.
* **Fare changed or unavailable** -- the airline re-priced the seat; run the search again.
* **Booking held but not ticketed** -- ticketing may need deposit or credit on your PKfare account.
* **Prices look too high** -- check that the markup is percentage, not fixed, and the currency matches.

Need help? [Submit a ticket](https://docs.phptravels.com/support/submit-ticket) with your Order ID and the error text.
