Notice
To get the details of a transaction, you only need to query using an Inquiry request:
TransactionInquire(String transactionId, IInquireResultListener listener) throws RemoteException
After receiving the transaction ID, your application should generate and send a transaction request. The payment app will run the entire payment process and return the result. In older versions (below version 1.2), synchronous communication was used to obtain the transaction result (the listening feature is deprecated). For the new version, the communication is asynchronous, where the getTransactionState method is used to get the current state of the transaction.
void transactionRequestV2(String transactionRequesJsonString, ITransactionResultListener listener) throws RemoteException
Request [TransactionRequestV2Entity]
Based on the transaction type, the following fields are required/optional/optional:
[(M) mandatory, (O) optional)]
CARD
ACCOUNT_PAYMENT
BLIK_PAYMENT
PAYMENT_GATEWAY
Notice
The format for all amounts is to two decimal places, so for example 50 CZK should be filled in as 5000.
Description of fields
amount
The amount determines the volume of the transaction. This amount is calculated in the domestic currency used by the terminal. The format is to two decimal places, so for example 50 CZK should be filled in as 5000.
TipAmount
In restaurants you can ask the customer to add a tip where the tip is entered per your system. This amount is then added to the original amount entered by the merchant.
transactionID
A unique ID generated by the payment application during the transaction registration process.
clientID
transactionType
Transaction Type defines the type of transaction you want to initiate. The available values are:
- SALE(1)
- VOID(2)
- REFUND(3) – since version 1.75.4, AIDL 1.28
- CLOSE_BATCH(4)
originTransactionID
It is used to cancel a transaction and should contain the ID of the transaction you want to cancel.
originReferenceNum
This field is optional and can be filled with a reference number - any AN string with a maximum of 20 characters. This string is visible in all transaction reports and helps accounting departments to match payments with orders. Diacritics are not supported.
cancelMode
2 - Older transactions
printByPaymentApp
Defines whether the receipt is passed to the client by your application or by the GP tom. The default value is true (i.e. GP tom will offer the method of passing the receipt to the client). If you send a value of „false“, we will return the user to your application immediately after the transaction and it is up to you to pass the receipt.
clientInfo
If you send the receipt directly from the GP tom app, it is possible to pre-fill the customer's email or phone number via the API.
preferableReceiptType
In case of sending a receipt from the GP tom application, it is possible to predefine the method of sending the receipt via API. Possible values are:
- PHONE
- QR
TipCollect
An optional field that brings up the tip entry screen in the GP tom app. After entering the tip in the app, the screen for attaching the card is then displayed. To bring up this screen, you must also have tipping enabled in the app
PaymentMethod
Since version 1.64.5, we have added the ability to call additional payment methods via the app2app API using the PaymentMethod field. The current options are:
CASH - cash payments
CARD - card payments
ACCOUNT_PAYMENT - payment by bill (new payment method for CZ market)
If the field is not filled in, the default value is set to CARD.
