Guides
Log In
Guides

Idempotent Request

Overview

An idempotency request is a mechanism used to ensure the completion of a request when your system fails to receive a response, while also guaranteeing that duplicate requests are not executed. This is particularly useful when an API call is disrupted and no response is received.

If the Moneris Go device has already completed the transaction, it will return the details of the original request. If the device is still processing the request, it will resume normally.


Integration Methods


Cloud Integration

Connects to your POS system via the internet. This allows for real-time syncing of transaction data across multiple devices and locations. It’s ideal for businesses that need centralized reporting and scalable infrastructure.


Direct integration

Connects the Moneris Go terminal directly to your POS system. The POS sends transaction details to the terminal, which processes the payment. It’s a reliable option for businesses with an existing POS setup that supports direct communication with payment devices.


📘

NOTE

A request method is considered "idempotent" if the intended effect on the server of multiple identical requests with that method is the same as the effect for a single such request.

Moneris Cloud API supports idempotency for safely retrying requests without performing the same operation twice on the authorization host. This is useful when your API call get disrupted and you don’t receive a response message.

For example, if request for a “purchase” transaction does not get a response due to a network connection error, you can retry the request with the same idempotency key to guarantee that cardholder won’t be charged more than once.


Idempotency is only supported for the following transactions:

  • Sync
  • Scan
  • Purchase
  • Card-on-file Refund
  • Card Present Refund
  • Void
  • Void Last
  • Balance Inquiry
  • Pre-Authorization
  • Pre-Authorization Completion
  • Activate/Load
  • Deactivate
  • Get Track Data
  • Get Hash
  • Card Verification

Idempotent Response Code Scenarios

In all of the following use cases, the assumption is that the incoming new request has an idempotent key, identical to one of the one hundred previously processed commands.


ScenarioStatus CodeHeader StatusError CodesParameter
New request with same action and same amount (if applicable)5206From the original recordFrom the original recordFrom the original record
New request has same action but different amount5462Transaction record with the same ID Key already exist5915Duplicate Value. Error field will indicate "data.request[0] and idempotencyKey"
New request has same amount (or no amount), but different actions5462Transaction record with the same ID Key already exist5915Duplicate Value. Error field will indicate "data.request[0] and idempotencyKey"
Different amounts and different actions5462Transaction record with the same ID Key already exist5915Duplicate Value. Error field will indicate "data.request[0] and idempotencyKey"
If there is a disconnection between the POS and the Terminal, the POS can resend the original request with identical data. The Terminal will accept the transaction request and continue with its flow5202Request already accepted5202Request already accepted