Checking access…

Skip to main content
Audience: CCG Platform Engineers

Idempotency & Retries β€” Reference

The rules and database fields used for v2 payment deduplication. For the processing model, see Idempotency & Retries. For a request walkthrough, see How to Retry a Payment Request.

Idempotency Rules​

RuleDetail
KeymerchantTransactionId + merchantId (composite uniqueness)
Max attempts5 total (1 initial + 4 retries)
Behavior on retryReturns the existing payment resource with its current status
No re-processingA retry does not create a new Stripe PaymentIntent
After limitReturns 422 UNPROCESSABLE_ENTITY; merchant must use a new merchantTransactionId
ScopePer-merchant β€” same merchantTransactionId from different merchants creates separate payments


Database-Level Dedup​

ColumnTableIndex TypePurpose
merchant_transaction_idpaymentUnique (composite with merchant_id)Prevents duplicate inserts
retry_countpaymentβ€”Tracks attempt count

PROCESSING_DEDUP_CHECK State​

In the pay-and-save flow, an additional dedup check occurs to prevent saving a duplicate payment method: