cancel
Showing results for 
Search instead for 
Did you mean: 

"A duplicate transaction has been submitted" error while doing new Customer Payment Profile request

Hello.

I have the following issue:

  1. Customer enters his credit card number with wron CVV and tries to place order.
  2. I create customer profile
  3. I create Customer Payment Profile with "validationMode: liveMode"
  4. I get error: "E00027 - This transaction has been declined."
  5. Customers see some error and enters correct CVV and sends an order again.
  6. I try again to create Customer Payment Profile with "validationMode: liveMode"
  7. I get the following error: "E00027 - A duplicate transaction has been submitted.".

And customer should wait for 2 minutes for placing order. 

My question: how can I mitigate the issue with duplicate transaction? I didn't find option to set custom "duplicateWindow" to Customer Pyament Profile request.

I tried to use "validattionMode: test" and it worked BUT it successfully charged the credit card even I enter wrong CVV code. It's unacceptable

onlylastride
Member
4 REPLIES 4

The “duplicate transaction” error happens because Authorize.Net blocks repeat payment requests within a short time window (default 120 seconds).

Fix options:

  1. Turn off duplicate transaction check → Call Authorize.Net API without the default duplicateWindow, or set it to 0.

  2. Add unique order IDs → Pass a unique refId or invoiceNumber with each request so that the system doesn’t think it’s the same payment.

  3. Use validationMode: testMode for card validation only, then run the actual charge after the customer corrects their details.

  4. <!-- Ready-to-paste HTML answer for forum or docs -->
    <!doctype html>
    <html lang="en">
    <head>
    <meta charset="utf-8" />
    <title>Fix: "A duplicate transaction has been submitted" (Authorize.Net)</title>
    <meta name="viewport" content="width=device-width,initial-scale=1" />
    <style>
    body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial; line-height:1.5; color:#111; padding:18px; max-width:760px; }
    h1 { font-size:1.15rem; margin-bottom:8px; }
    p { margin:8px 0; }
    code, pre { background:#f6f6f6; padding:8px; border-radius:6px; display:block; white-space:pre-wrap; }
    .steps { margin:12px 0; }
    .hint { font-size:0.95rem; color:#444; margin-top:10px; }
    </style>
    </head>
    <body>
    <h1>Quick fix: "A duplicate transaction has been submitted" (Authorize.Net)</h1>

    <p>
    The duplicate error occurs because Authorize.Net blocks repeated transaction submissions that look identical within a short window (default ~120s).
    The easiest, reliable fixes are listed below — use one or more to avoid the E00027 error.
    </p>

    <div class="steps">
    <strong>Short &amp; practical steps:</strong>
    <ol>
    <li><strong>Attach a unique order id</strong> to every attempt (use <code>order.invoiceNumber</code> or <code>refId</code>). This tells Authorize.Net each retry is a distinct transaction.</li>
    <li><strong>Use validation only when needed:</strong> For CVV correction flows, consider <code>validationMode: testMode</code> or do a lightweight <em>authorization-only</em> for validation, then run the real charge after customer confirms details.</li>
    <li><strong>Handle the E00027 response gracefully:</strong> If you get E00027, generate a new invoice/refId and re-submit the payment (or prompt the user and retry server-side after short delay).</li>
    </ol>
    </div>

    <p><strong>Example JSON (concept):</strong></p>
    <pre>
    {
    "createCustomerPaymentProfileRequest": {
    "merchantAuthentication": {
    "name": "YOUR_API_LOGIN",
    "transactionKey": "YOUR_TRANSACTION_KEY"
    },
    "customerProfileId": "12345678",
    "paymentProfile": {
    "billTo": { "firstName":"John", "lastName":"Doe" },
    "payment": {
    "creditCard": {
    "cardNumber": "4111111111111111",
    "expirationDate": "2026-12",
    "cardCode": "123"
    }
    }
    },
    "validationMode": "liveMode",
    "refId": "order-20251003-160920" /* <- make this unique for every attempt */
    }
    }
    </pre>

    <p><strong>Server-side retry pseudocode:</strong></p>
    <pre>
    try {
    submitCreateCustomerPaymentProfile(payload);
    } catch (err) {
    if (err.code === 'E00027') {
    // generate a new unique refId/invoiceNumber and retry once
    payload.refId = 'order-' + Date.now();
    submitCreateCustomerPaymentProfile(payload);
    } else {
    throw err;
    }
    }
    </pre>

    <p class="hint">
    <strong>Why this works:</strong> Platforms like Crunchyroll attach unique transaction/invoice IDs to each payment attempt and separate validation from the final charge. That prevents accidental duplicate detection when a user retries with corrected CVV — follow the same pattern to make your flow smooth and user-friendly.
    </p>

    <p class="hint">
    If you want, I can convert the above into a short 2–3 line forum comment (HTML or plain text) you can paste directly into Q&amp;A sites.
    </p>
    </body>
    </html>


Crunchyroll Relevance

This is the same reason why platforms like Crunchyroll’s payment system rarely give duplicate charge errors  they always attach a unique transaction ID to every payment attempt. That way, even if a customer enters wrong CVV or retries quickly, the system doesn’t confuse it with the previous request.

Maxcole
Member

The duplicate transaction error happens because Authorize.Net blocks repeat payment requests within a short time window (default 120 seconds). To fix this you can disable the duplicate transaction check by setting duplicateWindow to 0, add a unique refId or invoiceNumber with each request, or use validationMode testMode only for card validation and then run the actual charge after the customer corrects their details. Another option is to handle the E00027 error with a short retry delay. This is similar to how Crunchyroll payment system works by always attaching a unique transaction ID to every payment attempt so even if a customer retries quickly it is not treated as a duplicate.

Maxcole
Member

`duplicateWindow` option is not available while doing the "Create Customer Payment Profile" request.

I also tried to set unique string to the `refId` field - no luck, still receive duplicate error.

onlylastride
Member