> 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/payments/cashfree.md).

# Cashfree

Cashfree payment gateway for PHPTRAVELS: enable Cashfree in the admin, add your API credentials and accept online payments for bookings at checkout.

Cashfree is an online payment gateway you can enable in PHPTRAVELS so customers pay for bookings at checkout. This guide follows the same layout as PayStack, Flutterwave and Adyen: prerequisites, admin settings, a test booking, then going live.

Parent: [Payments](https://docs.phptravels.com/payments).

### Prerequisites

* Active PHPTRAVELS installation and Admin Panel access
* Cashfree merchant account
* Cashfree API credentials (test and later production)
* At least one currency / payment method your Cashfree account supports

Complete the full flow in Cashfree's test environment before enabling live charges.

### 1. Get API credentials

Sign in to your Cashfree dashboard and open the API keys / developers section for your account.

Copy the credentials PHPTRAVELS asks for in the Cashfree gateway settings (typically app ID / client ID and secret key -- use the exact field labels shown in your admin).

> Never expose production secrets in screenshots, public repositories or frontend code.

### 2. Enable Cashfree in PHPTRAVELS

1. Admin Panel -> **Settings -> Payment Gateways**.
2. Locate **Cashfree** and set it to **Enabled**.
3. Open **Settings**.
4. Set environment to **Development** / test.
5. Paste test credentials into the matching fields.
6. Save.

### 3. Test the connection

If the admin offers **Test Credentials**, run it. Fix any key, environment or IP whitelist issues Cashfree reports, then test again.

### 4. Create a test booking

1. Open the frontend.
2. Create a booking in a currency supported by your Cashfree test account.
3. At payment, choose **Cashfree**.
4. Complete Cashfree's test payment flow (test cards / UPI mocks as Cashfree documents for sandbox).

### 5. Verify

Confirm:

* Customer returns to a successful booking page
* Booking status is paid / confirmed as expected
* Transaction appears in PHPTRAVELS payment records
* Transaction appears in the Cashfree dashboard

### 6. Go live

1. Activate live payments on your Cashfree account.
2. Switch the gateway environment to **Production**.
3. Enter production credentials.
4. Save and run a small live test booking.
5. Disable development keys.

### Notes

* Supported methods and currencies depend on your Cashfree merchant country and account configuration.
* For custom gateway development patterns, see [Adding Payment Gateway](https://docs.phptravels.com/support/for-developers/adding-payment-gateway).


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.phptravels.com/payments/cashfree.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
