Payment Gateway Configuration and Management
This document serves as a comprehensive guide for the automated management and configuration of Comgate payment gateways via the API.
1. Purpose and Target Group
The /v1.0/config endpoint is an advanced interface designed, for example, for partners of the "Developer" type (SaaS platforms, e-shop solutions) who manage a large portfolio of client e-shops.
It allows for the programmatic (bulk) configuration of payment gateway parameters without the need for manual setup in the Comgate client portal. This ensures branding consistency and automates the onboarding of new clients.
2. Authentication Process (Auth Flow)
Gaining access to the endpoint takes place in several steps to ensure maximum security:
- Developer Credentials: Upon signing the contract, the partner receives their main identification data: developer and secret.
- Obtaining the Merchant List: The partner calls the
/v1.0/merchantsendpoint with their credentials.
- Output: A JSON list of all e-shops under their management, containing the
merchant_id, a uniquemerchant_secret, and other information for each store.
- Configuration: The partner uses the combination of the specific Merchant ID and its Merchant Secret in the request body for the
/v1.0/configendpoint.
Note: To use the /merchants endpoint, you must contact our customer support, who will generate the necessary access credentials (developer and secret) for the developer and activate the corresponding permissions.
3. Key Parameters and Functions of the /v1.0/merchants Endpoint
This endpoint is the first step for any automation. It is used to retrieve the current list of all stores managed by the partner.
Parameter Overview:
| Parameter | Meaning | Format / Example |
|---|---|---|
| developer | Developer ID | developer1234 |
| secret | Developer Password | M3hZVScYZKq9t... |
Implementation Example:
// Request
$I->sendPost("https://payments.comgate.cz/v1.0/merchants",
[
'developer' => 'your_developer_id',
'secret' => 'your_developer_secret'
]);
Response parameter overview:
| Parameter | Meaning | Format / Example |
|---|---|---|
| merchant | ID of the specific store | 123456 |
| secret | Secret key of the given store (for further configuration) | M3hZVScYZKq9t... |
| allowed_payment_creation_method | Permitted methods for creating a payment for the given store | REST/POST |
| shop | E-shop name | eshop.com |
| url | E-shop URL | https://eshop.com/ |
| contract_status | Current contract status | AKTIVNI |
| store_in_production | Identification of whether the store is already in production | true / false |
| reported_to_card_schemes | Information on whether the store has been reported to card associations (Visa/Mastercard) | true / false |
| currencies | List of supported currencies for the given store | Array of currencies (e.g., ["CZK", "EUR"]) |
| ip_addresses | List of allowed IP addresses for API communication | Array of IP addresses (e.g., ["185.123.45.67", "185.123.45.68"]) |
- The allowed_payment_creation_method parameter can take the following values:
REST/POST– The store can create payments using REST API or HTTP POST.SOAP– The store can create payments using SOAP API.REDIRECT– The store can only create payments by redirecting the customer to the payment gateway (without API).
- The contract_status parameter can take the following values:
ZALOZENA– A newly created contract where certain requirements are still being finalized.AKTIVNI– All requirements are met and the contract can be activated. It is necessary to monitor the reported_to_card_schemes and store_in_production parameters, as activation may be delayed if the e-shop is not fully compliant with the service activation terms (e.g., missing T&Cs, etc.).UKONCENA- The contract was terminated.
- The store_in_production parameter can take the following values:
true– The store is already active in production.false– Waiting for the store to be switched to production status.
- The reported_to_card_schemes parameter can take the following values:
true– The store has been reported to payment associations.false– Waiting for the store to be reported to payment associations.
Note: The parameters povoleny_zpusob_zalozeni_platby, stav_smlouvy, obchod_v_produkci, and ohlaseno will no longer be returned in the API response as of July 31, 2026. These parameters have been replaced by their equivalents: allowed_payment_creation_method, contract_status, store_in_production, and reported_to_card_schemes.
// Response
{
"0": {
"merchant": "123456",
"secret": "M3hZVScYZKq9t...",
"allowed_payment_creation_method": "REST/POST",
"shop": "eshop.com",
"url": "https://eshop.com/",
"contract_status": "AKTIVNI",
"store_in_production": true,
"reported_to_card_schemes": true,
"currencies": [
"CZK",
"EUR"
],
"ip_addresses": [
"185.123.45.67",
"185.123.45.68"
]
},
"code": 0,
"message": "OK"
}