Connect Cashfree
Get the Payment Gateway App ID and Secret key from Cashfree, approve your ERP's web address and register the webhook.
Use this guide to connect the school's own Cashfree Payment Gateway account to the School ERP. The card is called Cashfree Payment Gateway. It needs two values: App ID / Client ID and Secret key / Client secret. Cashfree has a test (sandbox) environment and a production environment, each with its own keys.
Before you start#
- The school has a Cashfree Payment Gateway merchant account. For live payments, Cashfree must have activated it.
- You have the school administrator's login for the School ERP.
- Read Set up a gateway in Payment Configuration once.
Cashfree's screens change from time to time. If a menu below looks different, follow Cashfree's own documentation for Payment Gateway API keys, domain whitelisting and webhooks.
Get your keys from Cashfree#
- Sign in to the Cashfree merchant dashboard and open the Payment Gateway product.
- Switch to the test (sandbox) environment.
- Open the developer section and the API keys page. Generate or view the keys.
- Copy the App ID (also called Client ID) and the Secret key (also called Client secret).
Enter them in the School ERP#
- Open General Settings › Payment Configuration.
- Set Environment to Test / sandbox, then select Configure on the Cashfree Payment Gateway card.
- Check that Test environment is selected.
- Paste into App ID / Client ID and Secret key / Client secret.
- Select Save settings.
Cashfree has no Test connection button in the ERP. You prove the keys with a sandbox payment instead.
Approve your ERP's web address in Cashfree#
Cashfree only opens its checkout for web addresses the merchant has approved (whitelisted).
- In the Cashfree dashboard, open the domain whitelisting page in the developer section.
- Add the web address you use to open your School ERP. Cashfree may ask for proof that the website is yours.
- Wait for Cashfree to approve it. Production needs this before parents can pay.
Register the webhook in Cashfree#
- In the ERP, select Copy Webhook URL below the form.
- In the Cashfree dashboard, open the webhooks page in the developer section and add a new endpoint.
- Paste the address and select the payment and refund events.
- Save it. No separate webhook secret is needed for Cashfree; the keys you already saved are enough.
Test, then go live#
- Select Start sandbox payment and complete a test payment. See Test a payment end to end.
- Switch the Cashfree dashboard to production and copy the production App ID and Secret key.
- In the ERP panel select Live environment, paste the production keys, tick Enable and use this gateway for fee payments and select Save settings.
- Copy the live Webhook URL and register it in Cashfree's production webhooks.
- Make sure your ERP's web address is whitelisted in production.
Good to know#
- The ERP confirms every payment with Cashfree before posting a receipt. The webhook makes confirmation quicker.
- Cashfree settlements are not fetched into the ERP. Record each bank settlement by hand. See Reconciliation and settlements.
- Refund from the ERP, not from the Cashfree dashboard. See Refund an online payment.
Troubleshooting#
| What you see | What to do |
|---|---|
| The checkout does not open, or Cashfree reports the domain is not allowed | Whitelist your ERP's web address in Cashfree for that environment. |
| The sandbox payment fails at the start | Check that the keys are Payment Gateway keys from the same environment you selected in the ERP. |
| You changed the keys and confirmations slowed down | The Webhook URL changes when keys change. Copy it again and update the endpoint in Cashfree. |
