Idempotency

Read about how an action is executed once, even if there are duplicate requests

An API is idempotent when multiple identical requests produces the same result or has no effect as a single request. In Cards Connect, idempotency applies to all transaction APIs requested via HTTP methods POST and PUT that create or modify resources.

🚧

Note:

Idempotency is only guaranteed throughout the API credential validity period.

Idempotency Key

When calling our POST or PUT transaction APIs, you will need to generate a unique identifier and attach that in the API path. This unique identifier serves two purposes:

  1. It allows you to check the status of the transaction in the event of a time out.
  2. The identifier also acts as the idempotency key of the request. Sending multiple PUT and POST requests with the same identifier will result in an idempotency error
Transaction APIsIdempotency Key
Authorizeapi/v1/transactions/{transactionId}/authorizationtransactionId
Capturesapi/v1/transactions/{transactionId}/captures/{captureId}captureId
Voidapi/v1/transactions/{transactionId}/voids/{voidId}voidId
Refundsapi/v1/transactions/{transactionId}/refunds/{refundId}refundId

Idempotency Error

The system will return the following errors in response to idempotency validation exceptions (when multiple requests are sent with the same identifier):

Response code: 422 Unprocessable Content

{
    "type": "https://tools.ietf.org/html/rfc9110#section-15.5.1",
    "title": "One or more validation errors occurred.",
    "status": 422,
    "errors": {
        "transactionId": [
            "The supplied value is a duplicate of a previous request. The value must be unique."
        ]
    },
    "traceId": "00-0c424fd05c81478c2e3d469c483fad77-f9e42800b4518f5a-00"
}