> 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/architecture/connector-settings-and-overrides.md).

# Connector Settings and Overrides

Prism provides three configurable settings per connector: **Proxy**, **Timeout**, and **Retry**.

It offers the flexibility to enable the setting could be enabled at a connector level or overridden per request.

| Setting     | Description                                                                                                                                                     | Default |
| ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------- |
| **Proxy**   | HTTP proxy URL for routing requests to a target endpoint. You may leverage this when you choose to outsource PCI compliance to a compliant third party endpoint | None    |
| **Timeout** | Request timeout from API call in milliseconds. You may tweak this for processor which are slower to respond.                                                    | 30000ms |
| **Retry**   | Number of API retry attempts on failure, incase of network failures                                                                                             | 0       |

## Configuration at Connector Level

The below example is a connector level configuration of the API keys. Timeout and proxy settings are configured per-request using RequestConfig.

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

const config = {
    connectorConfig: {
        stripe: {
            apiKey: { value: process.env.STRIPE_API_KEY }
        },
        adyen: {
            apiKey: { value: process.env.ADYEN_API_KEY },
            merchantAccount: process.env.ADYEN_MERCHANT_ACCOUNT
        }
    }
};
const paymentClient = new PaymentClient(config);
```

## Override at a Request Level

This is an example of overriding the settings for a single request for timeout and proxy using RequestConfig.

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

const config = {
    connectorConfig: {
        stripe: { apiKey: { value: process.env.STRIPE_API_KEY } }
    }
};
const paymentClient = new PaymentClient(config);

// Longer timeout for 3D Secure flows - use RequestConfig
const response = await paymentClient.authorize({
    merchantTransactionId: 'order-001',
    amount: { minorAmount: 1000, currency: types.Currency.USD },
    paymentMethod: { card: { /* card details */ } },
    captureMethod: types.CaptureMethod.MANUAL,
    address: { billingAddress: {} },
    authType: types.AuthenticationType.THREE_DS,
    returnUrl: "https://example.com/return"
}, {
    http: {
        totalTimeoutMs: 120000,   // 2 minute timeout for this request
        proxy: {
            httpUrl: "http://proxy.example.com:8080"
        }
    }
});
```

## Proxy for PCI Vault

If you wish your payment request to be routed through a PCI compliant endpoint, you may configure it at request level like below.

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

const config = {
    connectorConfig: {
        stripe: { apiKey: { value: process.env.STRIPE_API_KEY } }
    }
};
const paymentClient = new PaymentClient(config);

// Route through PCI vault proxy
const response = await paymentClient.authorize({
    merchantTransactionId: 'order-001',
    amount: { minorAmount: 1000, currency: types.Currency.USD },
    paymentMethod: { card: { /* card details */ } },
    captureMethod: types.CaptureMethod.AUTOMATIC,
    address: { billingAddress: {} },
    authType: types.AuthenticationType.NO_THREE_DS,
    returnUrl: "https://example.com/return"
}, {
    http: {
        proxy: {
            httpsUrl: "https://tntxxx.sandbox.verygoodproxy.com"
        }
    }
});
```


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.hyperswitch.io/integrations/prism/architecture/connector-settings-and-overrides.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
