Home › Blog

Technology & Engineering

PPOB Transaction Idempotency: Why a Timeout Is Not Proof of Failure

By Babelii Editorial Team Published

When a cashier application receives no response after submitting an order, reconnecting is only part of the problem. Developers need to determine whether the original transaction was recorded before choosing the next action.

Timeout recovery: check the original reference, record established outcomes or reconcile unresolved cases; do not automatically create a new transaction.

A cashier application submits a mobile credit purchase to a supplier. The connection drops before a response arrives. The cashier's screen appears to show a failed request, but the supplier may already have created an order.

If the application immediately creates another transaction, the customer could receive the product twice or face two deductions. If the application instead marks the transaction complete, the cashier may provide incorrect information. Both mistakes arise from treating a network response as equivalent to the business outcome.

Separate request identity from transaction outcome

Each business transaction needs a reference that can be used to investigate its result. Persist that reference before submitting the request, together with the approved product and destination details.

Idempotency is a property allowing an operation to be repeated under its contract without producing an additional effect. A transaction interface may support an idempotency key to recognize repeated requests. However, not every API provides this mechanism. Key lifetime, scope, behavior when payloads change and concurrent-request handling depend on the provider's contract.

Do not assume that two purchases with the same destination and denomination are automatically one transaction. A customer might intentionally buy the same product twice.

Represent an uncertain outcome

After the timeout in the cashier example, the application should have a local state indicating that the outcome is unknown. This is distinct from a rejection confirmed by the service.

Condition Meaning for the application
Request not submitted No execution attempt has been made
Unknown outcome The request may have been processed
Order located A transaction reference can be investigated
Delivery confirmed The provider reports that the product was delivered
Definitive failure Failure has been established under the applicable contract

This table is a conceptual model, not a list of Babelii API statuses. Use the actual status definitions and transition rules of the integrated service.

Recover according to the contract

After a timeout, use the original reference to investigate the result through documented status mechanisms. If the provider guarantees safe repetition with the same key under those conditions, follow its contract. Without such a guarantee, do not automatically execute the transaction again.

An order that is not found during a single check does not necessarily establish that it was never created. Account for documented visibility delays and the capabilities of the status interface. If the result cannot be established, direct the case to reconciliation or operator review.

A changed product, destination or price is not merely a technical retry. Changed details require fresh review and approval according to the business workflow.

Test failure cases before live transactions

In an authorized test environment, simulate a connection failure before request receipt, a failure after an order is recorded but before the response is returned, and a case where status is not yet available. Where supported, test concurrent requests using the same idempotency identity.

Verify that the application retains the original reference, avoids unjustified additional purchases and explains the outcome accurately to the operator. Do not test these conditions by arbitrarily creating live purchases.

See the H2H API and MCP comparison for the orchestration responsibilities of each interface. A robust integration does more than submit successful requests. It can explain what is known, what remains uncertain and how the business result will be established.

Check AI capabilities before following examples

This article explains concepts and examples. For current prices, availability, permissions and ordering capabilities, use live catalogue results and the connection guide. Article examples are not proof that execution is enabled.

AI connection options · Purchase and safety rules