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

> ## Agent Instructions
> The CoinStack API base URL is https://coinstack.net/api/v1. Authenticate with an API key sent as 'Authorization: Bearer sk_...' from a server, never from a browser. Every response is a JSON object with 'success' and 'response'. Amounts are strings; token amounts on quotes and payments are in the token's smallest unit. Fulfil an order when its checkout status is 'completed', not when the customer returns to success_url. Verify the CoinStack-Signature header on every webhook using the raw request body. The OpenAPI file is at https://docs.coinstack.net/openapi.json.

# WooCommerce

> Accept crypto payments in your WooCommerce store.

CoinStack for WooCommerce adds crypto as a payment method at checkout. Customers pay on the CoinStack checkout page, and the order is marked paid once the payment completes, so it moves to Processing as it does with any other payment method.

It works with both the block checkout and the classic checkout.

## Requirements

* WordPress 6.5 or newer
* WooCommerce 8.3 or newer
* PHP 7.4 or newer
* A site address that starts with `https://`

## Install

**1. Create an API key**

In the [CoinStack dashboard](https://coinstack.net/dashboard), open **Developers** and create an API key with **Read and write** access.

**2. Install the plugin**

In WordPress, go to **Plugins > Add New Plugin**, search for **CoinStack for WooCommerce**, then select **Install Now** and **Activate**. The plugin is also on [WordPress.org](https://wordpress.org/plugins/coinstack-for-woocommerce/).

To install it by hand, [download the zip](https://coinstack.net/downloads/coinstack-woocommerce.zip) and upload it under **Plugins > Add New Plugin > Upload Plugin**.

**3. Enable it**

Go to **WooCommerce > Settings > Payments > CoinStack**, tick **Enable CoinStack**, paste the API key and save.

The settings page shows **Connected** once CoinStack is set up. The plugin registers its own webhook, so there are no URLs or secrets to copy.

You can change the name and description customers see at checkout on the same settings page.

## How it works

* When a customer places an order with CoinStack, the plugin creates a checkout for the order total and sends the customer to it.
* When the checkout is completed, the order is marked paid and moves to Processing.
* While a payment is confirming, the order is put on hold with a note.
* When an unpaid order is cancelled, the plugin closes its checkout.

Every payment update is added to the order as a note.

### Currencies

CoinStack accepts stores in [146 currencies](https://docs.coinstack.net/reference/currencies.md). If your store uses a currency CoinStack does not accept, CoinStack is not shown at checkout.

### Partial payments

If a customer pays less than the order total, the order is put on hold with a note while the customer pays the rest. If the checkout expires before they do, [mark it as resolved](https://docs.coinstack.net/guides/underpayments.md#resolving-an-underpaid-checkout) in your CoinStack dashboard to mark the order paid, or refund the customer.

### Refunds

Refunds are sent from your own wallet, not from WooCommerce.

## Troubleshooting

If orders are not being marked paid:

* Your site address, under **Settings > General**, must start with `https://` and have a valid certificate.
* Your firewall or security plugin must allow `POST` requests from outside to `/wc-api/coinstack/`.

Errors are recorded under **WooCommerce > Status > Logs**, with the source `coinstack`.

## Data sent to CoinStack

The plugin connects to the CoinStack API at `https://coinstack.net/api/v1`.

* When a customer places an order with CoinStack, it sends the order total, currency, order number, the customer's email address, links back to your store, the order ID, the customer ID and your site's domain.
* When you save the settings, and every few minutes after that, it checks that CoinStack knows where to send payment updates for your store.
* When CoinStack sends a payment update, when a customer returns from the checkout, and every few minutes for recent unpaid orders, it looks up the checkout's status.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.