4. Enter the API Key in the platforms

4. Enter the API Key in the platforms

Each store connects to leaforder.com through the official plugin for its platform. In every plugin you must set three things:

  1. Middleware Base URL — the address of leaforder.com (e.g. https://app.leaforder.com).
  2. API Key — the key that authenticates data exchange between the store and leaforder.com. The same value must be entered both in the plugin and in the connection in ABP.
  3. Webhook Secret — a shared secret that signs the product-change webhooks (HMAC-SHA256). It must match on both sides.

General rule: the API Key and Webhook Secret must be identical in the store plugin and in the ABP connection. Only where you generate the key changes, depending on the platform (see below).


4.1 WooCommerce

Where: WordPress menu Order PDF → Order PDF Settings.

  1. Install and activate WooCommerce (6.0+) and the order-pdf-for-woocommerce plugin.
  2. In WooCommerce, generate the API credentials: WooCommerce → Settings → Advanced → REST API and create a new key with the minimum required permissions, i.e. Read only. You get a Consumer Key and a Consumer Secret.
  3. Open Order PDF → Order PDF Settings and fill in:
    • Middleware Base URL → https://app.leaforder.com
    • WooCommerce Consumer Key
    • WooCommerce Consumer Secret
    • Webhook Secret (the same value set in ABP)
    • tick Enable
  4. Save: the plugin automatically registers the webhooks towards leaforder.com.

Mapping in ABP: in the ABP connection, the Consumer Key goes in the API Username field and the Consumer Secret in the API Key field.


4.2 Magento 2

Where: Stores → Configuration → Weblink → Order PDF Connector → Middleware Connection.

  1. Install and enable the Weblink_OrderPdfConnector module.
  2. In Magento create an Integration access token: System → Extensions → Integrations. This token (the Consumer Key) is your API Key.
  3. Go to Stores → Configuration → Weblink → Order PDF Connector and fill in:
    • Enable → Yes
    • Middleware Base URL → https://app.leaforder.com
    • API Key → the token of the Integration you just created
    • Webhook Secret → the same value set in ABP
  4. Save the configuration.
  5. Go to Stores → Configuration → Services → OAuth and make sure the option Allow OAuth Access Tokens to be used as standalone Bearer tokens is set to Yes.

Note: the Magento API Key is a single token (used as a Bearer token): no “API Username” is needed. So in the ABP connection the API Username field stays hidden.


4.3 NopCommerce

Where: nopCommerce admin panel → PdfOrder plugin → Configure.

  1. Install the Nop.Plugin.Misc.PdfOrder plugin and open the Configure page.
  2. With NopCommerce the key is generated in ABP: in the ABP connection (NopCommerce type) press Generate to create the API Key, then copy it.
  3. On the plugin’s Configure page fill in:
    • API Key → paste the key generated in ABP (minimum 10 characters)
    • Base URL → https://app.leaforder.com
    • tick Enable Sync
  4. Save.

Security: the NopCommerce plugin does not store the key in plain text: it keeps only an encrypted version (hash) and the last 4 characters. Unlike the other platforms, the NopCommerce configuration has no dedicated Webhook Secret field.


4.4 PrestaShop

Where: Modules → Order PDF Connector → Configure.

  1. Install the orderpdfconnector module.
  2. In PrestaShop enable the Webservice: Advanced Parameters → Webservice, turn it on and create a new key. This Webservice key is your API Key. Give it the minimum required permissions, i.e. read-only access to products.
  3. Go to Modules → Order PDF Connector → Configure and fill in:
    • Middleware Base URL → https://app.leaforder.com
    • API Key → the Webservice key
    • Webhook Secret → the same value set in ABP
    • Enable
  4. Save.

Note: in PrestaShop, PDF catalogs are managed from the leaforder.com panel (there is no catalog list in the PrestaShop admin). The storefront widget covers the main product page.


4.5 Summary by platform

PlatformWhere to enter the keyWhat the “API Key” isWhere it is generatedWebhook Secret
WooCommerceWP admin → Order PDFREST Consumer Key + Consumer SecretIn WooCommerce (Settings → Advanced → REST API)Yes
MagentoStores → Configuration → Weblink → Order PDF ConnectorIntegration access token (Bearer)In Magento (System → Extensions → Integrations)Yes
NopCommerceAdmin → PdfOrder plugin → ConfigureOpaque key (≥10 characters)In ABP (Generate button)—
PrestaShopModules → Order PDF Connector → ConfigureWebservice keyIn PrestaShop (Advanced Parameters → Webservice)Yes

←