After you receive the transaction ID, your application should generate and submit a transaction request. The payment application starts the entire payment process and returns the result. In older versions (lower than version 1.2.), synchronous communication was used to obtain the result of the transaction (the listen function 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 type of transaction, the following fields are mandatory/optional/optional:
[(M) required, (O) optional)]
Notification
The format for all amounts is to two decimal places, so for example 50 CZK should be filled in as 5000.
Field description
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
The transaction type defines the type of transaction that you want to initiate. The available values are:
- SALE(1)
- VOID(2)
- CLOSE_BATCH(4)
originTransactionID
It is used for reversing the transaction and should contain the ID of the transaction that 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 chain is visible in all transaction reports and helps accounting departments match payments to orders. Diacritics are not supported.
cancelMode
2 – Older transactions
printByPaymentApp
Defines whether the receipt will be passed to the client by your application or by 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 the value "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 will be sending a receipt directly from the GP tom app , it is possible to pre-fill the customer's email or phone number via 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 application. After entering the tip in the app, the screen for attaching the card is then displayed. To call up this screen, you must also have tipping enabled in the app