> ## Documentation Index
> Fetch the complete documentation index at: https://docs.pillar8.com/llms.txt
> Use this file to discover all available pages before exploring further.

# How It Works

<Tip>
  Pillar8 introduces a real-time decision layer at checkout that evaluates each session individually and generates a decision package instantly—replacing static configuration and delayed experimentation.
</Tip>

## Step 1:  Context Capture

At checkout, Pillar8 captures session-level context:

* Device type
* Country and currency
* Cart value
* Available and presented payment methods
* Checkout session identifier

This context reflects the actual conditions of the current shopper.

## Step 2: Decision Engine

The context flows to the Pillar8 decision engine, which evaluates:

* Historical transaction patterns
* Performance signals across similar contexts
* Real-time session characteristics

The engine then generates a **decision package**.

## Step 3: Decision Package

The decision package contains:

* Ranked payment methods
* Contextual scoring signals
* Confidence indicators
* Eligibility and gating logic

This package determines how checkout should be handled for the current session.

## Step 4:  Execution

The decision is applied based on your checkout environment.

**Advisory (default)**

Pillar8 renders a lightweight advisory layer that guides shoppers toward the recommended payment method.

**Merchant-controlled execution**

You can use the decision package to:

* Reorder payment methods
* Highlight specific options
* Customize checkout behavior

**Insights**

All decisions and outcomes are captured in the merchant portal for analysis and optimization.

## Step 5: Learning Loop

After transaction completion, Pillar8 receives the outcome via webhook:

* Selected payment method
* Transaction result
* Contextual data

The system continuously learns from this feedback and improves future decisions.

## Continuous Optimization

Unlike A/B testing, which operates in cycles, Pillar8 adapts in real time at the session level.

Each checkout is evaluated independently, enabling the system to:

* React to real-time conditions
* Capture edge-case behaviors
* Improve decision quality over time

<Callout icon="lightbulb" color="#3B82F6">
  **Key Principle:** Checkout behavior is dynamic. Pillar8 replaces static rules and delayed experimentation with real-time decisioning at the moment of payment.
</Callout>
