Everyone

Payment Issues

Diagnose and fix common payment problems — failed charges, webhook failures, and gateway errors.

Last updated 1776211200

Payment Failed But No Error Is Shown

If a client reports their payment failed but Commerce shows no error message or the invoice stays unpaid silently:

  1. Check the Laravel log for gateway errors:
    tail -100 storage/logs/laravel.log | grep -i "payment\|gateway\|stripe\|paypal"
    
  2. Log in to your gateway dashboard (Stripe, PayPal, etc.) and check the Events or Transactions log for the failed charge.
  3. Look for the specific decline code (e.g., insufficient_funds, card_declined, do_not_honor).

Most silent failures are caused by a gateway exception that was caught but not surfaced to the UI. The Laravel log will contain the full error message.

Stripe Webhook Not Being Received

If invoices are not being marked paid after a Stripe payment:

  1. Log in to the Stripe DashboardDevelopers → Webhooks.
  2. Verify your webhook endpoint is registered: https://yourdomain.com/webhooks/stripe
  3. Check that the endpoint is set to receive the payment_intent.succeeded and charge.succeeded events.
  4. Test the webhook by clicking Send test event in the Stripe dashboard.
  5. Check that your Commerce webhook route is excluded from CSRF verification. In app/Http/Middleware/VerifyCsrfToken.php, confirm that /webhooks/* is in the $except array.

[!IMPORTANT] Stripe webhooks must be reachable from Stripe's servers. If your Commerce install is on a private network, staging server, or behind a firewall that blocks external POST requests, Stripe cannot reach it.

PayPal Payment Completes But Invoice Stays Unpaid

This almost always means the PayPal webhook is not configured:

  1. Log in to PayPal Developer → My Apps → Webhooks.
  2. Add a webhook for https://yourdomain.com/webhooks/paypal.
  3. Subscribe to the PAYMENT.CAPTURE.COMPLETED event.
  4. Save and test with PayPal's webhook simulator.

Without this event subscription, PayPal completes the charge but never notifies Commerce, so the invoice is never marked paid.

Mollie Redirect Doesn't Return

If clients complete Mollie payment but are not redirected back to Commerce:

  1. Check that your APP_URL in .env matches the URL clients access Commerce on — including the protocol (https://).
  2. Mollie uses the redirectUrl parameter to return clients. If this URL is unreachable or misconfigured, the redirect silently fails.
  3. Check the Mollie dashboard for the payment status — if it shows Paid, the problem is only with the redirect, not the payment itself. The webhook should still mark the invoice paid.

Authorize.net: "This Transaction Has Been Declined"

Common causes:

Cause Fix
Using sandbox API keys on the live endpoint Ensure sandbox_mode in gateway config matches the keys being used
Using a real card in sandbox mode Sandbox requires Authorize.net test card numbers
Live keys used in sandbox mode Authorize.net rejects live cards in the sandbox environment
CVV mismatch or AVS failure Check Authorize.net account settings for CVV/AVS response handling

Checking Payment History on an Invoice

  1. Go to Admin → Invoices.
  2. Open the invoice.
  3. Scroll to the Payment History tab.

This shows each payment attempt — including failed attempts, the gateway used, the transaction ID, and any error message returned.

[!TIP] When investigating a payment issue, always get the transaction ID from this log first. Paste it into the gateway dashboard to pull the full event details — the gateway always has more information than Commerce's log.