The terminal REST API is used to connect a cash register or other business system to a payment terminal from Comgate over the Internet. It allows you to remotely enter instructions to the terminal, typically to initiate a payment and subsequently determine its result. In the terminal REST API, we only support the JSON data format. The process of processing one transaction usually consists of the following steps:
Creating a payment (mandatory step)
The cash register system calls the POST /v2.0/terminalPayment.json method and passes it the mandatory data: amount (price), currency (curr), or it is possible to add a payment reference/variable symbol (refId). If the request is correct, the API returns a unique transaction identifier transId. Save this code in your cash register system, it is key for all further operations with this payment.
Determining the payment status (optional step)
The cash register system can check the payment result. Repeatedly call the GET /v2.0/terminalPayment/transId/{transId}.json method until the status changes from 'PENDING' to the final value. Possible final states are:
DELETE /v2.0/terminalPayment/transId/{transId}.json method. Cancellation can only be made for payments in the 'PAID' status and only until the 'closing' is performed.GET /v2.0/terminal.json method.POST /v2.0/terminalClosing.json method is used to perform a closing, which returns summary information about transactions made since the previous closing and clears the transaction history in the terminal.Authorization: Basic [base64_encode(merchant:secret)]. The 'merchant' parameter is your terminal login identifier and 'secret' is your password. You can find this information, along with the options for setting allowed IP addresses for API access, in the Client Portal in the Integration – Shops Settings – Terminals section.We are currently preparing additional methods for working with preauthorizations and MOTO payments.
| authorization required | string Authorization header is added in the form: |
Create new payment.
| price required | integer <int32> Price for a product in cents or pennies. For example, for a payment of 10 EUR, the value '1000' should be used. |
| curr required | string Currency code according to ISO 4217. Available currencies: CZK, EUR. |
| refId | string Parameter suitable for entering a variable symbol or order number on the Client's side (it does not have to be unique, ie it is possible to create more payments with the same refId). In the Client Portal and daily csv the parameter is marked as Client ID. |
| code required | integer Method return code and error (value of message) description: |
| message required | string |
| transId | string Unique alphanumeric identifier (code) of the transaction. |
{- "price": 1000,
- "curr": "CZK",
- "refId": "2010102600"
}{- "code": 0,
- "message": "OK",
- "transId": "AB12-CD34-EF56"
}Getting payment status, possibly with detailed transaction data (if available).
| transId required | string Example: AAAA-BBBB-CCCC Unique alphanumeric identifier (code) of the transaction (transactionId). |
| authorization required | string Authorization header is added in the form: |
| code required | integer Method return code. |
| message required | string Method return code and error description: |
| price required | string Price of the product in cents or pennies. For example, for a payment of 10 EUR, the value '1000' will be returned. |
| curr required | string Currency code according to ISO 4217. |
| refId required | string Payment references (variable symbol). |
| transId required | string Unique alphanumeric identifier (code) of the transaction (transactionId). |
| status required | string Current transaction status, values: |
| fee | string The calculated transaction fee in cents or pennies, or may contain the value 'unknown'. Payment fees are available in the response the next day at the earliest based on payment processor reports. |
| cardValid | string Payer's card expiration date in MM/YY format (if the card was used). For example: '04/28'. |
| cardNumber | string Partial payer card number (if the card was used). |
| paymentErrorReason | string Reason for payment rejection (if available). |
| reversed required | boolean Flag indicating whether the payment was reversed (cancelled). |
| amountRefunded | string Refunded amount in cents or pennies. |
# You can also use wget curl -X GET https://payments.comgate.cz/v2.0/terminalPayment/transId/{transId}.json \ -H 'Authorization: Basic MTIzNDU2Omd4NHE4T1YzVEp0Nm5vSm5maGpxSkt5WDNaNlljaDB5'
{- "code": 0,
- "message": "OK",
- "price": "1000",
- "curr": "CZK",
- "refId": "2010102600",
- "transId": "AB12-CD34-EF56",
- "status": "PAID",
- "fee": "string",
- "cardValid": "04/28",
- "cardNumber": "string",
- "paymentErrorReason": "string",
- "reversed": true,
- "amountRefunded": "string"
}Cancel of payment
The payment can be cancelled until 'closing' is triggered on terminal. The payment must be sucessfully finished (in the 'PAID' state).
If 'closing' was already triggered on terminal, an error will be displayed and the 'refund' method must be used instead (if possible). 'code' = 0 in the response indicates successful reversal creation. You can verify the cancellation by calling the Payment status endpoint.
| transId required | string Example: AAAA-BBBB-CCCC Unique alphanumeric identifier (code) of the transaction (transactionId). |
| authorization required | string Authorization header is added in the form: |
| code required | integer Method return code and error description: |
| message required | string |
# You can also use wget curl -X DELETE https://payments.comgate.cz/v2.0/terminalPayment/transId/{transId}.json \ -H 'Authorization: Basic MTIzNDU2Omd4NHE4T1YzVEp0Nm5vSm5maGpxSkt5WDNaNlljaDB5'
{- "code": 0,
- "message": "OK"
}Check terminal status.
| authorization required | string Authorization header is added in the form: |
| status required | string Status of the connection test to the authorization server. |
# You can also use wget curl -X GET https://payments.comgate.cz/v2.0/terminal.json \ -H 'Authorization: Basic MTIzNDU2Omd4NHE4T1YzVEp0Nm5vSm5maGpxSkt5WDNaNlljaDB5'
{- "status": "ONLINE"
}Performs a batch closing on the terminal. Closing will clear the transaction history in the terminal.
| authorization required | string Authorization header is added in the form: |
| code required | integer 0 - OK, otherwise see 'message' param for details. |
| message required | string OK or text description of the batch closing result. |
| batchNumber | integer Number of batch closing. |
Array of objects List of batch totals per currency. |
# You can also use wget curl -X POST https://payments.comgate.cz/v2.0/terminalClosing.json \ -H 'Authorization: Basic MTIzNDU2Omd4NHE4T1YzVEp0Nm5vSm5maGpxSkt5WDNaNlljaDB5' \ -H 'Content-Type: application/json'
{- "code": 0,
- "message": "OK",
- "batchNumber": 1,
- "batchData": [
- {
- "curr": "CZK",
- "creditsAmount": 100,
- "creditsCount": 3,
- "debitsAmount": 200,
- "debitsCount": 21
}
]
}| authorization required | string Authorization header is added in the form: |
Create new refund.
| price required | integer <int32> Refund amount in cents or pennies. For example, for a refund of 10 EUR, the value '1000' should be used. |
| curr required | string Currency code according to ISO 4217. Available currencies: CZK, EUR. |
| refId | string Parameter suitable for entering a variable symbol or order number on the Client's side (it does not have to be unique, ie it is possible to create more refunds with the same refId). In the Client Portal and daily csv the parameter is marked as Client ID. |
| code required | integer Method return code and error (value of message) description: |
| message required | string |
| transId | string Unique alphanumeric identifier (code) of the transaction. |
{- "price": 1000,
- "curr": "CZK",
- "refId": "2010102600"
}{- "code": 0,
- "message": "OK",
- "transId": "AB-CD123-EF456"
}Getting refund status, possibly with detailed transaction data (if available).
| transId required | string Example: AA-BBBBB-CCCCC Unique alphanumeric identifier (code) of the transaction (transactionId). |
| authorization required | string Authorization header is added in the form: |
| code required | integer Method return code. |
| message required | string Method return code and error description: |
| price required | string Price of refund in cents or pennies. For example, for a refund of 10 EUR, the value '1000' will be returned. |
| curr required | string Currency code according to ISO 4217. |
| refId required | string Refund reference. |
| transId required | string Unique alphanumeric identifier (code) of the transaction (transactionId). |
| status required | string Current refund status, values: |
| cardNumber | string Partial payer card number (if the card was used). |
| reversed required | boolean Flag indicating whether the refund was reversed (cancelled). |
# You can also use wget curl -X GET https://payments.comgate.cz/v2.0/terminalRefund/transId/{transId}.json \ -H 'Authorization: Basic MTIzNDU2Omd4NHE4T1YzVEp0Nm5vSm5maGpxSkt5WDNaNlljaDB5'
{- "code": 0,
- "message": "OK",
- "price": "1000",
- "curr": "CZK",
- "refId": "2010102600",
- "transId": "AB-CD123-EF456",
- "status": "PAID",
- "cardNumber": "string",
- "reversed": true
}Cancel of refund
The refund can be cancelled only on the same day. The refund must be sucessfully finished (in the 'PAID' state).
'code' = 0 in the response indicates successful reversal creation. You can verify the cancellation by calling the Refund status endpoint.
| transId required | string Example: AA-BBBBB-CCCCC Unique alphanumeric identifier (code) of the transaction (transactionId). |
| authorization required | string Authorization header is added in the form: |
| code required | integer Method return code and error description: |
| message required | string |
# You can also use wget curl -X DELETE https://payments.comgate.cz/v2.0/terminalRefund/transId/{transId}.json \ -H 'Authorization: Basic MTIzNDU2Omd4NHE4T1YzVEp0Nm5vSm5maGpxSkt5WDNaNlljaDB5'
{- "code": 0,
- "message": "OK"
}The transferList method is used to obtain information about which transfers were made within a given day. Information about the bank transfer (sent on the previous business day) is available in the morning of the following day.
Transfers and statements are generated only for paid and transferred production payments. For all other payments, including test payments, transfers and statements are not generated.
| date required | string Example: 2025-04-25 Indicate the transfer date. |
| test | boolean Example: test=false If the value is 'true', the method returns predefined sample transfer. |
| authorization required | string Authorization header is added in the form: |
| transferId | integer Transfers that were made during the given day. |
| transferDate | string <date> The date and transferDate parameters are interpreted in the Europe/Prague time zone (CET/CEST depending on the date). |
| accountCounterparty | string Account number of the counterparty. |
| accountOutgoing | string Outgoing account number. |
| variableSymbol | string Payment identifier (variable symbol). |
# You can also use wget curl -X GET https://payments.comgate.cz/v2.0/transferList/date/{date}.json \ -H 'Authorization: Basic MTIzNDU2Omd4NHE4T1YzVEp0Nm5vSm5maGpxSkt5WDNaNlljaDB5'
[- {
- "transferId": 1234567,
- "transferDate": "2023-01-25",
- "accountCounterparty": "0/0000",
- "accountOutgoing": "123456789/0000",
- "variableSymbol": "12345678"
}
]The singleTransfer method displays detailed information for a specific bank transfer.
Date parameters are interpreted in the Europe/Prague time zone (CET/CEST depending on the date).
Transfers and statements are generated only for paid and transferred production payments. For all other payments, including test payments, transfers and statements are not generated.
| transferId required | string Example: 1234567 Mandatory parameter obtained using the transferList method. |
| test | boolean Example: test=false Suitable for testing – returns details to predefined sample transfers. |
| authorization required | string Authorization header is added in the form: |
| typ | integer Parameter indicates the type of transfer. |
| Merchant | string Shop identifier in the Comgate system. |
| Datum založení | string Date when the transaction was created. |
| Datum zaplacení | string Date when the transaction was paid. |
| Datum převodu | string Date of payout for the bulk transfer of transactions. |
| Měsíc fakturace | integer Billing month related to the payment. |
| ID Comgate | string Comgate payment ID, a unique 12-character code. |
| Metoda | string Payment method used. |
| Produkt | string Product identifier passed at payment creation under parameter 'name'. |
| Popis | string Short product description (1–16 characters) passed during payment creation under parameter 'label'. |
| E-mail plátce | string Payer's email address. |
| Variabilní symbol plátce | string Variable symbol assigned to the payment. |
| Variabilní symbol převodu | string Variable symbol of the bulk transfer. |
| ID od klienta | string Client's matching ID used to identify goods and customer (e.g., order or customer number). It corresponds to the RefId parameter in the API protocol. |
| Měna | string Currency of the payment. The value is in ISO 4217 format. |
| Potvrzená částka | string Confirmed transaction amount (customer order value). |
| Převedená částka | string Amount usually sent to the shop's bank account (reduced by transaction fee). |
| Poplatek celkem | string Total fee for the payment, according to the price list. Total fee = interbank fee + association fee + processor fee. |
| Poplatek mezibankovní | string Fee received by the card issuer. |
| Poplatek asociace | string Fee received by the card association. |
| Poplatek zpracovatel | string Fee charged by the transaction processor. |
| Typ karty | string Type of card used for card payment. |
# You can also use wget curl -X GET https://payments.comgate.cz/v2.0/singleTransfer/transferId/{transferId}.json \ -H 'Authorization: Basic MTIzNDU2Omd4NHE4T1YzVEp0Nm5vSm5maGpxSkt5WDNaNlljaDB5'
[- {
- "typ": 1,
- "Merchant": "123456",
- "Datum založení": "2023-01-06 14:11:30",
- "Datum zaplacení": "2023-01-06 14:21:30",
- "Datum převodu": "2023-01-10",
- "Měsíc fakturace": null,
- "ID Comgate": "AAAA-BBBB-CCCC",
- "Metoda": "Card payment",
- "Produkt": null,
- "Popis": "description eshop payment",
- "E-mail plátce": "name.lastname@email.cz",
- "Variabilní symbol plátce": "123456789",
- "Variabilní symbol převodu": "123456789",
- "ID od klienta": "1234",
- "Měna": "EUR",
- "Potvrzená částka": "10,00",
- "Převedená částka": "10,00",
- "Poplatek celkem": "0,35",
- "Poplatek mezibankovní": "0,25",
- "Poplatek asociace": "0,25",
- "Poplatek zpracovatel": "-0,15",
- "Typ karty": "EU_UNREGULATED"
}
]Thanks to the csvSingleTransfer method, you can download the daily statement in CSV format for a specific bank transfer.
Transfers and statements are generated only for paid and transferred production payments. For all other payments, including test payments, transfers and statements are not generated.
| transferId required | string Example: 1234567 Details for a specific bank transfer obtained using the transferList method. |
| download | boolean Example: download=false If not filled in or false, it returns data: file name and its contents; if true, it returns the CSV file directly. |
| test | boolean Example: test=false returns a sample CSV file for testing purposes |
| authorization required | string Authorization header is added in the form: |
| nazev | string File name for the downloaded CSV file |
| csv | string Base64-encoded CSV file |
# You can also use wget curl -X GET https://payments.comgate.cz/v2.0/csvSingleTransfer/transferId/{transferId}.json \ -H 'Authorization: Basic MTIzNDU2Omd4NHE4T1YzVEp0Nm5vSm5maGpxSkt5WDNaNlljaDB5'
{- "nazev": "vypis-YYYY-MM-DD.csv",
- "csv": "base64 encoded csv"
}Thanks to the aboSingleTransfer method, you can download a daily statement in ABO format.
Transfers and statements are generated only for paid and transferred production payments. For all other payments, including test payments, transfers and statements are not generated.
| transferId required | string Example: 1234567 Details for a specific bank transfer obtained using the transferList method. |
| download | boolean Example: download=true If not filled in or false, it returns data: file name and its contents; if true, it returns the ABO file directly. |
| type | string Example: type=v1 The 'type' parameter can take the values 'v1' and 'v2'. Under 'v1' you get the ABO version with the fees listed separately for each payment, under 'v2' you get the ABO with the total fee in one line. If the parameter is not filled in, you will automatically receive the type 'v1'. |
| encoding | string Example: encoding=utf8 The character encoding can be utf8 or win1250. If the value is not filled in, the parameter value defaults to utf8. |
| test | boolean Example: test=false Returns a sample ABO file for testing purposes. |
| authorization required | string Authorization header is added in the form: |
| nazev | string File name. |
| abo | string Base64 encoded abo/gpc file. |
# You can also use wget curl -X GET https://payments.comgate.cz/v2.0/aboSingleTransfer/transferId/{transferId}.json \ -H 'Authorization: Basic MTIzNDU2Omd4NHE4T1YzVEp0Nm5vSm5maGpxSkt5WDNaNlljaDB5'
{- "nazev": "vypis-YYYY-MM-DD.gpc",
- "abo": "base64_encoded_abo_file"
}Direct download of CSV files for a specific day using the csvDowload method. The downloaded ZIP file will contain one or more CSV files if there are multiple transactions within a day. It can be used, for example, for calls using wget.
Transfers and statements are generated only for paid and transferred production payments. For all other payments, including test payments, transfers and statements are not generated.
| date required | string Example: 2025-04-25 Mandatory for one day only. |
| test | boolean Example: test=false For testing purposes, it returns a sample CSV file in ZIP format. |
| authorization required | string Authorization header is added in the form: |
# You can also use wget curl -X GET https://payments.comgate.cz/v2.0/csvDownload/date/{date} \ -H 'Authorization: Basic MTIzNDU2Omd4NHE4T1YzVEp0Nm5vSm5maGpxSkt5WDNaNlljaDB5'
Direct download of ABO files for a specific day using the aboDowload method. The downloaded ZIP file will contain one or more ABO files. It can be used, for example, for calls using wget.
Transfers and statements are generated only for paid and transferred production payments. For all other payments, including test payments, transfers and statements are not generated.
| date required | string Example: 2025-04-25 Mandatory for one day only. |
| type | string The 'type' parameter can take the values 'v1' and 'v2'. Under 'v1' you get the ABO version with the fees listed separately for each payment, under 'v2' you get the ABO with the total fee in one line. If the parameter is not filled in, you will automatically receive the type 'v1'. |
| encoding | string Example: encoding=utf8 The character encoding can be utf8 or win1250. If the value is not filled in, the parameter value defaults to utf8. |
| test | boolean Example: test=false For testing purposes, it returns a sample CSV file in ZIP format. |
| authorization required | string Authorization header is added in the form: |
# You can also use wget curl -X GET https://payments.comgate.cz/v2.0/aboDownload/date/{date} \ -H 'Authorization: Basic MTIzNDU2Omd4NHE4T1YzVEp0Nm5vSm5maGpxSkt5WDNaNlljaDB5'