Double Purchase Protection
Double Purchase Protection helps prevent accidental duplicate charges when a user submits the same purchase request multiple times. This is commonly caused by retries, double-clicks, or parallel requests.
What it does
- Blocks duplicate purchases for the same user and content when protection is enabled.
- Returns a conflict response instead of creating a second confirmed charge.
- Stores a failed transaction for audit and support visibility.
How it works
The system uses a combination of identifiers to determine duplicates:
-
Unique identifiers
We useclientTransactionId,phone, andcontentto detect duplicate transactions. -
Duplicate check logic
A payment is flagged as a duplicate if either of the following combinations match a previous transaction: - If
clientTransactionIdexists, match onclientTransactionId,phone, andcontent - Else match on
phoneandcontent
How transactions are handled
For every transaction attempt, the system performs these checks:
-
Check for unique
clientTransactionId
If a transaction comes with a uniqueclientTransactionId, it is treated as a new transaction. -
Combination check
If the combination ofphoneandcontent, orclientTransactionId,phone, andcontentmatches any previous transaction, the request is identified as a duplicate.
Error response (when blocked)
The API responds with a conflict status and Zlick error code:
{
"statusCode": 409,
"error": "DuplicatePaymentBlockedError",
"message": "Transaction blocked due to duplicate transaction protection. Check your records for a recent, successful payment before retrying.",
"zlickErrorCode": "ZLICK16",
"info": {
"existingTransactionId": "...",
"existingTransactionState": "confirmed",
"existingTransactionAmount": 499,
"existingTransactionDate": "2026-01-26T12:34:56.789Z",
"doublePurchaseProtectionEnabled": true
}
}