askbowtie

Payment Gateway Errors

Payment gateway errors are the most costly website problems. A customer has decided to buy, entered their payment details, clicked "Pay" — and something fails. Many won't try again. Even if you fix it, they're gone.

Most payment errors are configuration or credential issues, not code problems. That's good news: they're usually quick to fix once diagnosed.

Common payment error types

Error Meaning Fix
Invalid credentials API keys wrong or expired Update keys in settings
Gateway timeout Payment provider slow/down Check provider status
Card declined Customer's issue, not yours Show helpful message
Currency mismatch Gateway doesn't support currency Adjust settings or gateway
Invalid request Malformed data sent to gateway Check integration code

Critical distinction: Is the error affecting all transactions or just some? All transactions means configuration. Some transactions means specific card/customer issues.

Diagnosing payment failures

1. Check the payment gateway dashboard

Your gateway (Stripe, PayPal, Square, etc.) has its own dashboard showing transactions. Look for:

Gateway error messages are more detailed than what users see.

2. Verify credentials are current

API keys expire or get rotated. Check:

3. Check for provider outages

Payment gateways have outages like any service:

During outages, you can only wait or switch to a backup gateway.

4. Review recent changes

Payment integrations break when:

Specific error fixes

"Invalid API key"

Your credentials are wrong. This is almost always a copy-paste error or test/live key confusion.

Fix:

  1. Log into your payment gateway dashboard
  2. Copy the API keys fresh (don't trust cached values)
  3. Paste carefully — watch for extra spaces
  4. Verify you're using live keys (not test keys) in production

"Payment not completed"

The transaction started but didn't finish. Common with 3D Secure/SCA flows.

Fix:

"Transaction refused by gateway"

The payment provider explicitly rejected the transaction.

Check:

Minimizing payment failure impact

Show clear error messages: "Something went wrong" doesn't help. Tell customers what to try next.

Offer payment alternatives: If Stripe fails, having PayPal as backup prevents lost sales.

Monitor payment success rates: A sudden drop in payment success rate signals a problem. Use error monitoring to catch failures before they pile up.

Test after any changes: Before and after updating anything payment-related, run a test transaction.

Related pages

Parent: Shopify Issues — Common Shopify problems and fixes

Siblings:

Pillar: Common Fixes — Solutions for frequent issues