<!-- canonical: https://docs.costplus.io/docs/plugins/nopcommerce -->

> Integrate Cost+ with your nopCommerce store using the official payment plugin
<div style={{background: 'white', borderRadius: '8px', padding: '1rem', display: 'inline-block', marginBottom: '1rem'}}>
  <img src="/images/logos/nopcommerce.png" alt="nopCommerce" style={{height: '48px', width: 'auto'}} />
</div>

Integrate Cost+ as a payment method in your nopCommerce store. The official **NoPayn Payment Gateway** plugin supports multiple payment methods with direct redirect to the selected payment method — fully PCI DSS compliant.

## Prerequisites

- Active Cost+ merchant account
- nopCommerce 4.90 or later
- .NET 9
- Admin access to your nopCommerce admin panel
- Access to the nopCommerce source code (for plugin installation)

## Supported Payment Methods

| Checkout Display Name | NoPayn Identifier |
|---|---|
| Credit / Debit Card | `credit-card` |
| Apple Pay | `apple-pay` |
| Google Pay | `google-pay` |
| Vipps MobilePay | `vipps-mobilepay` |

## 1. Install the Plugin

Copy the plugin folder into your nopCommerce source directory:

```
src/Plugins/Nop.Plugin.Payments.NoPayn/
```

Add the project to your solution and build:

```bash
dotnet sln add src/Plugins/Nop.Plugin.Payments.NoPayn/Nop.Plugin.Payments.NoPayn.csproj
dotnet build
```

In the nopCommerce admin panel:

1. Go to **Configuration → Local plugins**
2. Find **NoPayn Payment Gateway** and click **Install**
3. Go to **Configuration → Payment methods**
4. Activate **NoPayn Payment Gateway**
5. Click **Configure** to open the settings

## 2. Configure the Plugin

Log into the [Merchant Portal](https://dashboard.costplus.io/) and navigate to **Websites**, then click on the website you want to connect. Click on **Integration** where you will find your API key.

![Cost+ Merchant Portal showing API key](/images/plugins/shared/merchant-portal-api-key.png)

In the plugin configuration, enter your **API Key** and toggle the payment methods you want to offer:

| Setting | Description |
|---|---|
| API Key | Your NoPayn API key |
| Enable Credit / Debit Card | Toggle credit/debit card payments |
| Enable Apple Pay | Toggle Apple Pay payments |
| Enable Google Pay | Toggle Google Pay payments |
| Enable Vipps MobilePay | Toggle Vipps MobilePay payments |

> [!WARNING]
> Only activate the payment methods you have been approved for and received confirmation for.

## 3. Payment Flow

1. Customer selects **NoPayn Payment Gateway** at checkout
2. A sub-method selection appears (Credit Card, Apple Pay, etc.)
3. Customer picks a method and confirms the order
4. Order is created with **Pending** payment status
5. Customer is redirected directly to the selected payment method on the NoPayn payment page
6. After payment:
   - **Success** — order marked as **Paid / Processing**
   - **Cancelled / Failed / Expired** — order set to **Cancelled**
7. NoPayn sends a webhook for asynchronous status confirmation

> [!TIP]
> Transactions expire after 5 minutes. If a customer does not complete payment within this window, the order is automatically cancelled via webhook.

## 4. Order Status Mapping

| NoPayn Status | nopCommerce Payment Status | nopCommerce Order Status |
|---|---|---|
| `new` | Pending | Pending |
| `processing` | Pending | Pending |
| `completed` | Paid | Processing |
| `cancelled` | Voided | Cancelled |
| `expired` | Voided | Cancelled |
| `error` | Voided | Cancelled |

## 5. Webhooks

The plugin registers a webhook endpoint at `/NoPayn/Webhook`. NoPayn sends POST data containing the order identifier on status changes. The plugin verifies the current status via API call before updating the order.

> [!NOTE]
> No manual webhook configuration is required — the plugin handles registration automatically.

## 6. Test and Launch

Place a few test transactions to ensure everything works smoothly. We recommend testing both successful and failed payments to confirm all scenarios are handled correctly.

## Support

Need help? Reach out to our support team at **support@costplus.io**.
