> ## Documentation Index
> Fetch the complete documentation index at: https://developers.orchestrasolutions.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Store and manage payment processor credentials securely.

<Info>
  [← Back to API Reference](/api-reference/overview)
</Info>

Payment Gateway Accounts store your PSP (Payment Service Provider) credentials securely in Orchestra. Once stored, you can reference them by name when processing payments through either the [REST API](/api-reference/paymentgateway/overview) or the [Payments Library](/guides/library/setup).

## How It Works

1. **Choose a PSP** from Orchestra's [{supportedIntegrations} supported processors](https://orchestrasolutions.com/integrations/)
2. **Obtain credentials** from your PSP (API keys, merchant IDs, etc.)
3. **Store in Orchestra** via the Portal or this API
4. **Reference by name** in your payment requests

## Why Use Payment Gateway Accounts?

* **Security**  - Keep sensitive PSP credentials out of your own systems
* **Multi-gateway setups**  - Store credentials for multiple processors and switch between them dynamically
* **Failover support**  - Configure multiple PSPs and let Orchestra route transactions automatically
* **Platforms/SaaS**  - Process payments on behalf of your customers using their merchant accounts
* **Environment separation**  - Maintain separate accounts for sandbox and production

<Note>
  You can also provide PSP credentials inline with each request instead of storing them, but stored accounts are recommended for security and convenience.
</Note>

<Tip>
  **Prefer a UI?** You can also manage Payment Gateway Accounts through the [Orchestra Portal](https://portal.orchestrasolutions.com/#/resource/paymentGateway/create). The API is useful for automation, CI/CD pipelines, or programmatic management.
</Tip>

## Finding Required Credentials

Each PSP requires different credentials. Use the [List Gateways](/api-reference/paymentgateway/list-all-payment-gateways) endpoint to find the `credentialsNames` required for your PSP, or check the [Gateway Requirements](/guides/rest-api/gateway-requirements) guide for PSP-specific details.

***

## Endpoints

<CardGroup cols={2}>
  <Card title="List Accounts" icon="list" href="/api-reference/paymentgatewayaccounts/list-payment-gateway-accounts">
    Retrieve all stored payment gateway accounts.
  </Card>

  <Card title="Retrieve Account" icon="magnifying-glass" href="/api-reference/paymentgatewayaccounts/retrieve-payment-gateway-account">
    Get details for a specific account including credentials.
  </Card>

  <Card title="Add or Replace" icon="plus" href="/api-reference/paymentgatewayaccounts/add-or-replace-a-payment-gateway-account">
    Store new PSP credentials or update existing ones.
  </Card>

  <Card title="Delete Account" icon="trash" href="/api-reference/paymentgatewayaccounts/delete-a-payment-gateway-account">
    Permanently remove a stored account.
  </Card>
</CardGroup>

<Warning>
  Deleting an account is permanent. Ensure no active integrations reference the account before deleting.
</Warning>
