The cancellation transaction is one of the basic payment operations, which ensures the cancellation of the payment transaction already made back to the cardholder's account.
The cancellation process is as follows:
Creating a cancellation
The transaction can be initiated by calling:
gptom://transaction/cancel?…
where the following parameters are used to build the report, including the amsID that is assigned to each payment:
Variable/Field
Format/Format
Description/Description
Example
clientID
String
amsID
MANDATORY
MANDATORY
String
CZ: Unique amsID that you will receive at the time of payment.
EN: The unique amsID that you will receive upon payment.
EN: The unique amsID that you will receive upon payment.
redirectUrl
String
CZ: URL of your application to which we redirect the client after the cancellation is completed.
EN: The URL of your application to which we will redirect the client after the cancellation is complete.
EN: The URL of your application to which we will redirect the client after the cancellation is complete.
fb://Success
preferableReceiptType
enum (sms,email,qr,print)
CZ: 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:
EN: In the case of sending a receipt from the GP tom application, it is possible to predefine the method of sending the receipt via the API. Possible values are:
PHONE
EMAIL
QR
PRINT
EN: In the case of sending a receipt from the GP tom application, it is possible to predefine the method of sending the receipt via the API. Possible values are:
PHONE
QR
text
printByPaymentApp
bool
EN: Defines whether the receipt is 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 a value of "false", we will return the user to your application immediately after the transaction and it is up to you to hand over the receipt.
EN: Defines whether the receipt is passed to the client by your application or GP tom. The default value is true (i.e. GP will offer a way to pass the receipt to the client). If you send a value of "false", we return the user to your app immediately after the transaction and it's up to you to pass the receipt.
EN: Defines whether the receipt is passed to the client by your application or GP tom. The default value is true (i.e. GP will offer a way to pass the receipt to the client). If you send a value of "false", we return the user to your app immediately after the transaction and it's up to you to pass the receipt.
true/false
clientPhone
String
CZ: Client's phone number.
EN: Client phone number.
EN: Client phone number.
+420606505404
clientEmail
String
CZ: Client's email address.
EN: Client email address.
EN: Client email address.
info@gptom.com
Example call:
gptom://transaction/cancel?amsID=123&preferableReceiptType=QR&clientPhone=+420606505404&clientID=123&printByPaymentApp=true&redirectUrl=gp://transaction/cancel&clientEmail=info@gptom.com
The answer will contain the following fields:
Field/Field
Description/Description
Example/Example
TASK STATUS
CZ: Gives the answer in which state the request ended.
EN: Gives information in which state has your request ended.
EN: Gives information in which state has your request ended.
COMPLETED
CANCELED
ERROR
CANCELED
ERROR
terminalID
CZ: ID of the terminal on which the transactions are processed. Identifies the terminal in GP systems.
EN: Unique terminal ID, on which the transaction is processed.
EN: Unique terminal ID, on which the transaction is processed.
12345678
amount
CZ: The amount determines the volume of the transaction. This amount is calculated in the domestic currency used by the terminal. For a closing, it includes all card transactions, credited minus debited.
EN: The amount determines the volume of the transaction. This amount is calculated in the domestic currency used by the terminal. At close day, it contains all card transactions, credited minus debit.
EN: The amount determines the volume of the transaction. This amount is calculated in the domestic currency used by the terminal. At close day, it contains all card transactions, credited minus debit.
10
batchNumber
CZ: Identifies the closing number. To be filled in if a deadline is requested.
EN: Defines batch number. Present during the close batch transaction.
EN: Defines batch number. Present during the close batch transaction.
1
emvAppLabel
CZ: The name of the EMV that was used in the payment.
EN: Card label of used card
EN: Card label of used card
Visa Debit
amsID
CZ: Unique transaction number.
EN: Unique transaction number.
EN: Unique transaction number.
referenceNumber
CZ: Reference number entered when requesting payment.
EN: Reference number entered during the payment request
EN: Reference number entered during the payment request
ABC123
sequenceNumber
CZ: Used for cancellation transactions. Use the received value that was part of the transaction you want to cancel.
EN: Used for transaction cancellation. Used the received value which was a part of transaction you want to cancel.
EN: Used for transaction cancellation. Used the received value which was a part of transaction you want to cancel.
001000000
transactionType
EN: Defines the transaction type.
EN: Defines type of transaction.
EN: Defines type of transaction.
CARD
date
CZ: Indicates the time of the transaction.
EN: Give date of transaction.
EN: Give date of transaction.
2024-10-29T12:14:00.112Z
currencyCode
CZ: Three-digit ISO currency codes - see the Wiki page for a list.
EN: Three chars currency ISO code.
EN: Three chars currency ISO code.
EUR
merchantID
CZ: Unique merchant ID, usually location ID.
EN: Unique merchant ID, usually location ID
EN: Unique merchant ID, usually location ID
tipAmount
CZ: Tips. Filled in if it has been entered.
EN: Tip. Filled in if needed.
EN: Tip. Filled in if needed.
2
totalAmount
CZ: Indicates the total amount of transaction (including tip).
EN: Indicates the total amount of transaction (including tip)
EN: Indicates the total amount of transaction (including tip)
12
result
CZ: Response to request.
EN: Result to the request.
EN: Result to the request.
0 = completed
-1 = declined
-1 = declined
cardEntryMode
CZ: Identifies how the card data was entered, such as chip, contactless, magstripe, etc.
EN: Defines how the card was read: magstripe, chip or contactless.
EN: Defines how the card was read: magstripe, chip or contactless.
CONTACTLESS
transactionID
CZ: Unique ID generated by the payment application during the transaction registration process.
EN: Unique ID generated by payment app during the transaction registration process.
EN: Unique ID generated by payment app during the transaction registration process.
001000000
authorizationCode
CZ: To be filled in only if the transaction ends up being approved.
EN: Is present just if the transaction is processed.
EN: Is present just if the transaction is processed.
123456
cardNumber
CZ: Card number (PAN). It is present in masked form.
EN: Card Number (PAN). It is present in masked form.
EN: Card Number (PAN). It is present in masked form.
0001
pinOk
true/false
CODE
CZ: Displays the result of the transaction on authorization.
EN: Shows transaction result on the authorization side.
EN: Shows transaction result on the authorization side.
approved