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β
| Rule | Detail |
|---|---|
| Key | merchantTransactionId + merchantId (composite uniqueness) |
| Max attempts | 5 total (1 initial + 4 retries) |
| Behavior on retry | Returns the existing payment resource with its current status |
| No re-processing | A retry does not create a new Stripe PaymentIntent |
| After limit | Returns 422 UNPROCESSABLE_ENTITY; merchant must use a new merchantTransactionId |
| Scope | Per-merchant β same merchantTransactionId from different merchants creates separate payments |
Database-Level Dedupβ
| Column | Table | Index Type | Purpose |
|---|---|---|---|
merchant_transaction_id | payment | Unique (composite with merchant_id) | Prevents duplicate inserts |
retry_count | payment | β | 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: