• Features
  • Shop
  • Pricing
  • User Guide
  • Support
 0 Kč
Login / Registration
  • CS
  • RO
  • DE
  • SK
  • HU
  • PL
  • EL
  • Features
  • Shop
  • Pricing
  • User Guide
  • Support
  • CS
  • RO
  • DE
  • SK
  • HU
  • PL
  • EL
BUY

Introduction

  • Before you begin
  • Receipt visual
  • Download
  • Legal Disclaimer
  • Integration support
  • Certification & Test Scenarios

app2app API

  • Introduction to app2app API
  • 1. Transaction registration
  • 2. Payment Request [transactionRequestV2]
  • 3. Get the status of the transaction
  • 4. Get transaction details
  • Code examples
  • Return codes
  • Check the installed application
  • Client ID
  • Settings in Android
  • Release notes
  • Get status method

Cloud API

  • Introduction to Cloud API
  • Transaction flow
  • Transaction sale
  • Transaction cancellation
  • Close batch
  • Master API account

iOS API

  • Transaction Sales (iOS)
  • Transaction Cancellation (iOS)
  • Day close execution (iOS)
  • Introduction to iOS API
View Categories
  • Main page
  • User Guide
  • API
  • Cloud API
  • Close batch

Close batch

What exactly is a dose? Each transaction you create belongs to a so-called batch. Like a receipt, each batch has its own number and is actually a package of transactions. close batchis an administrative operation by which a terminal closes a batch and prompts systems to close the batch and open a new one. In Global Payments, it is possible to see the closing number for each transaction and it is possible to filter transactions by this number.

Login & Authentication

JWT token authentication is required for all non-public endpoints. You get the token (with a lifetime of 90 days) through the /cloud/oauth/token endpoint with the following arguments provided:

  • Basic authentication for token endpoints (name/password) - will be provided for each user.
  • Merchant username - same as for GP tom
  • Merchant password - same as for GP tom
  • Terminal ID (TID) – Destination terminal ID
  • The authorization endpoint is located at:
    • Dev: https://cloud-api-dev.gptom.com/cloud/oauth/token
    • production: https://cloud-api.gptom.com/cloud/oauth/token

Get an access token

Example request:

POST {{apiCloudHost}}/cloud/oauth/token
Authorization: Basic YXRvbTphc2hmdWY0ZTVmYQ==
Content-Type: application/x-www-form-urlencoded

grant_type=password&username=jan.novak@example.com&password=ABCDEFGHIJKL&tid=999888

Example answer:

{
"access_token": "eyJh…", // access token used in authenticated API requests
"token_type": "bearer",
"refresh_token": "GciO…",
"expires_in": 3600,
"scope": "read write",
"tid": "999888",
}

Token renewal

When the access_tokenu expires, refresh_token is available.

Example request:

POST {{apiHost}}/api/oauth/token
Authorization: Basic YXRvbTphc2hmdWY0ZTVmYQ==
Content-Type: application/x-www-form-urlencoded

grant_type=refresh_token&refresh_token=GciO…

GPTomAuth

Type of security scheme
HTTP authorization scheme
HTTP
bearer

Create a task

Call the POST endpoint /v1/tasks/BATCH and use CreateCloudTaskTransactionApiRequest with the following information filled in to create the request:

Variable
date
MANDATORY
apiKey
MANDATORY
Tid
MANDATORY
initiator
MANDATORY
title
MANDATORY
timeToLive
Format
String
String
String
String
String
Integer
Description
Transactions with an older or the same date will be closed. All transactions up to this date since the last successful closed batch will be included.
API The key can be found in the app under Account-Cloud API . It is used to distinguish logins mainly in Cloud API .
The target TID for the task. TID = Terminal ID, which is unique for each device. Only one TID can be used at a time on all installed devices.
The initiator description should be unique to each instance of the subsystem that can initiate the task. Example: "Server XY" or "Cashier 1"
Human-readable task name. It should contain some identification of the task.
Example: "Invoice 37364FD"
The expiration limit for the cloud job. It is allowed to specify values from the seconds interval.
Example
2025-12-18T08:21:39.427SA
333W212J3
483590
Cash desk 12
close batch36744
10

