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

# WooCommerce

> Accept bank transfer and card payments using Fintoc's plugin in your WooCommerce store.

Set up Fintoc in your WooCommerce store to accept account-to-account **bank transfer** and **card** payments in **Chile (CLP)** and **Mexico (MXN)** through Fintoc's hosted Checkout Session.

The customer places an order, and Fintoc redirects the customer to authorize the payment. After the customer returns to your store, the plugin confirms the order in the background through webhooks and verifies every event against the Fintoc API. The API is the source of truth for the payment status.

## Prerequisites

Before you start, you need:

* A Fintoc account with API credentials (secret key). You can find your keys in the [Fintoc Dashboard](https://dashboard.fintoc.com/login).
* Admin access to your WordPress site.
* WordPress 6.2+, WooCommerce 7.4+, and PHP 7.4+.

## Get your API credentials

### 1. Sign up

Head to the [Fintoc Dashboard](https://dashboard.fintoc.com/login) and sign up. To start receiving payments in `live` mode, [fill out your information](https://tally.so/r/mKLrWz) so Fintoc can activate your account and provide the credentials you need.

### 2. Obtain API keys

Your Fintoc dashboard shows both `test` and `live` secret keys. To get them, go to **For Developers → API Keys**. Use the button on the top left of the dashboard to switch between `test` and `live` mode. **Use your `live` secret key (`sk_live_...`) to set up Fintoc in production.**

## Install the plugin

Download the latest plugin package from the [Fintoc for WooCommerce page](https://woocommerce.fintoc.com/), then install it:

1. Upload the `fintoc-for-woocommerce` folder to `/wp-content/plugins/`, or install the ZIP from **Plugins → Add New → Upload Plugin**.
2. Activate the plugin through the **Plugins** menu in WordPress.

The plugin is compatible with High-Performance Order Storage (HPOS) and works with both the classic checkout shortcode and the new Blocks (Store API) checkout.

## Configure the plugin

1. Go to **WooCommerce → Settings → Payments → Fintoc**.
2. In the settings screen, configure:
   * **Enable Fintoc**: the toggle that turns the gateway on.
   * **Title**: the payment method name shown to customers at checkout (e.g. `Fintoc`).
   * **Description**: the text shown under the payment method at checkout.
   * **Test mode**: the toggle that uses your test keys; leave it off to take live payments.
   * **Live secret key**: your `sk_live_...` key from the dashboard.
   * **Test secret key**: your `sk_test_...` key, needed only while test mode is enabled.
   * **Debug log**: the toggle that logs API requests and webhook events under **WooCommerce → Status → Logs** (source `fintoc`).
3. Save changes.

The gateway hides itself automatically when the store currency is anything other than CLP or MXN. The **Payment methods** panel on the settings screen shows which methods (bank transfers, cards) your Fintoc organization has enabled. Fintoc manages method enablement per organization; it is not self-serve.

### Webhook setup

Webhooks are how Fintoc confirms payments, so this step is required.

1. On the Fintoc settings screen in WooCommerce, copy the **Webhook endpoint** URL shown there.
2. In your [Fintoc Dashboard](https://dashboard.fintoc.com/login), create a new webhook endpoint with that URL and method `POST`.
3. Subscribe the endpoint to the `payment_intent.*`, `checkout_session.*`, and `refund.*` events so the plugin can confirm or revert refund outcomes.

No webhook secret is needed. The plugin verifies every event by fetching the payment state directly from the Fintoc API before updating an order, so the webhook payload is only used to locate the order.

## Manage refunds

You can issue full and partial refunds directly from the WooCommerce order screen. Open the order, click **Refund**, enter the amount, and submit. The plugin sends the request to the Fintoc Refunds API and reconciles the outcome through the `refund.*` webhook events.

Refund confirmation times vary by country. For bank transfers, Fintoc may retry for up to 7 days when there is insufficient balance, so a refund can stay pending until it confirms.

<Warning>
  You can **issue** refunds directly from WooCommerce, but plugin dashboards **cannot cancel those refunds**. To cancel a refund issued from WooCommerce, use the [Cancel Refunds](/reference/payments-api/refunds/refunds-cancel) endpoint or contact support. WooCommerce does not show the cancellation.
</Warning>

## Test the integration

1. Enable **Test mode** on the settings screen and paste your test secret key (`sk_test_...`).
2. Place a test order with each enabled payment method and complete the authorization in Fintoc's sandbox. A successful payment moves the order to **Processing** and records the matching `payment_intent.*` and `checkout_session.*` webhook events. For test credentials and sandbox details, see [Test your integration](/docs/payments/payment-initiation-test-your-integration).
3. Enable **Debug log** and watch **WooCommerce → Status → Logs** (source `fintoc`) to inspect API requests and webhook events.

## Go live

1. Once you are satisfied with testing, disable **Test mode** so the gateway uses your live secret key.
2. Place one live order with each enabled payment method to confirm the full end-to-end flow.

Your WooCommerce store now accepts payments through Fintoc.

## Troubleshooting

Common issues and their fixes:

| Issue                           | Cause                                                        | Solution                                                                           |
| :------------------------------ | :----------------------------------------------------------- | :--------------------------------------------------------------------------------- |
| Fintoc not showing at checkout  | Store currency is not CLP or MXN, or the gateway is disabled | Verify the store currency and that the gateway is enabled                          |
| Orders not confirming           | Webhook endpoint not registered or unreachable               | Register the endpoint and subscribe to `payment_intent.*` and `checkout_session.*` |
| Refunds never confirm or revert | `refund.*` events not subscribed                             | Subscribe the webhook endpoint to `refund.*`                                       |
| Cross-mode refund error         | Order paid in test, gateway in live (or vice versa)          | Match the gateway mode to the mode the order was paid in                           |

## FAQs

**Q: Which currencies are supported?**

A: Chilean Pesos (CLP) and Mexican Pesos (MXN). The gateway hides itself automatically when the store currency is anything else.

**Q: Do I need a webhook secret?**

A: No. The plugin verifies every event by fetching the payment state directly from the Fintoc API before updating an order. You do not configure a webhook secret in the plugin or in the dashboard.

**Q: Is the Blocks checkout supported?**

A: Yes. Both the classic shortcode checkout and the Blocks (Store API) checkout are supported.
