Order Flow

Last modified September 6, 2016

This section of the documentation describes the order flow process and concepts. It is important to understand the order flow whether you are implementing the order flow by customizing your storefront with the Store Builder Library or FastSpring API or FastSpring is automatically handling the session, cart, and checkout procedures.  The order flow is comprised of 5 phases:

  1. Checkout Preparation
  2. Customer Checkout
  3. Payment Processing
  4. Order Fulfillment
  5. Order Completed

 Each phase is described below. 

Checkout Preparation

At this step you can choose one of the following options:

If you are planning to use Popup Storefronts you will need to use Store Builder Library even for checkout scenarios not requiring advanced operations.

Customer Checkout

This is where the customer determines the payment method they wish to use and provide their payment details. Additional details about customizing the flow can be found at corresponding storefronts:

Payment Processing

Once a customer has submitted their payment details, the order, payment, and customer information is analyzed for potential fraud or other risk factors.  If an issue is discovered, the order will be canceled and the order.failed webhook will fire. Valid orders will continue through the charging process. If the charge was successful, the order will move to the Order Fulfillment phase of the process. If the charge is unsuccessful, the order.failed webhook will fire and the order will be canceled. 

 

If the order contained a subscription product, the subscription instance will be created. See Subscription Integration for more information regarding subscription integration.

Order Fulfillment

The fulfillment of the order will not occur until the payment has been successfully processed.  At that time FastSpring will attempt to fulfill the order.   If any issues occur during the fulfillment of the order the fulfillment.failed webhook will fire. Once the fulfillment phase has been completed, the order will move to the Order Completed phase. 

Order Completed

At this point in the process the order is basically finished.  The order completion page is displayed to the customer, all order based emails are delivered, and the order.completed webhook is fired.   

 

The following diagram explains each of the phases described above. 

order phases

Order flow example with no errors during payment or fulfillment processing: 

  1. Place a Store Builder Library to your website.
  2. Visitor attends your website where you can display localized pricing for products and maintain cart state using Store Builder Library.
  3. Visitor places products to the cart (without leaving your website). 
  4. Session state is being maintained on the background (and will be kept for 24 hours). 
  5. Visitor clicks "Checkout". 
  6. Session state is "exchanged" to the Session ID and Session ID is used to redirect the customer to a FastSpring-hosted checkout or display a FastSpring-hosted popup store.
  7. Customer submits their payment details.
  8. Order is fulfilled. 
  9. Order is completed.