Hyperswitch Prism favicon

Hyperswitch Prism

Hyperswitch Prism: The Unified Stateless Connector Library for Seamless Payment Processor Integration

Introduction:

Hyperswitch Prism is an open-source, stateless payments library designed to unify multiple payment processor integrations into a single schema. Built by the Juspay team, it allows businesses to switch between gateways like Stripe and Adyen with minimal code, reducing PCI scope and eliminating vendor lock-in.

Added On:

2026-05-14

Monthly Visitors:

631004.1K

Hyperswitch Prism - AI Tool Screenshot and Interface Preview

Hyperswitch Prism Product Information

Hyperswitch Prism: The Unified Stateless Connector Library for Every Payment Processor

In the rapidly evolving landscape of digital commerce, managing multiple payment processor integrations has historically been a complex and resource-intensive task. Hyperswitch Prism emerges as a powerful solution to this challenge. As a stateless, unified connector library, Hyperswitch Prism allows developers to connect with any payment processor through a single integration, enabling them to switch processors with just a few lines of code.

Extracted from the battle-hardened integrations of Juspay Hyperswitch—an open-source payments platform trusted by leading enterprise merchants—Hyperswitch Prism represents years of iterative bug fixing and continuous testing against real-world sandbox and production environments.

What is Hyperswitch Prism?

Hyperswitch Prism is a lightweight, developer-friendly payments library designed to open up payment diversity to the global market. At its core, it is a stateless transformation layer that sits between your application and various payment gateways.

Historically, payment processor integrations have been difficult because every provider maintains diverse APIs, unique error codes, varying authentication methods, and behavioral discrepancies between documentation and actual environments. This often results in "tribal knowledge" being locked within large enterprise payment platforms. Hyperswitch Prism democratizes this knowledge by providing a simple, zero lock-in library that treats payment integrations with the same standardized logic one might expect from database drivers.

Key Features of Hyperswitch Prism

Hyperswitch Prism is built with several core principles that make it a robust choice for modern financial technology stacks:

1. Unified Request Schema

One of the most significant advantages of using Hyperswitch Prism is its unified request schema. Whether you are making an authorize call to Stripe, Adyen, or Braintree, the same code works across the board. You no longer need to write custom logic for every different payment processor API.

2. Stateless Architecture

Hyperswitch Prism is entirely stateless. It does not utilize a database and does not store any Personally Identifiable Information (PII). Your credentials are never logged or stored by the library; they exist only for the duration of the HTTP client's lifetime. This makes it an incredibly secure and lightweight addition to any stack.

3. PCI Scope Reduction

Security is a top priority for any business accepting payments. Hyperswitch Prism helps in PCI scope reduction by giving you full control over card data flow. You can choose to use the library with your own PCI-certified vault or leverage the vault provided by a specific payment processor. Because the library stores nothing, your data remains within your controlled environments.

4. Extensive Connector Coverage

Hyperswitch Prism supports a wide range of connectors. Each connector is categorized by its implementation status, ensuring transparency regarding supported payment methods and flows. This includes fully tested integrations, partial implementations, and those requiring further validation against live environments.

Use Cases for Hyperswitch Prism

Businesses can leverage Hyperswitch Prism in various scenarios to optimize their payment workflows:

  • Multi-Processor Redundancy: Avoid downtime by integrating multiple processors. If one payment processor experiences an outage, you can switch to another by simply changing a few lines of configuration.
  • Geographic Expansion: Different regions often prefer different payment gateways. Hyperswitch Prism allows you to add regional processors without rebuilding your entire payment infrastructure.
  • Cost Optimization: Route transactions to specific processors based on currency or card type to minimize processing fees.
  • AI-Assisted Development: Developers building with AI assistants can point their tools to the provided SDK reference (via curl) to quickly generate accurate payment logic for any supported processor.

Technical Architecture

The architecture of Hyperswitch Prism is designed for high performance and type safety. The library is primarily written in Rust, ensuring memory safety and speed. It provides multi-language SDKs that offer an idiomatic interface for developers.

Architecture Overview: Your Application -> Prism Library (Type-safe SDK) -> Specific Connectors (Stripe, Adyen, Braintree, etc.)

How to Use Hyperswitch Prism

Integrating Hyperswitch Prism into your project is straightforward. The library supports major programming languages including Node.js, Python, Java, and Rust.

Installation

Depending on your environment, run the following commands:

  • Node.js: npm install hyperswitch-prism
  • Python: pip install hyperswitch-prism
  • Java/Kotlin: Add the following dependency to your pom.xml:
<dependency>
    <groupId>io.hyperswitch</groupId>
    <artifactId>prism</artifactId>
    <version>0.0.4</version>
</dependency>

Making a Payment (Node.js Example)

Below is a basic example of how to authorize a payment using the Hyperswitch Prism unified schema:

import { PaymentClient, types } from 'hyperswitch-prism';

let config = {
    connectorConfig: {
        stripe: { apiKey: { value: "sk_test_..." } }
    }
}

const main = async () => {
    let client = new PaymentClient(config);
    let request = {
        merchantTransactionId: "authorize_123",
        amount: { minorAmount: 1000, currency: types.Currency.USD },
        captureMethod: types.CaptureMethod.AUTOMATIC,
        paymentMethod: {
            card: {
                cardNumber: { value: "4111111111111111" },
                cardExpMonth: { value: "12" },
                cardExpYear: { value: "2050" },
                cardCvc: { value: "123" },
                cardHolderName: { value: "Test User" },
            },
        },
        authType: types.AuthenticationType.NO_THREE_DS,
    };
    let response = await client.authorize(request);
    if (response.status === types.PaymentStatus.CHARGED) {
        console.log("Payment successful");
    }
}

Routing Between Providers

Switching between Stripe and Adyen based on business logic (like currency) is simple with Hyperswitch Prism:

const currency = types.Currency.USD;
const config = currency === types.Currency.EUR ? adyenConfig : stripeConfig;
const client = new PaymentClient(config);
// The authorize call remains exactly the same!

Frequently Asked Questions (FAQ)

Q: Does Hyperswitch Prism include a built-in vault? A: No. Hyperswitch Prism is designed to be stateless. You can bring your own vault or use the vault provided by the payment processor.

Q: Does the library handle retry logic or smart routing? A: Hyperswitch Prism acts as the transformation layer. Advanced features like smart retries and intelligent routing are managed by the full Juspay Hyperswitch platform.

Q: What happens if a payment processor is not supported? A: The Hyperswitch Prism community and the team at Juspay are constantly adding new connectors. You can check the current status of implementation in the documentation legend (Supported, In Progress, Needs Validation).

Q: Is it safe to use in a production environment? A: Yes. Hyperswitch Prism is extracted from the hardened integrations used by Juspay Hyperswitch, which handles payments for leading global enterprises.


For more information on contributing or platform support, visit the official documentation or join the Slack community.

Loading related products...