The checkout flow

The checkout flow

The checkout flow used for this plugin can result in Pending orders existing in WooCommerce, where the payment has not been finalized in Payson. This is part of the general WooCommerce checkout flow, and it does not implicate that something is wrong.


The Checkout Flow


This is how the order process is structured:

  1. Customer navigates to the checkout page in WooCommerce. If Payson Checkout is the selected (or only) payment method, a Payson order ID is created.
  2. When the customer clicks the Place order button in Payson Checkout, a JavaScript event is triggered by Payson.
  3. The standard WooCommerce checkout form is submitted by the Payson Checkout plugin and a pending order is created in WooCommerce. This order has not yet been paid for and you should not change the status to Processing/Completed manually.
  4. If the order creation went well, the Payson Checkout plugin responds with a true message in the JavaScript event (if something went wrong during the order creation process the Payson Checkout plugin will respond with a false message in the JavaScript event and Payson will not finalize the purchase. Instead an error notice will be displayed for the customer). 
  5. Provided that the Payson Checkout plugin respond with a true message, Payson then finalizes the purchase in their system.
  6. Payson redirects the customer to the confirmation URL.
  7. The Payson Checkout plugin redirects the customer to the order received page and updates the order status to Processing in WooCommerce.