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

# Magento 2

> Install and configure the Novac payment gateway module for your Magento 2 store.

## Overview

The Novac Payment module is the official Magento 2 integration for Novac merchants. It adds Novac as a payment method at checkout, provides an admin configuration panel for managing API credentials, and includes webhook handlers that automatically update order statuses when payment notifications arrive from Novac.

***

### Prerequisites

<Accordion title="See details" defaultOpen={true}>
  Before you begin, ensure your environment meets the following requirements:

  * **Magento 2.4+** (or a compatible 2.x release) with PHP and Composer support
  * Access to the **Magento CLI** (`bin/magento`) with permissions to install and enable modules
  * A Novac account with API keys from your [Novac Dashboard](https://dashboard.novacpayment.com)
</Accordion>

***

## Installation

There are two ways to install the module, manually by copying the module files, or via Composer if you have it packaged.

### Manual Installation

<Steps>
  <Step title="Copy the Module">
    Copy the module directory into your Magento installation. The [repository](https://github.com/novaccto/novac-magento) is already structured as the module root, so copy it directly to
    app/code/Novac/Payment
  </Step>

  <Step title="Enable and Upgrade">
    From your Magento project root, run the following commands in sequence. These enable the module, apply any database schema changes, compile dependency injection, and clear the cache:

    ```bash theme={null}
        php bin/magento module:enable Novac_Payment
        php bin/magento setup:upgrade
        php bin/magento setup:di:compile
        php bin/magento cache:flush
    ```
  </Step>

  <Step title="Deploy Static Content (Production Only)">
    If your store is running in production mode or you deploy static content separately, also run:

    ```bash theme={null}
        php bin/magento setup:static-content:deploy
    ```
  </Step>
</Steps>

### Composer Installation

This [repository](https://github.com/novaccto/novac-magento) does not include a `composer.json` package by default. To install via Composer, you can either package the module and publish it to your VCS or a private repository, or submit it to Packagist and require it using Composer as you would any other Magento package.

***

## Configuration

Once the module is installed, configure it from the Magento Admin panel:

**Admin > Stores > Configuration > Sales > Payment Methods > Novac**

| Setting                | Description                                                                         |
| ---------------------- | ----------------------------------------------------------------------------------- |
| `Enable Novac Payment` | Enable or disable the Novac payment method at checkout                              |
| `Title`                | The label shown to customers on the checkout page                                   |
| `API Secret Key`       | Your secret API key, used to sign and authenticate requests                         |
| `API Public Key`       | Your public API key used as an identifier                                           |
| `Sort Order`           | Controls where Novac appears relative to other payment methods                      |
| `Webhook URL`          | Read-only field displaying the webhook endpoint to register in your Novac dashboard |
