Order Reconciliation Service

Order Reconciliation Service

To ensure the integrity and finality of all transactions, Optty provides the "Order Reconciliation Service." This backend service automates the process of verifying order statuses and managing payment timelines, preventing misaligned states between your system and the Payment Provider.

Key Functions

This service performs two critical functions:

  1. Status Poling: The service continuously polls the status of the APM to ensure that the order status in Optty is always up-to-date and accurately reflects the true state of the payment. This eliminates discrepancies and maintains Optty as a single source of truth for all your transactions.

  2. Payment and Checkout Timeouts: The service allows you to set time limits on the payment process, giving you greater control over your order fulfillment pipeline. If any timeout is reached we cancel the order with the payment method and set the state in Optty to canceled. We differentiate between canceled by ORS by saying canceled by system, if the user manually cancels it will have a canceled by user status in the portal.

    • Cancellation Timeout: You can define how long an order is available for a customer to complete payment from the moment the order is created by passing in cancellationTimeout. If the customer does not finalize the payment within this timeframe, the service will automatically cancel the order, ensuring you do not have to stay commited to fulfilling an order that is unlikely to be paid.

    • Checkout Timeout: Some payments may remain in a pending state for a period of time after the customer completes the checkout process. You can set a checkoutTimeout (e.g., 2 minutes) to limit how long you are willing to wait for a final payment status once the customer completes the checkout process. If a final state (successful or declined) is not reached within this time, the service will cancel the order. This prevents transactions from being in a non-final state for extended periods of time while the customer waits and allows you to prompt the customer to retry the payment, reducing customer wait times and improving the overall checkout experience.

Manual Intervention for Edge Cases

In a rare scenario where a race condition occurs—for instance, if a customer finalizes their payment at the exact moment a timeout request is sent—a status mismatch can occur.

To address this, our service includes a manual intervention protocol. In such cases, the system will send an email to you to manually intervene with the payment. You may then access how to handle on a case by case basis. These cases are extremely rare and will not occur often, expecially when the timeouts are set at longer time periods.

Last updated