Order capture, payment reservation, and finalization

There are three stages to payment processing: validation, reservation, and finalization.

During an order submission, a payment validation occurs. This is a check that is made to ensure that a customer has adequate funds to make the purchase. The type of action taken will depend on the configuration of the payment method used by the customer. For example, for a credit card purchase, a credit card authorization is sent and if it is valid, the transaction is approved.

When an order release is selected for release to fulfillment, a payment reservation occurs. The payment reservation provides an indication that funds are available prior to shipment of the goods.

When the goods are finally shipped, a payment finalization occurs for the order release. Payment finalization is typically driven by a shipment confirmation message from or on behalf of the fulfiller.

The Payment Rules subcomponent keeps track of the total amount of the order and the total amount of the payment reservation (the sum of all order release amounts) when an order is processed. An order that is submitted with zero total payment amount, that is, the total amount due on the order is zero ($0.00), including shipping or handling charges, the order can be processed without payment information. This situation can occur if an item is being offered at no charge as a promotion, an equal exchange is being made, or an order adjustment is being made by the customer service representative during an order edit.

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.

As the order progresses through its life cycle, from order capture to fulfillment, changes might occur to the payment amounts associated with an order release. For example, inventory might arrive unexpectedly for part of an order, and an order item that could not ship for a few days can now ship with the rest of the order.

Internally, the system records the payment amount differences in a database table and always checks to see where the current requested payments are in relation to the payment amount approved. This calculation is necessary to determine what payment action to take for transactions related to payment reservation and finalization.

To understand the concepts better, consider the event-driven payment configuration where the Early Approval payment rule is used and the payment action for the PrimePaymentCmd command is "approve." In this rule, the target states of payments are at order capture (Approved), release to fulfillment (Approved), and fulfillment (Deposited). To illustrate the relationship of the main events and how payments are handled, we'll use an analogy. Think of payment amounts as water in three glasses: a validation (order capture) glass, a reservation (release to fulfillment) glass, and a finalization (shipping) glass. Suppose every dollar corresponds to an ounce of water. When the order is captured, the payment amount associated with what is available in stock is poured into the validation glass. If an 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, the validation glass contains only 60 U.S. dollars because only one item was available.

In this example, there are two releases for the order: one for the sweater and another for the shirt. The payment reservation glass might not contain the same amount as the validation glass. If the release for the sweater is released to fulfillment, the payment reservation glass contains 60 U.S. dollars, but if inventory for the shirts arrives earlier than expected, the two items can be released together and the payment reservation glass now contains 100 U.S. dollars. The payment amounts associated with release to fulfillment are now different from what was originally in the order capture glass (60 U.S. dollars plus 40 U.S. dollars).

Think of the payment finalization glass as one in which you pour the amounts from the payment reservation glass. You can deposit the entire contents of your payment reservation glass, or a little bit at a time, but not more than what your payment reservation contains.

By the time both the sweater and shirt ship and payment finalization occurs, the payment amounts in the finalization glass should "use up" the amount in the payment reservation glass.

At payment validation (the PrimePaymentCmd command), the Payment Rules subcomponent reads Payment Rules and determines what payment actions to take to achieve the desired target state for the initial amount.

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

At payment finalization (the FinalizePaymentCmd task command), the payment actions needed to achieve the desired target state for amounts to be finalized are executed.