# PrestaShop

> The Intents Checkout payment module for PrestaShop 8 and 9, set up in test mode first.

**[Download Intents Checkout for PrestaShop](https://intents.fi/integrations/prestashop/download)** (always the latest version)

| Build | File | Released | Tested on | SHA-256 |
|---|---|---|---|---|
| PrestaShop 1.0.0 | [`intentsfi-prestashop-1.0.0.zip`](https://intents.fi/integrations/prestashop/download/intentsfi-prestashop-1.0.0.zip) | 2026-11-26 | PrestaShop 8.1–9.0, PHP 7.2–8.4 | `b302f4830566e95108b7d87c08b378ad424ef88ff78c1fdaf2c7c8f9aa9751a8` |

Each versioned file never changes once published, so its link and checksum are safe to pin.

1. Download the zip above and upload it under **Modules → Module Manager → Upload a
   module**. The module is called **Intents Checkout**.
2. Open the module's **Configure** page and press **Connect intents.fi**.
3. Sign in to (or sign up for) [the dashboard](https://dashboard.intents.fi) and approve the
   connection. You come back to the Configure page connected in **test mode**, with your keys and
   payment notifications set up. Nothing to copy. See [Plugin Connect](/docs/checkout/connect).
4. Place an order with **Pay with crypto**. The hosted page shows a **Complete the test payment**
   button for a test invoice; press it, and the order moves to **Payment accepted** when the
   webhook says the invoice is paid.
5. When your account is ready for real payments (a verified email and a payout wallet), press
   **Go live**. The shop switches to live mode only when that round trip finishes.

Connect needs the back office and the shop on the same `https://` address. If it can't be used,
enter the keys manually instead:

1. In the dashboard, check your [settlement](/docs/checkout/settlement) asset and address, and copy
   your **test** API key (`ik_test_…`).
2. On the Configure page, copy the **Webhook URL** it shows.
3. Add that URL as a webhook endpoint for the same key, subscribed to the `invoice.*` events,
   either on the dashboard's **Webhooks** page or with the API, and note the `whsec_…` secret it
   returns:



```bash title="curl"
curl https://api.intents.fi/v0/webhooks \
  -X POST \
  -H 'authorization: Bearer $INTENTS_SECRET_KEY' \
  -H 'content-type: application/json' \
  -d '{
       "url": "https://northwood.example/hooks/intents"
     }'
```

```ts title="TypeScript"
const response = await fetch("https://api.intents.fi/v0/webhooks", {
  method: "POST",
  headers: {
    authorization: `Bearer ${process.env.INTENTS_SECRET_KEY}`,
    "content-type": "application/json",
  },
  body: JSON.stringify({
    "url": "https://northwood.example/hooks/intents"
  }),
});

if (!response.ok) {
  const { error } = await response.json();
  throw new Error(`${error.code}: ${error.message}`);
}
const data = await response.json();
```

```python title="Python"
import os
import httpx

response = httpx.post(
    "https://api.intents.fi/v0/webhooks",
    headers={"authorization": f"Bearer {os.environ['INTENTS_SECRET_KEY']}"},
    json={
        "url": "https://northwood.example/hooks/intents"
    },
)
response.raise_for_status()
data = response.json()
```



4. Paste the key into **API key** and the secret into **Webhook secret**, press **Save**, then press
   **Test connection**: it shows the merchant, the mode and the settlement address the key belongs to.

The module needs PrestaShop 8.1 to 9.0 and PHP 7.2 or later. It has no
dependencies and adds no overrides.

**The cart currency must be USD.** Invoices are priced in USD and the module never converts, so
**Pay with crypto** is only offered to a customer shopping in USD. The Configure page says why the
method may be hidden: no USD currency in the shop, a default currency other than USD (the method is
then offered only to customers who switch to USD), or USD unticked under **Payment → Preferences →
Currency restrictions**. The method is also hidden until both the API key and the webhook secret
are saved, because without the secret no order could ever be marked paid.

## How a payment runs

1. The customer chooses **Pay with crypto**. The module places the order as **Awaiting crypto
   payment**, creates an invoice for the order total with `reference` set to the PrestaShop order
   reference plus a short tag for your shop (`XKBKNABJK-1a2b3c4d`), and sends the customer to the
   hosted payment page. The tag keeps two shops on one key from ever sharing a reference, and an
   invoice whose metadata names another order is never used.
2. The customer pays there; the module has no checkout UI of its own.
3. intents.fi sends signed `invoice.*` webhooks to `/module/intentsfi/webhook`, and the module
   updates the order.

`reference` is the API's idempotency key, so a retried payment lands on the same invoice. A
customer who left before paying finds a **Complete your payment** link on the order confirmation
and order detail pages. If the order total changed in the back office, or its invoice expired or
was cancelled, that link creates a new invoice (`XKBKNABJK-1a2b3c4d-r2`, then `-r3`) and the old one is
cancelled through the API. A payment that still lands on a replaced invoice puts the order **on
hold** and flags it for review. The customer coming back to the shop never marks an order paid.
Only the webhook does.

A cart that PrestaShop splits into several orders (several carriers) gives them one reference, one
invoice for their combined total, and one payment.

## What each event does

| Event | Order |
|---|---|
| `invoice.paid` | **Payment accepted**, with the invoice ID as the payment's transaction ID |
| `invoice.paid` for an amount the order no longer comes to | **Crypto payment on hold**, flagged for review |
| `invoice.paid` on a replaced invoice | **Crypto payment on hold**, flagged for review |
| `invoice.underpaid` | **Crypto payment on hold**; the customer can pay the rest from the same page |
| `invoice.expired`, `invoice.canceled` | **Canceled**, if nothing was paid |
| `invoice.processing` | a private message |
| `invoice.needs_review` | a private message, flagged for review |

Every event that is acted on adds a private message to the order, which the customer never sees. Flagged orders are
listed on the Configure page and marked on the order page until you press **Mark as checked**.

Deliveries can repeat and arrive out of order. The module records each event ID once, so a
redelivery is a no-op, and it ranks events, so a late `invoice.expired` after `invoice.paid`
changes nothing while a late `invoice.paid` still pays a cancelled order. An order on hold because
money arrived is never cancelled by a later expiry: a person decides.

## Settings

| Setting | Notes |
|---|---|
| API key | `ik_test_…` or `ik_live_…`. The prefix sets the mode: test keys move no funds. Never shown again once saved |
| Webhook secret | the `whsec_…` returned when the webhook URL was registered for that key |
| Webhook URL | read-only: `https://<your shop>/module/intentsfi/webhook` |
| **Test connection** | checks the saved key and reports the merchant, mode and settlement address |
| **Connect intents.fi** / **Go live** / **Disconnect** | the Connect round trip for test and live keys, and revoking them |

One key and one secret are active at a time. Connect fills them in; entered manually, the secret
must belong to the endpoint registered on that key. Switching from test to live replaces both.
After **Go live** the module still accepts webhooks signed for its test connection, so a test
payment already in flight is still recorded. **Disconnect** revokes the keys Connect made (test and
live) on intents.fi and removes them from the shop; a key you entered manually is left alone.
Uninstalling the module revokes Connect's keys too.

## Going live

1. Press **Go live** on the Configure page. intents.fi checks your account has a verified email and
   a payout wallet, and says what is missing if not. Entering keys manually instead: register the
   webhook URL on the **live** key, then paste the live key and its webhook secret, and save.
2. Place a real $5 order from a phone, on the network your customers use, and check it reaches
   **Payment accepted** and the money reaches your address.

## Uninstalling

Uninstalling revokes the keys Connect made and deletes the module's settings and its table linking
orders to payments. Paid orders are not affected. The two order states are handled as follows:
- A state that no order has ever been in, **Awaiting crypto payment** or **Crypto payment on
  hold**, is deleted.
- A state that orders use is kept but hidden, so those orders keep their history. Reinstalling the
  module brings the same state back.

## Troubleshooting

- **Orders stay Awaiting crypto payment.** The webhook is not arriving or not verifying. Check the
  secret belongs to the key you saved, and that the shop is reachable over `https` from the
  internet: intents.fi delivers only to public `https` URLs. A delivery whose signature does not
  verify gets a `401` and is retried. **Advanced Parameters → Logs**, filtered on `intentsfi`,
  shows each delivery.
- **"Test connection" fails with `UNAUTHORIZED`.** The key is wrong, or it is a publishable `pk_`
  key. The module needs a secret `ik_` key.
- **The payment method does not show at checkout.** See the currency notes above, and check both
  the key and the secret are saved.
- **Maintenance mode** does not block webhooks: payments still land while the shop is closed.

Support is by email only: [support@intents.fi](mailto:support@intents.fi).

---

Source: https://intents.fi/docs/checkout/prestashop · The whole corpus: https://intents.fi/docs/llms-full.txt