Content of the response [CloudTaskDetailApiResponse]:

Possible response codes are:

Response
RC200
RC403
RC406
RC 502
Message
OK - Task has been registered
The user is not allowed to register the task on the given terminal
the task is not acceptable for the terminal
Push notification not sent
Description
The task has been successfully created and will be processed.
If your API credentials do not match the TID value you sent (for example, if the TID owner is different).
This usually happens when the TID is unable to process the request.
The push notification was not sent due to an upstream service failure.
How to behave
Proceed to the next step in the transaction flow.
Check that you have filled in the correct TID and try again.
Check the error message.

Below you will find the variables used in the response:

Variable
title
taskId
created
taskClass
status
initiator
contextId
Payload
exceptionId
type
Message
context
Format
String
String
String
String
String
String
String
object
String
String
String
String
Description
Human-readable task name. Used from request value.
Internal task id
The date and time the task was created.
Payload classMopworthy values: [TRANSACTION, BATCH, DUMMY]
Cloud task status. Possible values: [CREATED, STARTED, INIT_OK, INIT_ERROR, IN_PROGRESS, COMPLETED, CANCELLED, ERROR]
A description of the client-side initiator. Used from request value.
The ID of the affected target entity, if any (transactionId / batchId)
Context task body - depending on taskClass
Pseudo-unique exception ID. It can serve as a "support ID" that the user can communicate to support so that they can investigate the error.
Type of exception.
Exception message.
Exception context. Learn more.
Example
Uzaverka 123
dFd3sda
BATCH
CREATED
Cash desk 12
{...}
FujIk6
VALIDATION_EXCEPTION
Password too weak
[INSUFFICIENT_DIGIT]:{minimumRequired=1, matchingCharacterCount=0, validCharacters=0123456789, matchingCharacters=}
RC200
YES
YES
YES
YES
YES
YES
YES
YES
WELL
WELL
WELL
WELL
RC403
WELL
WELL
WELL
WELL
WELL
WELL
WELL
WELL
YES
YES
YES
YES
RC406
WELL
WELL
WELL
WELL
WELL
WELL
WELL
WELL
YES
YES
YES
YES
RC502
WELL
WELL
WELL
WELL
WELL
WELL
WELL
WELL
YES
YES
YES
YES

Check the status of a task

V dalším kroku budete kontrolovat stav tasku na koncovém bodu GET /v1/tasks/{taskID} pomocí požadavku, který zahrnuje:

Variable
taskId
Format
String
Description
The ID of the task that you received as part of the previous step.
Example
dFd3sda

Possible return codes:

Response
RC200
RC403
Message
OK - Task status available
Cloud job not found for current terminal.
Message
The job status update was successfully processed.
You should check your taskID and resubmit the correct value.
Description
If you do not receive the final status (see below), repeat this step.
Check that you have filled in the correct taskID and try again.

Variables in the response:

Variable
title
taskId
created
taskClass
status
initiator
contextID
Payload
exceptionId
type
Message
context
Format
String
String
String
String
String
String
String
String
String
String
String
Description
Human-readable task name. Used from the value of the task creation request.
Internal task ID
The date and time the task was created.
Possible values: [TRANSACTION, BATCH, DUMMY]
Possible values: [CREATED, STARTED, INIT_OK, INIT_ERROR, IN_PROGRESS, COMPLETED, CANCELLED, ERROR]
A description of the client-side initiator. Used from request value.
The ID of the affected target entity, if any (transactionId / batchId)
Pseudo-unique exception ID. It can serve as a "support ID" that the user can communicate to support so that they can investigate any issue.
Type of exception.
Exception message.
Exception context - more information.
Example
Invoice 36744
dFd3sda
2025-12-18T08:21:39.427SA
BATCH
IN_PROGRESS
Cash desk 12
12DFSFSSF
FujIk6
VALIDATION_EXCEPTION
Password too weak
[INSUFFICIENT_DIGIT]:{minimumRequired=1, matchingCharacterCount=0, validCharacters=0123456789, matchingCharacters=}
RC200
YES
YES
YES
YES
YES
YES
YES
YES
WELL
WELL
WELL
WELL
RC404
WELL
WELL
WELL
WELL
WELL
WELL
WELL
WELL
YES
YES
YES
YES

