Skip to main content

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.

Razorpay Integration Guide

Razorpay is the primary supported provider for Fype. This guide walk you through connecting your Razorpay account to Fype and configuring it for production.

1. Obtain Razorpay API Credentials

  1. Log in to your Razorpay Dashboard.
  2. Navigate to Settings > API Keys.
  3. Select the environment (Test or Live) at the top.
  4. Generate a new Key ID and Key Secret.
  5. Download the .csv file or copy the credentials immediately.

2. Connect to Fype

  1. Log in to the Fype Dashboard.
  2. Navigate to Providers.
  3. Click Connect Razorpay.
  4. Select the environment that matches your Razorpay keys (Sandbox for Razorpay Test, Live for Razorpay Live).
  5. Enter your Key ID and Key Secret.
  6. Click Save Connection.

3. Configure Razorpay Webhooks

Fype needs to receive notifications from Razorpay to update payment statuses automatically.
  1. In the Razorpay Dashboard, go to Settings > Webhooks.
  2. Click + Add New Webhook.
  3. Webhook URL: Set this to https://api.fype.dev/v1/webhooks/razorpay.
  4. Secret: Enter a unique, strong string. You must also provide this secret in the Fype Dashboard Provider settings.
  5. Active Events: Select at least the following:
    • payment.authorized
    • payment.captured
    • payment.failed
    • refund.processed
    • refund.failed
  6. Click Create Webhook.

4. Test the Integration

  1. Create a payment in Fype using your fype_test_ key.
  2. Redirect to the checkout URL.
  3. Since you have connected Razorpay Sandbox, Fype will load the real Razorpay Test UI.
  4. Use Razorpay Test Cards to complete the payment.
  5. Verify that Fype transitions the payment to succeeded and sends a payment.succeeded webhook to your server.

Troubleshooting Razorpay

”Invalid Signature” on Webhooks

Ensure that the Webhook Secret you entered in the Razorpay Dashboard exactly matches the one you provided in the Fype Providers connection settings.

Payments stuck in “Processing”

This usually happens if Razorpay hasn’t sent the payment.captured webhook or if Fype couldn’t verify it. Check your Razorpay Webhook logs for delivery failures.

Refunds failing

Ensure your Razorpay account has sufficient balance to cover the refund amount. Razorpay does not allow refunds if your “Current Balance” is lower than the refund value.