Skip to main content
Automate gateway credential management: create, update, and delete payment gateway accounts programmatically instead of using the Portal UI. Ideal for CI/CD pipelines and multi-environment deployments.
Payment Gateway Accounts store your processor credentials securely in Orchestra. While most users configure these through the Portal, you can also manage them programmatically.
Account names must be 3-64 alphanumeric characters (no spaces or special characters).

Create or Update an Account

Endpoint: PUT /PaymentGatewayAccounts/{name}
const response = await fetch('https://api.orchestrasolutions.com/PaymentGatewayAccounts/stripe-production', {
  method: 'PUT',
  headers: {
    'Content-Type': 'application/json',
    'X-Api-Key': 'YOUR_API_KEY'
  },
  body: JSON.stringify({
    paymentGatewayName: 'Stripe',
    credentials: [
      { Key: 'SecretKey', Value: 'sk_live_...' }
    ]
  })
});

Request Parameters

ParameterTypeRequiredDescription
name (path)stringYesAccount name (3-64 alphanumeric chars)
paymentGatewayNamestringYesGateway identifier from List Gateways
credentialsarrayYesKey-value pairs for gateway credentials

Finding Required Credentials

Each gateway requires different credentials. Use List Gateways to find the credentialsNames for your gateway:
// GET /PaymentGateway returns:
// { "name": "Adyen", "credentialsNames": ["ApiKey", "MerchantAccount"] }

// So your credentials array should include:
{
  "paymentGatewayName": "Adyen",
  "credentials": [
    { "Key": "ApiKey", "Value": "your-api-key" },
    { "Key": "MerchantAccount", "Value": "your-merchant-account" }
  ]
}

Retrieve an Account

Endpoint: GET /PaymentGatewayAccounts/{name}
const response = await fetch('https://api.orchestrasolutions.com/PaymentGatewayAccounts/stripe-production', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY'
  }
});

const account = await response.json();

Response

{
  "name": "stripe-production",
  "paymentGatewayName": "Stripe",
  "creationTime": "2024-01-15T10:30:00Z",
  "credentials": [
    { "key": "SecretKey", "value": "sk_live_..." }
  ]
}

List All Accounts

Endpoint: GET /PaymentGatewayAccounts
const response = await fetch('https://api.orchestrasolutions.com/PaymentGatewayAccounts', {
  headers: {
    'X-Api-Key': 'YOUR_API_KEY'
  }
});

const accounts = await response.json();

Response

[
  {
    "name": "stripe-production",
    "paymentGatewayName": "Stripe",
    "creationTime": "2024-01-15T10:30:00Z"
  },
  {
    "name": "stripe-test",
    "paymentGatewayName": "Stripe",
    "creationTime": "2024-01-10T09:00:00Z"
  }
]
The list endpoint returns brief information without credentials. Use the retrieve endpoint to get full details.

Delete an Account

Endpoint: DELETE /PaymentGatewayAccounts/{name}
const response = await fetch('https://api.orchestrasolutions.com/PaymentGatewayAccounts/old-account', {
  method: 'DELETE',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY'
  }
});
Deletion is permanent. Ensure no active integrations reference the account before deleting.

Response Codes

CodeDescription
200Success
400Invalid account name or credentials
401Not authenticated
404Account not found (GET/DELETE only)

Naming Conventions

Suggested naming patterns for gateway accounts:
PatternExampleUse Case
{gateway}-{environment}stripe-productionSingle gateway per environment
{gateway}-{region}adyen-euRegional gateway routing
{gateway}-{channel}stripe-web, stripe-mobileChannel-specific accounts