Payment life cycle

There are three stages to payment processing: validation, reservation, and finalization. The payment life cycle is related to the order life cycle stages: order capture, release to fulfillment, and shipping.

validation
Ensures that a customer has adequate funds to make the purchase. The payment action depends on the customer's payment method. For instance, when a customer pays for a purchase using a credit card, a credit card authorization is sent and if it is valid, the transaction is approved. This process occurs during an order submission.
reservation
Ensures that funds are available before shipment of the goods. The reservation amount is the sum of all order release amounts. This process occurs during a release to fulfillment.
finalization
Payment finalization is typically driven by a shipment confirmation message from or on behalf of the fulfiller. This process occurs when the goods are shipped for the order release.

An order can have multiple releases if items in the order must be shipped from different warehouses or use different carriers, or if some of the items need to arrive at different times, such as for an expedited item. Additionally, a customer can group order items in the same order to ship together, including backordered items or future shipments.

Consider an example using the Early Approval payment rule. The PrimePaymentCmd payment action is "approve." The order consists of two items, a sweater (60 U.S. dollars) that is currently available and a shirt (40 U.S. dollars) that is available in one week. In this example, there are two releases for the order: one for the sweater and another for the shirt.

  • Payment validation (order capture)

    60 U.S. dollars is validated because only the sweater is available.

    At payment validation (the PrimePaymentCmd command), the Payment rules engine determines what payment actions to take to achieve the target state for the initial amount.

  • Payment reservation (release to fulfillment)

    If the release for the sweater is released to fulfillment, the payment reservation amount contains 60 U.S. dollars.

    At payment reservation (the ReservePaymentCmd command), the Payment rules engine determines what payment actions to take to achieve the target state for amounts to be reserved.

    Note: The last-chance-edit operation is not supported. For example:
    1. The shopper submits an order with two sweaters and the sweaters are released to fulfillment where the Reverse Payment is run.
    2. The shopper wants to remove one sweater from this order.
  • Payment finalization (shipping)

    If the release for the sweater is shipped, the payment finalization amount contains 60 U.S. dollars. At payment finalization (the FinalizePaymentCmd task command), the Payment rules engine determines what payment actions to take to achieve the target state for amounts to be finalized.

    Then after one week, the other order item of the shirt is in stock, it needs to Scheduling the ProcessBackorders job job to validate the payment. The process flows for this order item at Payment Reservation and Payment Finalization Stage are similar with the order item of the sweater.