> For the complete documentation index, see [llms.txt](https://docs.hyperswitch.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.hyperswitch.io/integrations/prism/prism/installation.md).

# Installation & Configuration

## How to install the prism library?

Start by installing the library from your terminal, using the programming language of your choice. This should be followed by configuring the environment and payment processor API keys to proceed with the next steps.

The below examples are templates for configuring Stripe and Adyen.

### Prerequisites

* Stripe test API key (get one at [stripe.com](https://stripe.com))
* Adyen test API key (get one at [adyen.com/signup](https://www.adyen.com/signup))

{% tabs %}
{% tab title="Node" %}
{% code title="Terminal" overflow="wrap" %}

```bash
npm install hyperswitch-prism
```

{% endcode %}

{% code title="index.js" overflow="wrap" lineNumbers="true" %}

```javascript
const { PaymentClient } = require('hyperswitch-prism');

// Configure Stripe client
const stripeConfig = {
    connectorConfig: {
        stripe: { apiKey: { value: process.env.STRIPE_API_KEY } }
    }
};
const stripeClient = new PaymentClient(stripeConfig);

// Configure Adyen client
const adyenConfig = {
    connectorConfig: {
        adyen: {
            apiKey: { value: process.env.ADYEN_API_KEY },
            merchantAccount: process.env.ADYEN_MERCHANT_ACCOUNT
        }
    }
};
const adyenClient = new PaymentClient(adyenConfig);
```

{% endcode %}
{% endtab %}

{% tab title="Python" %}
{% code title="Terminal" overflow="wrap" %}

```bash
pip install hyperswitch-prism
```

{% endcode %}

{% code title="main.py" overflow="wrap" lineNumbers="true" %}

```python
import os
from hyperswitch_prism import PaymentClient
from hyperswitch_prism.generated import sdk_config_pb2

# Configure Stripe client
stripe_config = {
    "connectorConfig": {
        "stripe": {"apiKey": {"value": os.environ["STRIPE_API_KEY"]}}
    }
}
stripe_client = PaymentClient(stripe_config)

# Configure Adyen client
adyen_config = {
    "connectorConfig": {
        "adyen": {
            "apiKey": {"value": os.environ["ADYEN_API_KEY"]},
            "merchantAccount": os.environ["ADYEN_MERCHANT_ACCOUNT"]
        }
    }
}
adyen_client = PaymentClient(adyen_config)
```

{% endcode %}
{% endtab %}

{% tab title="Java" %}
{% code title="pom.xml" overflow="wrap" %}

```xml
<dependency>
    <groupId>io.hyperswitch</groupId>
    <artifactId>prism</artifactId>
    <version>1.0.0</version>
</dependency>
```

{% endcode %}

{% code title="Main.java" overflow="wrap" lineNumbers="true" %}

```java
import com.juspay.hyperswitch.prism.PaymentClient;

// Configure Stripe client
Map<String, Object> stripeConfig = new HashMap<>();
Map<String, Object> stripeConnectorConfig = new HashMap<>();
stripeConnectorConfig.put("apiKey", SecretString.of(System.getenv("STRIPE_API_KEY")));
stripeConfig.put("connectorConfig", Map.of("stripe", stripeConnectorConfig));
PaymentClient stripeClient = new PaymentClient(stripeConfig);

// Configure Adyen client
Map<String, Object> adyenConfig = new HashMap<>();
Map<String, Object> adyenConnectorConfig = new HashMap<>();
adyenConnectorConfig.put("apiKey", SecretString.of(System.getenv("ADYEN_API_KEY")));
adyenConnectorConfig.put("merchantAccount", System.getenv("ADYEN_MERCHANT_ACCOUNT"));
adyenConfig.put("connectorConfig", Map.of("adyen", adyenConnectorConfig));
PaymentClient adyenClient = new PaymentClient(adyenConfig);
```

{% endcode %}
{% endtab %}
{% endtabs %}

That would be all. The SDK handles native library loading automatically. Start building in the [First Payment](/integrations/prism/prism/first-payment.md).

## Minimum version supported

The prerequisites are:

* **Node.js**: 16+ (FFI bindings require native compilation)
* **Python**: 3.9+ (uses `ctypes` for FFI)
* **Java**: 11+ (uses JNI bindings)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hyperswitch.io/integrations/prism/prism/installation.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