The task status request should be repeated until you get one of the final response codes, which are:

Status
INIT_ERROR
COMPLETED
CANCELLED
ERROR
Description
The payment process failed to initialize. Check for the error you received.
Once you get this status, your task has been completed and the result is available.
Task has been canceled by the user.
An error occurred while processing the job.
How to behave
Follow the error instructions.
You can proceed to the next step.
You should start a new job because this task has been canceled by the user.
Follow the error instructions.

You can proceed to the next step only when the response is in the COMPLETED state.

Getting the closing result

Nyní víme, že uzávěrka byla autorizována. Cílem tohoto kroku je získat stav uzávěrky a její údaje. Pro nový požadavek zavoláte koncový bod GET /v1/batches/{batchId}, kde použijete následující proměnné:

Variable
batchId
Format
String
Description
The batch ID that you get in the previous steps.
Example
12DFSFSSF

Possible response codes are:

Response
RC200
RC404
Message
OK – closing details provided
For the current TID was not close batchFound.
Message
Successful response to your close day request.
This condition occurs when a given closing date ID was not found for your device.
Description
The transaction is completed!
Check the transaction ID.

The response contains the following variables, depending on the response code:

Variable
batchid
communicationId
batchNumber
date
previousBatchDate
firstTransactionDate
totalAmount
currency
totalCount
saleCount
saleAmount
voidCount
voidAmount
invalidcount
amsBatchNumber
subBatches
Format
String
String
String
String
String
String
number
String
number
number
number
number
number
number
String
object
Description
Internal batch ID, OPEN for pseudo batch with open transactions.
Can be used for technical support. Pseudo unique ID for logging purposes.
The batch number for the TID.
The exact date and time when the batch was closed.
Date and time of commencement of the closed dose. You have a time period for this batch (OD: previousBatchDate TO: value date).
The date of the oldest transaction.
Total amount for all types of transactions.
Closing currency
Total number of transactions in batch
The number of sales transactions in the batch.
The volume of sales transactions in batch.
The number of all cancellation transactions in the batch.
The volume of all cancellation transactions in the batch.
Number of invalid transactions in batch
Internal batch ID, OPEN for pseudo batch with open transactions.
Basic batches within a meta batch – a breakdown by transaction type and includes statistical information about subordinate batches by type of payment method. Contains:
-closeBatchNumber (string) - closeBatchNumber child batch
- totalCount (number) - Total number of transactions in batch
- saleCount (number) - Number of transactions of the sales type in batch
- saleAmount (number) - Volume of transactions of the sales type in batch
- voidCount (number) - Number of transaction cancellations
- voidAmount (number) - Transaction cancellation volume in batch
Example
12DFSFSSF
2
2025-12-18T08:21:39.427SA
2025-12-17T12:22:11.427SA
How do you like this tutorial?
Transaction cancellationMaster API account
Content
  • Login & Authentication
    • Get an access token
    • Token renewal
    • GPTomAuth
  • Create a task
    • Content of the response [CloudTaskDetailApiResponse]:
  • Check the status of a task
  • Getting the closing result

About the product

  • Features
  • Install the app
  • Releases
  • Support
  • Blog

For developers

  • Introduction to integration
  • app2app API
  • Cloud API
  • Integration according to the type of terminal
  • Integrated companies
  • Download

About the company

  • Contact
  • Information Protection Statement
  • Site Terms of Use
  • General Terms and Conditions
  • GDPR

User Guide

  • Install the app
  • Run the application for the first time
  • Payment by card
  • Cancellation of payment
  • Biometrics
  • In-app support