Payment Lifecycle
Learn how Orders and Payments work within the payment flow.
When processing payments through Cashfree Payments, orders and their associated payments progress through various states. Understanding these states helps you track transactions and handle different scenarios effectively.
Understanding two critical timing parameters - Order Expiry Time and Payment Time to Live (TTL) - is essential for managing your payment flows effectively.
Order Expiry Time
The order_expiry_time
parameter controls how long an order remains available for payment. Once this time elapses:
- New payment attempts will be rejected. Customers cannot initiate new transactions.
- The order state changes to
EXPIRED
Payment Time to Live (TTL)
The Payment TTL feature helps you maintain strict control over transaction timeouts and automated refund handling. This mechanism automatically marks delayed successful transactions as CANCELLED
and initiates immediate reversals for successful transactions exceeding TTL. This helps reduce payment uncertainty and simplifies transaction reconciliation.
Order States
Order State | Description |
---|---|
ACTIVE | Orders are marked as ACTIVE, when an order is created by the merchant through an API request to Cashfree Payments. |
PAID | Orders are marked PAID when the payment is verified by Cashfree Payments and the payment is successful. |
EXPIRED | Orders are marked as EXPIRED when the order has exceeded order_expiry_time specified by merchant to complete the order. |
TERMINATED | This status might come ONLY if you request to terminate the Order using [Order Termination API](Order Termination API). This indicates that customers can no longer pay for this order. |
TERMINATION_REQUESTED | This status might come ONLY if you request to terminate the Order using [Order Termination API](Order Termination API). This indicates that you have requested to Terminate the order, however, its still under process. Order gets Terminated only if there’s no transaction in a non-terminal state. If a transaction is in intermediate state and gets success then status can go from TERMINATION_REQUESTED to SUCCESS also. |
Payment States
Payment State | Description |
---|---|
SUCCESS | Transactions are marked as SUCCESS when we get a successful response from the bank, and we can capture the amount in our system. Once payment is marked as SUCCESS , we mark the order as PAID . |
FAILED | Transactions are marked as FAILED when we get a failed response from the bank. |
NOT_ATTEMPTED | Transactions are marked as NOT_ATTEMPTED initially when a transaction is created and an acknowledgement is awaited from the bank. |
PENDING | Transactions are marked as PENDING when we have successfully sent the request to the bank but waiting for a response from the bank. |
FLAGGED | Transactions are marked as FLAGGED if we have identified any risks associated with the transaction. |
CANCELLED | Transactions are marked as CANCELLED when there is success response post time to live. In this case, the amount will be reversed to the customer without any charge being levied to them or the merchant. |
VOID | Transactions are marked as VOID when we do not want to capture the transaction amount. This is only applicable for card-based pre-authorized transactions or to UPI one-time mandates. The amount is reversed immediately in these cases by Cashfree Payments. |
USER_DROPPED | Transactions are marked as USER_DROPPED when customers drop out of the payment flow without completing the transaction. It will help you understand if customers attempted to pay or not. Some common scenarios where the transaction will be marked as USER_DROPPED are: - Android UPI Intent Payments - when a user clicks on the back button in the UPI app without making any payment attempt. - Card Payments - when a user drops out of the payment flow by closing the OTP verification page. - UPI Collect Transactions - when a user does not enter the UPI PIN and closes the transaction screen |
Was this page helpful?