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

# WooCommerce

> Accept stablecoin payments in your WooCommerce store. Orders are marked paid automatically.

The CreptaPay plugin adds a **Pay with stablecoins** option to your WooCommerce checkout. The customer pays with USDC or USDT on the secure CreptaPay checkout page, then returns to your order confirmation page. The order is marked paid as soon as CreptaPay confirms the payment.

## Requirements

* WordPress 6.0 or later, with WooCommerce
* PHP 7.4 or later
* Your site on **https**, so CreptaPay can send payment updates to it
* A store currency CreptaPay supports: **USD**, **EUR** or **NGN**

## Set up

<Steps>
  <Step title="Install the plugin">
    Download the latest release `.zip` from [GitHub](https://github.com/CreptapayHq/creptapay-woocommerce/releases).

    In WordPress, go to **Plugins → Add New → Upload Plugin**, choose the `.zip`, and click **Install Now**. Then click **Activate**.
  </Step>

  <Step title="Get your API keys">
    In the CreptaPay dashboard, open **Developer → API keys**. Copy your **test** public key (`pk_test_…`) and secret key (`sk_test_…`). The secret key is shown in full only once, when you generate it.
  </Step>

  <Step title="Add your keys to WooCommerce">
    Go to **WooCommerce → Settings → Payments → CreptaPay**.

    1. Tick **Enable CreptaPay**.
    2. Leave **Sandbox mode** ticked.
    3. Paste your test keys under **Sandbox keys**.
    4. Click **Save changes**.

    Saving registers your store's webhook with CreptaPay automatically. The table at the top of the page shows whether it worked.
  </Step>

  <Step title="Place a test order">
    Add a product to your cart and check out with **Pay with stablecoins**. Pay on the sandbox checkout with test funds. When the payment confirms, the order moves to **Processing** (or **Completed** for virtual and downloadable products).
  </Step>

  <Step title="Go live">
    Complete business verification (KYB) in the CreptaPay dashboard. Then paste your **live** keys (`pk_live_…`, `sk_live_…`), untick **Sandbox mode**, and save.
  </Step>
</Steps>

## Order statuses

| What happened | Order status |
| - | - |
| Paid in full (or overpaid) | **Processing**, or **Completed** for virtual and downloadable orders |
| Customer sent less than the amount due | **On hold**, with a note of how much arrived |
| Payment window ended without full payment | **Failed**, so the customer can try again |

The plugin re-checks every payment with CreptaPay before it completes an order, including the amount and currency. Every update from CreptaPay is verified with your secret key.

## Settings

| Setting | What it does |
| - | - |
| **Title** and **Description** | What customers see for this payment method at checkout. |
| **Sandbox mode** | Ticked: uses your sandbox keys, no real money. Unticked: live. |
| **Sandbox keys** / **Live keys** | Your public and secret keys for each environment. |
| **Webhook** | The address CreptaPay sends updates to. It's registered for you when you save. |
| **API URL** | Leave as it is unless CreptaPay support asks you to change it. |
| **Debug log** | Logs plugin activity to **WooCommerce → Status → Logs** (source: `creptapay`). Turn it on when troubleshooting. |

## Troubleshooting

<AccordionGroup>
  <Accordion title="The webhook shows as not reachable">
    Make sure your site is public and uses https. Check that no security plugin or firewall blocks POST requests to `/wc-api/creptapay/`. Then save the settings again to re-check.
  </Accordion>

  <Accordion title="CreptaPay doesn't appear at checkout">
    Check that **Enable CreptaPay** is ticked and your keys for the current mode are saved. Your store currency must be USD, EUR or NGN (**WooCommerce → Settings → General → Currency**).
  </Accordion>

  <Accordion title="I'm testing on a local site">
    CreptaPay can't reach a local site, so updates won't arrive. Orders are still checked when the customer returns to the thank-you page. To test webhooks locally, expose your site with a tunnel such as ngrok.
  </Accordion>

  <Accordion title="An order is paid in CreptaPay but still pending in WooCommerce">
    In the CreptaPay dashboard, open **Developer → Logs** and resend the delivery for that payment. Turn on **Debug log** in the plugin settings to see what happened.
  </Accordion>
</AccordionGroup>


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