Timeout Handling

Handling Timeouts

A timeout occurs when a transaction or a process takes longer than the predefined maximum allowed time to complete. When a transaction exceeds these time limits, it's considered as 'timed out'.

In such cases, specific actions are required to maintain the integrity of the transaction. This ensures that incomplete or potentially duplicate transactions are properly managed to prevent any inconsistencies or errors in the system.

Transaction Timeouts

  • Timeout: 35 Seconds

In the event of a transaction timeout, it is crucial to perform a reversal operation. This is to ensure that any transaction that did not complete successfully is properly rolled back, preventing any unintended or duplicate transactions. Developers should implement logic in their transaction handling to check for timeouts and initiate a reversal operation accordingly. This safeguards against inconsistencies in transaction states and ensures data integrity.

Tokenization Timeouts

  • Timeout: 35 Seconds

In the event of a tokenization timeout, the recommended course of action is to perform a retry. However, it is important to implement sensible retry logic to prevent excessive load or repeated timeouts.


Timeout Error Handling

What is a Transaction Timeout? Rollback?

A timeout occurs when the transaction request is issued, and there is no response within 35 seconds. Upon this occurrence, the application server must initiate a rollback operation . This action is crucial for automatically reversing the transaction on the processor’s end, mitigating risks such as incomplete transactions or possible double charging caused by processing delays.

Note: The significance of implementing a Timeout Rollback in transaction handling cannot be overstated. It is essential for preserving the integrity and reliability of any payment system, particularly in environments handling a high volume of transactions, where ensuring financial accuracy and maintaining user trust is of utmost importance.

How to Handle It?

  1. The SP-Platform initiates a sale transaction that results in a timeout. Consequently, the SP-Platform remains uncertain about the transaction’s success status.
  2. SP must conduct a rollback operation to prevent any potential duplication of the transaction.
  3. Following this, SP is positioned to securely re-initiate the Sale operation.

Rollback Operation

For additional information, please refer to the API Reference documentation regarding the rollback operation.

curl --location 'https://sandbox-platform.jupico.com/v1/transactions/creditcard/rollback' \
--header 'Content-Type: application/json' \
--header 'Authorization: Basic XYZ' \
--data '{
   "subMerchantId": "<submerchantId>",
   "amount": 45,
   "description": "reversal item returned",
   "token": "<usedInOriginalOperationToken>"
}'