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
| Parameter | Type | Required | Description |
|---|
name (path) | string | Yes | Account name (3-64 alphanumeric chars) |
paymentGatewayName | string | Yes | Gateway identifier from List Gateways |
credentials | array | Yes | Key-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
| Code | Description |
|---|
200 | Success |
400 | Invalid account name or credentials |
401 | Not authenticated |
404 | Account not found (GET/DELETE only) |
Naming Conventions
Suggested naming patterns for gateway accounts:
| Pattern | Example | Use Case |
|---|
{gateway}-{environment} | stripe-production | Single gateway per environment |
{gateway}-{region} | adyen-eu | Regional gateway routing |
{gateway}-{channel} | stripe-web, stripe-mobile | Channel-specific accounts |