> ## 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.

# Providers

# Payment Providers

fype acts as an orchestrator, delegating the actual money movement to specialized payment gateways. We call these gateways "Providers."

## Supported Providers

Currently, Fype officially supports the following providers for both **one-time payments** and **subscription flows**:

* **Razorpay**: A leading payment gateway in India. Supports card and UPI recurring mandate subscriptions. [View Guide](./razorpay-guide)
* **Cashfree**: Known for high success rates, instant payouts, and robust e-mandates. [View Guide](./cashfree-guide)
* **Simulator**: Fype's internal sandbox provider for instant testing of payments and subscriptions. [View Guide](./simulator-guide)

## Connecting a Provider

To use a live provider like Razorpay, you must connect your gateway account in the fype Dashboard.

1. Go to **Providers** (Connections).
2. Click **Connect Razorpay**.
3. Select the environment (**Sandbox** or **Live**).
4. Provide the required credentials:

* **Key ID**: Your gateway's public key.
* **Key Secret**: Your gateway's secret key.
* **Webhook Secret**: The secret used to verify webhooks coming *from* the gateway to fype.

5. Click **Save Connection**.

## Credential Security

Your gateway credentials are extremely sensitive. fype ensures their safety by:

* **Encryption at Rest**: Credentials are encrypted using `AES-256` (via the Fernet specification) before being stored in our database.
* **Access Control**: Secrets are only decrypted in memory during the short window when fype needs to communicate with the gateway API.
* **Vaulting**: Only authorized fype backend services have access to the encryption keys.

## Switching Providers

The power of fype lies in its decoupled nature. To switch your active provider or update credentials:

1. Update the connection details in the **Providers** tab.
2. fype will immediately begin using the new credentials for all subsequent checkout sessions.

### Explicit Provider Selection

If you have multiple providers connected (e.g., both Razorpay and Cashfree), you can explicitly choose which one to use for a specific payment by passing the `provider` field in the [Create Payment](../integration/api-reference#create-a-payment) API.

```json theme={null}
{
 "amount": 25000,
 "currency": "INR",
 "provider": "cashfree",
 ...
}
```

If no provider is specified, Fype uses its internal default routing (prioritizing Razorpay if available).

## Multi-Gateway Routing (Beta)

fype is currently developing intelligent routing features that will allow you to:

* Route payments based on success rates.
* Failover to a secondary gateway if the primary is down.
* Split traffic between multiple gateways for A/B testing.

*Contact support if you are interested in participating in the Multi-Gateway Beta.*
