➿ Prevent Duplicates

When integrating with our API to process direct charges, it is important to safeguard against duplicate transactions [עסקאות כפולות] caused by network retries, application timeouts, or user errors.

📘

Important Notes on Payment Pages [דפי תשלום]

  • API Integration: Set PreventDuplicates = true in your API payload to enable duplicate transaction checks.

  • Scope: Duplicate transaction checks are evaluated per קופה (Credit Box Identifier).

  • Payment Pages & GetUrl [דפי תשלום]: For GetUrl, duplicate prevention is not set in the request payload; it must be enabled directly in your iCredit account settings under:

    רשימת דפי תשלום 👈 ערוך 👈 הגדרות הדף 👈 ממשקים לדף תשלום 👈 מניעת חיובים כפולים (לבחור "כן")


How Duplicate Prevention Works

Duplicate prevention relies on checking unique transaction identifiers (RequestReference or UniqueNum).

1. Basic Duplicate Check (Same Transmission Cycle [מחזור שידור])

When PreventDuplicates = true is passed, the system verifies whether the unique transaction reference has already been processed during the current transmission cycle.

  • Automatic Key Generation: Providing RequestReference is optional. If you do not pass a RequestReference, the system automatically generates an internal reference key to ensure the charge is checked for duplicates during the active transmission cycle.
  • Error Response: If a duplicate is detected, the API rejects the request and returns:
    "ErrorMessage": "רשומה כפולה"
  • Transmission Reset Behavior [איפוס לאחר שידור]: Standard duplicate checking is valid only until the next transmission (whether triggered manually or automatically, e.g., daily). Once a transmission occurs, the history resets.

2. Advanced Protection: LookbackDays Parameter ⏪

To prevent duplicate charges across multiple transmission cycles [מחזורי שידור], pass the LookbackDays parameter in your request.

When specified, LookbackDays forces the API to inspect past transactions for matching UniqueNum or RequestReference values going back X days, regardless of whether a transmission [שידור עסקאות] has occurred.

  • Coverage: Checks for duplicates using either or both UniqueNum (visible in the iCredit dashboard under דו"ח עסקאות) and RequestReference.
  • Transaction Filter (ParamJ & SaleType): For methods supporting transaction types (ChargeSimple and ChargeSimple/Full), the look-back duplicate check applies only to direct charges (ParamJ = 0 / standard charge). Pending transactions (ParamJ = 5 or SaleType = 2 / עסקה ממתינה) are excluded from this check and will not trigger a duplicate alert.
  • Error Response: If a duplicate charge is found within the specified day window, the API rejects the request and returns:
    "ErrorMessage": "רשומה כפולה (lookback)"

Request Parameters Summary

ParameterTypeRequiredDescription
PreventDuplicatesbooleanYESSet to true to activate duplicate checking.
RequestReferencestringOptionalA unique idempotency key (e.g., UUID or order ID). If omitted, the system generates an internal key automatically.
UniqueNumstringOptionalUnique transaction identifier (visible in דו"ח עסקאות). Supported in ChargeSimple / Full, and newly available in GetUrl and SaleChargeToken.
LookbackDaysintegerOptionalScans past direct charges up to X days back for matching RequestReference or UniqueNum values, bypassing transmission resets. For ChargeSimple / Full, applies only when ParamJ = 0 (excludes ParamJ = 5 and SaleType = 2).

Supported API Methods

  • ChargeSimple
  • ChargeSimple/Full
  • SaleChargeToken
  • GetUrl

Did this page help you?