Documentation Index
Fetch the complete documentation index at: https://docs.fype.dev/llms.txt
Use this file to discover all available pages before exploring further.
Cashfree Integration Guide
Cashfree is a robust payment gateway in India that offers advanced features like instant settlements and a wide variety of payment modes. Fype’s Cashfree integration allows you to leverage these features through a unified interface.1. Obtain Cashfree API Credentials
To connect Cashfree to Fype, you need your App ID (Client ID) and Secret Key (Client Secret).- Log in to your Cashfree Merchant Dashboard.
- Switch to the desired environment (Test or Production) using the toggle at the top right.
- Navigate to Payment Gateway > Developers > API Keys.
- Copy your App ID and Secret Key.
2. Connect to Fype
- Log in to the Fype Dashboard.
- Navigate to Connections.
- Click Connect Cashfree.
- Select the environment:
- Sandbox: Use this for Cashfree Test credentials (App ID starts with
TEST). - Live: Use this for Cashfree Production credentials (App ID starts with
PROD).
- Sandbox: Use this for Cashfree Test credentials (App ID starts with
- Enter your
App IDandSecret Key. - (Optional but Recommended) Enter a Webhook Secret. You will set this in the Cashfree Dashboard in the next step.
- Click Save Connection.
3. Configure Cashfree Webhooks
Fype needs webhooks to receive real-time updates from Cashfree.- In the Cashfree Dashboard, navigate to Payment Gateway > Developers > Webhooks.
- Click + Add New Webhook.
- Webhook URL: Set this to
https://api.fype.dev/v1/webhooks/cashfree. - Webhook Secret: Enter a strong, unique string. This must match the Webhook Secret you provided in the Fype Dashboard.
- Events: Subscribe to the following events:
PAYMENT_SUCCESS_WEBHOOKPAYMENT_FAILED_WEBHOOKPAYMENT_USER_DROPPED_WEBHOOKREFUND_STATUS_WEBHOOK
- Click Save.
4. Verification
- Test Transaction: Create a payment using your Fype Test API Key.
- Checkout: Follow the
checkout_url. Fype will load the Cashfree Web Checkout SDK. - Status Sync: Verify in the Fype Dashboard that the payment status transitions to
succeeded. - Webhook Delivery: Confirm that your backend received the
payment.succeededevent from Fype.
Troubleshooting
Signature Verification Failed
Cashfree signatures are sensitive to the raw request body. Ensure that the Webhook Secret in Fype matches the one in Cashfree exactly. If you are using a proxy or middleware that modifies the request body, signature verification will fail.Order Expired
Cashfree orders have a default expiry. If a customer stays on the checkout page too long without completing the payment, the order will expire. Fype handles this by marking the payment asfailed.
Refund Status Pending
Cashfree refunds may sometimes remain inPENDING state if the upstream bank is slow. Fype will update the refund status once it receives the REFUND_STATUS_WEBHOOK with a final state.