Skip to main content

Overview

OrchestratorX Prism​

One integration. Any payment processor. Zero lock-in.

License: Apache 2.0

A high-performance payment abstraction library, and part of OrchestratorX β€” the composable payments platform with , trusted by leading brands worldwide.

GitHub Β· Website Β· Documentation


🎯 Why Prism?​

Today, integrating multiple payment processors either makes developers running in circles with AI agents to recreate integrations from specs, or developers spending months of engineering effort.

Because every payment processor has diverse APIs, error codes, authentication methods, pdf documents to read, and above all - different behaviour in the actual environment when compared to documented specs. All this rests as tribal or undocumented knowledge making it harder AI agents which are very good at implementing clearly documented specification.

Prism is a stateless, unified connector library for AI agents and Developers to connect with any payment processor

Prism offers hardened transformation through testing on payment processor environment & iterative bug fixing

Prism can be embedded in you server application with its wide range of multi-language SDKs, or run as a rRPC microservice

❌ Without Prismβœ… With Prism
πŸ—‚οΈ 100+ different API schemasπŸ“‹ Single unified schema
⏳ Never ending agent loops/ months of integration work⚑ Hours to integrate, Agent driven
πŸ”— Brittle, provider-specific codeπŸ”“ Portable, provider-agnostic code
🚫 Hard to switch providersπŸ”„ Change providers in 1 line

✨ Features​

  • πŸ”Œ 100+ Connectors β€” Stripe, Adyen, Braintree, PayPal, Worldpay, and more
  • 🌍 Global Coverage β€” Cards, wallets, bank transfers, BNPL, and regional methods
  • πŸš€ Zero Overhead β€” Rust core with native bindings, no overhead
  • πŸ”’ PCI-Compliant by Design β€” Stateless, no data storage

πŸ—οΈ Architecture​

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Your Application β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Prism Library β”‚
β”‚ (Type-safe, idiomatic interface) β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
β”‚
β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β–Ό β–Ό β–Ό β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Stripe β”‚ β”‚ Adyen β”‚ β”‚ Braintreeβ”‚ β”‚ 50+ more β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Payment & Capture Flow Sequence​

%%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#B3D9F2', 'primaryTextColor': '#333333', 'primaryBorderColor': '#5B9BD5', 'lineColor': '#666666', 'secondaryColor': '#C5E8C0', 'tertiaryColor': '#F9B872'}}}%%
sequenceDiagram
autonumber
participant App as Your App
participant SDK as Prism
participant PSP as Payment Service Provider (PSP)

Note over App,PSP: Payment Authorization
App->>SDK: paymentservice.authorize(amount, currency, payment_method)
activate SDK
SDK->>PSP: Provider-specific Authorize API call
activate PSP
PSP-->>SDK: Provider-specific response
deactivate PSP
SDK-->>App: Unified authorize response
deactivate SDK

Note over App,PSP: Payment Capture
App->>SDK: paymentservice.capture(payment_id, amount)
activate SDK
SDK->>PSP: Provider-specific Capture API call
activate PSP
PSP-->>SDK: Provider-specific Capture response
deactivate PSP
SDK-->>App: Unified capture response
deactivate SDK

Note over App,PSP: Event Service (Webhooks)
PSP->>App: webhook(event_payload)
activate App
App->>SDK: eventservice.handle(unified_event)
activate SDK
SDK->>App: Unified event payload
deactivate SDK
deactivate App


πŸš€ Quick Start​

Install the Prism Library​

Node.js

npm install @juspay-tech/hyperswitch-prism

Python

pip install hyperswitch-prism

Java

Add to your pom.xml:

<dependency>
<groupId>com.juspay</groupId>
<artifactId>hyperswitch-prism</artifactId>
<version>1.0.0</version>
</dependency>

PHP

composer require juspay/hyperswitch-prism

For detailed installation instructions, see Installation Guide.


Create a Payment Order​

Node.js

const { ConnectorClient, Currency } = require('@juspay/hyperswitch-prism');

async function main() {
const client = new ConnectorClient({
connectors: {
stripe: { apiKey: process.env.STRIPE_API_KEY }
}
});

const order = await client.payments.createOrder({
amount: {
minorAmount: 1000, // $10.00
currency: Currency.USD
},
merchantOrderId: 'order-123'
});

console.log('Order ID:', order.connectorOrderId);
console.log('Client Secret:', order.sessionToken.clientSecret);
}

main().catch(console.error);

Java

import com.juspay.hyperswitchprism.*;

public class Example {
public static void main(String[] args) {
ConnectorClient client = ConnectorClient.builder()
.connector("stripe", StripeConfig.builder()
.apiKey(System.getenv("STRIPE_API_KEY"))
.build())
.build();

CreateOrderResponse order = client.payments().createOrder(
CreateOrderRequest.builder()
.amount(Amount.of(1000, Currency.USD))
.merchantOrderId("order-123")
.build()
);

System.out.println("Order ID: " + order.getConnectorOrderId());
System.out.println("Client Secret: " + order.getSessionToken().getClientSecret());
}
}

πŸ”„ Switching Providers​

Once the basic plumbing is implemented you can leverage Prism's core benefit - switch payment providers by changing one line.

// Before: Using Stripe
const client = new ConnectorClient({
connectors: {
stripe: { apiKey: process.env.STRIPE_API_KEY }
}
});

const order = await client.payments.createOrder({
amount: { minorAmount: 1000, currency: Currency.USD },
merchantOrderId: 'order-123'
});

// After: Switching to Braintree
const client = new ConnectorClient({
connectors: {
braintree: {
publicKey: process.env.BRAINTREE_PUBLIC_KEY,
privateKey: process.env.BRAINTREE_PRIVATE_KEY,
merchantAccountId: process.env.BRAINTREE_MERCHANT_ID
}
}
});

// The createOrder call stays exactly the same!
const order = await client.payments.createOrder({
amount: { minorAmount: 1000, currency: Currency.USD },
merchantOrderId: 'order-123'
});

One integration pattern. Any service category.

No rewriting. No re-architecting. Just swap the connector. Each flow uses the same unified schema regardless of the underlying processor's API differences. No custom code per provider.


πŸ› οΈ Development​

Prerequisites​

  • Rust 1.70+
  • Protocol Buffers (protoc)

Building from Source​

# Clone the repository
git clone https://github.com/manojradhakrishnan/connector-service.git
cd connector-service


# Build
cargo build --release


# Run tests
cargo test

πŸ”’ Security​

  • Stateless by design β€” No PII or PCI data stored
  • Memory-safe β€” Built in Rust, no buffer overflows
  • Encrypted credentials β€” API keys never logged or exposed

Reporting Vulnerabilities​

Please report security issues to security@juspay.in.


⬆ Back to Top

Built and maintained by OrchestratorX