> ## 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.

# Shopify

# Shopify Integration

Pillar8 integrates with Shopify through a checkout UI extension and backend webhook flow.

## Current Integration Model

The current Shopify implementation uses:

* A checkout block extension
* The Pillar8 optimize API
* Webhook-based learning from transaction outcomes

## How It Works in Shopify

<Steps>
  <Step title="Checkout context is captured">
    The extension reads checkout token, cart value, country and currency, available and presented payment methods, and device context.
  </Step>

  <Step title="Pillar8 returns a decision package">
    The extension sends checkout context to the Pillar8 optimize API and receives a decision package in response.
  </Step>

  <Step title="Advisory layer is rendered">
    Pillar8 influences buyer behavior through an advisory block in checkout. This advisory layer recommends a payment method when confidence and visibility conditions are met.
  </Step>
</Steps>

## Current Shopify Constraint

<Warning>
  The active Shopify implementation does not directly reorder Shopify's payment method list. It currently operates as an advisory decision layer.
</Warning>

## What Shopify Integration Is Good For

* Validating decision quality
* Guiding shopper behavior
* Measuring completion impact
* Learning from real transaction outcomes

## Integration Components

<Columns cols={2}>
  <Card title="Checkout UI extension" icon="box">
    Renders advisory layer in checkout.
  </Card>

  <Card title="Optimize API" icon="zap">
    Returns decision packages based on context.
  </Card>

  <Card title="Order-completion webhook" icon="webhook">
    Captures transaction outcomes.
  </Card>

  <Card title="Advisory rendered telemetry" icon="chart-line">
    Tracks advisory visibility and impact.
  </Card>
</Columns>

## Shopify Webhooks Used

The Shopify integration uses multiple webhook events to reconstruct the full transaction lifecycle and improve decision accuracy:

* `orders/paid`
* `order_transactions/create`
* `tender_transactions/create`
* `checkouts/create`

<Note>
  Shopify is one supported environment. Other environments with deeper checkout control may allow broader execution of the decision package.
</Note>
