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

# WooCommerce Adapter

> Accept Stellar blockchain payments in your WooCommerce store

The StellarTools WooCommerce plugin adds Stellar-based payments to any WooCommerce store. Customers pay with USDC, EURC, or XLM through a hosted checkout page. Order status updates automatically when StellarTools confirms payment via webhook.

## Requirements

* WordPress 6.0 or later
* WooCommerce 8.0 or later
* A [StellarTools account](https://dashboard.stellartools.dev/signup) with an API key and webhook secret

## Download the plugin

[Download stellartools-woocommerce.zip](https://dashboard.stellartools.dev/~api/integrations/woocommerce/download)

## Installation

### Step 1 Navigate to Add Plugin

In your WordPress admin sidebar, go to **Plugins** then click the **Add Plugin** button at the top of the page.

<img src="https://mintcdn.com/stellartools/gF4PDjVxoHZSuz4W/images/addpluginbutton.png?fit=max&auto=format&n=gF4PDjVxoHZSuz4W&q=85&s=12f6095d59d4afaaf938593b9ba91e86" alt="Plugins page with Add Plugin button highlighted" width="3568" height="2244" data-path="images/addpluginbutton.png" />

### Step 2 Upload and install

On the Add Plugins screen, click **Upload Plugin**, select your `stellartools-woocommerce.zip` file, then click **Install Now**.

<img src="https://mintcdn.com/stellartools/gF4PDjVxoHZSuz4W/images/installplugin.png?fit=max&auto=format&n=gF4PDjVxoHZSuz4W&q=85&s=12563977152085ab2902c3833965bb4b" alt="Upload Plugin form showing steps 1, 2, 3" width="3600" height="2260" data-path="images/installplugin.png" />

### Step 3 Activate the plugin

After the upload completes, click **Activate Plugin**.

<img src="https://mintcdn.com/stellartools/gF4PDjVxoHZSuz4W/images/activateplugin.png?fit=max&auto=format&n=gF4PDjVxoHZSuz4W&q=85&s=680caafd2ab902e9189c8edc272d5c6d" alt="Plugin installed successfully with Activate Plugin button" width="3600" height="2260" data-path="images/activateplugin.png" />

StellarTools will now appear in your installed plugins list.

<img src="https://mintcdn.com/stellartools/gF4PDjVxoHZSuz4W/images/pluginactivated.png?fit=max&auto=format&n=gF4PDjVxoHZSuz4W&q=85&s=c13769f542b50322c795219d1e6133e5" alt="Plugins list showing StellarTools as active" width="3594" height="2260" data-path="images/pluginactivated.png" />

## Configuration

### Step 4 Open WooCommerce payment settings

In the sidebar go to **WooCommerce → Settings**, click the **Payments** tab, and find StellarTools in the list. Click **Manage** to open the gateway settings.

<img src="https://mintcdn.com/stellartools/gF4PDjVxoHZSuz4W/images/paymentoption.png?fit=max&auto=format&n=gF4PDjVxoHZSuz4W&q=85&s=cdc4c942ccb0c86bafe1bc85b244f37c" alt="WooCommerce Payments tab with StellarTools active and Manage button highlighted" width="3600" height="2260" data-path="images/paymentoption.png" />

### Step 5 Enter your credentials

Fill in the fields highlighted below and save. Checkout amounts use your WooCommerce store currency (WooCommerce → Settings → General). Customers choose USDC, EURC, or XLM on the StellarTools hosted payment page.

<img src="https://mintcdn.com/stellartools/gF4PDjVxoHZSuz4W/images/keysadons.png?fit=max&auto=format&n=gF4PDjVxoHZSuz4W&q=85&s=322fba0e701594b70e3b9811e4e786c6" alt="StellarTools gateway settings panel" width="3600" height="2260" data-path="images/keysadons.png" />

<ParamField body="API Key" type="string" required>
  Your StellarTools secret key. Test keys begin with `sk_test_`; live keys begin with `sk_live_`. Find yours in the
  [StellarTools dashboard](https://dashboard.stellartools.dev/api-keys).
</ParamField>

<ParamField body="StellarTools API URL" type="string">
  Leave as `https://api.stellartools.dev` unless you are self-hosting. No trailing slash.
</ParamField>

<ParamField body="Webhook Signing Secret" type="string" required>
  Copy the signing secret from your webhook endpoint in the [StellarTools
  dashboard](https://dashboard.stellartools.dev/webhooks). Your webhook URL is shown inline directly in the settings
  page copy it from there.
</ParamField>

<ParamField body="Order Status on Payment Confirmed" type="string">
  WooCommerce status to set when payment is confirmed. Use **Processing** for physical goods that need fulfilment; use
  **Completed** for digital or virtual products.
</ParamField>

<ParamField body="Debug Logging" type="boolean">
  Writes API requests and webhook events to WooCommerce → Status → Logs. Enable during setup, disable in production.
</ParamField>

### Step 6 Register the webhook in StellarTools

Copy the webhook URL displayed in the settings panel and add it as a new endpoint in the [StellarTools dashboard](https://dashboard.stellartools.dev/webhooks). Enable at minimum the `payment.confirmed` and `payment.failed` events.

The URL uses WordPress plain-permalink REST routing:

```
https://<your-store-domain>/index.php?rest_route=/stellartools/v1/webhook
```

## How it works

Once configured, **Pay with Stellar (Crypto)** appears as a payment option on the WooCommerce checkout page.

<img src="https://mintcdn.com/stellartools/gF4PDjVxoHZSuz4W/images/checkoutoption.png?fit=max&auto=format&n=gF4PDjVxoHZSuz4W&q=85&s=6b44e8dbece2c2caf9afddb3b3531f33" alt="WooCommerce checkout page showing Pay with Stellar option selected" width="3600" height="2260" data-path="images/checkoutoption.png" />

After clicking **Place Order** the customer is redirected to the StellarTools hosted payment page to complete the payment on the Stellar blockchain. On return they land on the WooCommerce order confirmation page.

<img src="https://mintcdn.com/stellartools/gF4PDjVxoHZSuz4W/images/orderconfirm.png?fit=max&auto=format&n=gF4PDjVxoHZSuz4W&q=85&s=ae8629e28083f0831f16a772ef8620e5" alt="Order received confirmation page" width="3600" height="2258" data-path="images/orderconfirm.png" />

StellarTools fires a `payment.confirmed` webhook to your site. The plugin verifies the signature, resolves the WooCommerce order, and updates the status automatically.

<img src="https://mintcdn.com/stellartools/gF4PDjVxoHZSuz4W/images/ordercompleted.png?fit=max&auto=format&n=gF4PDjVxoHZSuz4W&q=85&s=564057f973301aa3fd2dc2df64cd32ce" alt="WooCommerce orders list showing order marked as Completed" width="3594" height="2260" data-path="images/ordercompleted.png" />

## Webhook events

| Event               | WooCommerce action                                                                                             |
| ------------------- | -------------------------------------------------------------------------------------------------------------- |
| `payment.confirmed` | Order moves to Processing or Completed (per your setting), payment ID and transaction hash saved to order meta |
| `payment.failed`    | Order moves to Failed                                                                                          |
