Idempotency
Read about how an action is executed once, even if there are duplicate requests
Card Present Gateway
If you want to access information about our in-store offering, you may check the API specifications here: In-store Transactions Overview
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:
- It allows you to check the status of the transaction in the event of a time out.
- The identifier also acts as the idempotency key of the request. Sending multiple
PUT
andPOST
requests with the same identifier will result in an idempotency error
Transaction APIs | Idempotency Key | |
---|---|---|
Authorize | api/v1/transactions/{transactionId}/authorization | transactionId |
Captures | api/v1/transactions/{transactionId}/captures/{captureId} | captureId |
Void | api/v1/transactions/{transactionId}/voids/{voidId} | voidId |
Refunds | api/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"
}
Updated 20 days ago