This guide explains why a card payment might remain in a "pending" status in your system and outlines the best practice for ensuring you always receive the final, confirmed status of every transaction.
For detailed technical information on our payment workflows, please refer to our main Developer Documentation. If you are unsure about your specific integration, please contact our support team at support@peachpayments.com
.
1. Understanding the Normal "Pending" State
First, it's important to know that every card transaction briefly enters a "pending" state. This is a normal and expected part of the payment process.
- During the 3D Secure authentication process, our system is waiting for a response from the customer's bank.
- While we wait, the transaction is assigned a temporary status of
pending
(Code: 000.200.000). - Once the 3D Secure process is completed by the customer, this status immediately changes to either "successful" or "failed," and this final result is sent to your system.
2. The Common Cause of a Stuck Transaction: A Broken Redirect
If an order remains "pending" in your system for a long time, it usually means your system missed the final status update from ours. The most common reason for this is a "broken redirect."
- How it Works: After a customer completes the 3D Secure step on their banking page, their browser is automatically redirected back to your website. This redirect carries the final transaction result (successful or failed).
- How it Breaks: This process can fail if the customer closes their browser too quickly, if their internet connection drops, or if a browser extension interferes with the redirect. When this happens, your system never receives the final status, and the order remains stuck in the last state it knew: "pending."
3. The Solution: How to Fix and Prevent This Issue
You can diagnose and permanently solve this issue with the following steps.
Step 1: Investigate Your Logs (Short-Term Diagnosis)
For a specific order that is stuck, the first step is to check your own system's transaction logs. Compare the log of the "pending" transaction with that of a successful one. You will likely see that for the stuck transaction, your system never received the final status payload from us after the initial pending state.
Step 2: Implement Webhooks (Long-Term Solution)
The most reliable and robust way to prevent this issue from ever happening again is to implement webhooks.
- What is a Webhook? A webhook is a secure, server-to-server "push" notification.1Instead of relying on the customer's browser to deliver the message, our server sends the final transaction status directly to your server as soon as it's known.
- Why is it Better? This process is not dependent on the customer's browser or internet connection. It bypasses the risk of a broken redirect entirely, providing a guaranteed way for your system to receive the final status of every transaction.
For full implementation details, please see our Webhooks Documentation.
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article