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

# WordPress (WooCommerce) Plugin

> Accept Tender cryptocurrency payments in WooCommerce using the official Tender JavaScript SDK.

## Overview

The Tender WooCommerce plugin is a WordPress payment gateway that embeds the **Tender JavaScript/React SDK** directly into your WooCommerce checkout flow.

Instead of custom HTML forms, the plugin uses the `@tender-cash/agent-sdk-react` package to render the Tender payment experience, including support for:

* **Crypto payments** in your WooCommerce store
* **Completed, partial, and overpayment** handling
* **Test and live environments**
* **WooCommerce Blocks** checkout compatibility
* **Automatic WooCommerce order status updates**

You can install the plugin from the provided ZIP file:

* **Download**: [`woo-tender-sdk.zip`](https://tender-store.s3.us-east-1.amazonaws.com/woo-tender-sdk.zip)

***

## Installation

Follow these steps to install the Tender WooCommerce plugin:

1. **Download** the plugin ZIP: [`woo-tender-sdk.zip`](https://tender-store.s3.us-east-1.amazonaws.com/woo-tender-sdk.zip)
2. In your WordPress admin, go to **Plugins → Add New → Upload Plugin**
3. Upload the ZIP file and click **Install Now**
4. Click **Activate** to enable the plugin
5. Go to **WooCommerce → Settings → Payments**
6. Enable **"Tender SDK Payment"** and click **Manage** to configure it

Alternatively, you can upload it manually:

1. Extract the ZIP
2. Upload the `woocommerce-payment-sdk-gateway` folder to `/wp-content/plugins/`
3. Activate the plugin in **Plugins**

***

## Configuration

In **WooCommerce → Settings → Payments → Tender SDK Payment**, configure the gateway with your Tender credentials.

### Required settings

* **Access ID**: Your Tender merchant Access ID (from the Tender dashboard)
* **Access Secret**: Your Tender merchant Access Secret
* **Agent ID**: Your Tender Agent ID
* **Environment**: `Test` (staging) or `Live` (production)

### Optional settings

* **Title**: Name shown to customers at checkout (default: "Pay with Crypto")
* **Description**: Description shown on the checkout page

Make sure the credentials you use match the selected environment (test vs live).

***

## How It Works

The WooCommerce gateway wraps the Tender React SDK and handles order status updates for you.

1. Customer selects **Tender SDK Payment** at checkout
2. After placing the order, they are redirected to the **Tender payment page**
3. The Tender React SDK loads and renders the payment UI
4. Customer chooses a cryptocurrency and completes payment
5. The SDK sends the payment status back to WordPress via secure AJAX
6. WooCommerce order status is updated automatically:
   * **Completed** – Order marked as paid
   * **Overpayment** – Order completed with a note about the excess amount
   * **Partial payment** – Order placed **on hold** pending full payment
   * **Error / Cancelled** – Customer is redirected back to checkout

***

## SDK Integration Details

Under the hood, the plugin uses the **Tender Agent SDK React** library:

* **Package**: `@tender-cash/agent-sdk-react`
* **Load method**: ES module from CDN (`unpkg.com`)

Example of the SDK props used by the plugin:

```jsx theme={null}
<TenderAgentSdk
  accessId="YOUR_ACCESS_ID"
  fiatCurrency="USD"
  env="test"           // or "live"
  amount={150.00}
  referenceId="order-123-timestamp"
  paymentExpirySeconds={1800}
  theme="light"
  onEventResponse={handlePaymentCallback}
/>
```

The `onEventResponse` callback is responsible for sending the payment result back to WordPress, which then updates the WooCommerce order.

For a deeper dive into the SDK itself, see the **JavaScript SDK** docs at `/sdk/javascript`.

***

## File Structure (Plugin)

The main plugin files are organized as follows:

```text theme={null}
woocommerce-payment-sdk-gateway/
├── woocommerce-tender-sdk-gateway.php        # Main plugin bootstrap file
├── class-woocommerce-tender-sdk-gateway.php  # WooCommerce gateway implementation
├── templates/
│   └── tender-sdk-payment.php                # Payment page template that mounts the SDK
├── blocks/
│   ├── class-tender-sdk-payment-block.php    # WooCommerce Blocks integration
│   └── build/
│       ├── index.js                          # Block script
│       └── index.asset.php                   # Asset dependencies
├── languages/                                # Translation files
└── README.md                                 # Plugin README
```

Key WordPress/WooCommerce integration points:

* `woocommerce_payment_gateways` – registers the gateway
* `woocommerce_blocks_payment_method_type_registration` – registers the checkout block
* `wp_ajax_tender_sdk_update_order_status` – handles payment status updates

***

## Requirements

To use the plugin in production, you need:

* **WordPress** 5.0 or higher
* **WooCommerce** 3.0 or higher
* **PHP** 7.4 or higher
* A modern browser with JavaScript enabled
* Valid Tender **Access ID**, **Access Secret**, and **Agent ID**

***

## Security Considerations

The WooCommerce plugin follows WordPress security best practices:

* All AJAX requests use **WordPress nonces**
* Tender access credentials are stored securely in **WordPress options**
* Order IDs and payment data are validated before processing
* Payment details are sanitized before being stored

For additional security recommendations, see the **Best Practices** section in the JavaScript SDK docs.

***

## Support & Next Steps

If you encounter issues:

* **WooCommerce / WordPress integration**: Contact your internal development team
* **Tender SDK behavior**: Refer to the **JavaScript SDK** docs or Tender support

You can continue exploring:

<CardGroup cols={2}>
  <Card title="JavaScript SDK" icon="js" href="/sdk/javascript">
    Learn more about the underlying Tender React SDK.
  </Card>

  <Card title="API Reference" icon="book" href="/api-reference/introduction">
    Explore the full Tender API.
  </Card>
</CardGroup>
