# Nexi Checkout

https://docs.wisecp.com/en/nexi-checkout-module

Collect card payments on the Nexi Checkout payment page and charge renewal invoices automatically with a card your client saved there.

## Reaching the Screen

Go to **Settings → Financial → Payment Gateways**, open **All Modules** and click the Nexi Checkout card: `{admin}/modules/payment?module=NexiCheckout`

Tick **Status** and save to list the method on the payment step as **Credit or Debit Card (Nexi)**. Use [Payment Gateways](https://docs.wisecp.com/en/payment-modules) to order the methods clients see.

## What Is on the Screen

The card holds your Nexi secret keys, the environment switch, the terms address, the charge setting and the shared gateway settings.

On the payment step the client clicks **Continue to Nexi Checkout** and pays on Nexi's page. Nexi confirms the payment and the client returns to the site.

A signed-in client can save the card during payment, and renewal invoices can then be charged to it. The module does not start subscriptions.

## Before You Configure It

- A Nexi Checkout account, formerly Nets Easy, with a test and a live integration. Each integration has its own secret key.
- A currency activated on your Nexi account: DKK, EUR, GBP, NOK, SEK, USD, PLN, CHF or CZK. For any other currency, use **Converting Currency**.
- A site served over HTTPS, so Nexi can send payment notifications.

## Fields

- **Status**: Turns the module on. While it is off the other fields stay locked and clients are never offered the method.
- **Test Mode**: Sends requests to Nexi's test environment. On by default.
- **Test Secret Key**: The secret key of your test integration, used while Test Mode is ticked.
- **Live Secret Key**: The secret key of your live integration, used while Test Mode is unticked. Without the key of the environment in use, the payment step says the method is not configured.
- **Terms and Conditions URL**: The page with your terms, shown on Nexi's payment page. Left empty, the site's home address is sent.
- **Charge Automatically**: On by default: the amount is captured as soon as the client authorizes it. When off, the amount is only reserved and the invoice waits until you capture it in the Nexi portal.

For commission, currency conversion, amount and country limits, see [Payment Configuration](https://docs.wisecp.com/en/payment-modules). **Callback URL**, **Success URL** and **Failed URL** cannot be edited. Each payment registers its notification address with Nexi, so there is nothing to add in the portal.

## Tasks

### Connect your Nexi account

1. In the Nexi portal, copy the secret key of your test integration.
2. Open the Nexi Checkout card under **All Modules** and tick **Status**.
3. Paste the key into **Test Secret Key**, keep **Test Mode** ticked and enter your **Terms and Conditions URL**.
4. Click **Save Changes**. The method now appears on the payment step.

### Run a test payment

1. Place a small order as a client and choose **Credit or Debit Card (Nexi)** on the payment step.
2. Click **Continue to Nexi Checkout** and pay with a Nexi test card.
3. Return to the site. Once Nexi confirms the charge, the invoice is marked as paid.

### Switch to live

1. Copy the secret key of your live integration into **Live Secret Key**.
2. Untick **Test Mode** and save.
3. Repeat the test with a real low-value payment.

### Offer saved cards and automatic payment

1. A signed-in client ticks **Save this card for future payments** on the payment step, then pays on Nexi's page.
2. The card is listed under **Saved Cards** in the client's account.
3. The client selects **Turn On Auto-Pay** from the card menu. Renewal invoices are then charged to the card without the client.

To let clients add a card from their account, open [Payment Gateways](https://docs.wisecp.com/en/payment-modules) → **Initial → Card Storage Module**, select Nexi Checkout and save. The client approves a one-unit verification on Nexi's page, which is reserved and never captured.

A saved Nexi card is charged only by automatic payment. When the client pays an invoice themselves, they pay on Nexi's page again.

### Refund a payment

1. Open the invoice from [Invoice Detail](https://docs.wisecp.com/en/invoice-detail-overview).
2. Under **Summary → Change Status**, select **Refunded** and **Refund via payment gateway**. Click **Update Status**.
3. Nexi refunds what is still open on the charge, and the invoice is marked as refunded.

## Things to Watch

> **A combined payment is refunded per invoice**
> 
> When one Nexi charge paid several invoices, only the refunded invoice's share goes back, as a single refund line. Repeating the same invoice's refund does not send it twice. If the share cannot be worked out, nothing is sent and the panel says so. This happens, for example, when the payment holds several charges. Refund it in the Nexi portal instead, then mark the invoice **Refunded** with **Add as expense**. Version 5.0-beta.4 and earlier refund the whole charge.

> **A reserved payment has nothing to refund**
> 
> With **Charge Automatically** off, a payment you have not captured holds no charge, so a refund through the gateway fails. Capture it in the Nexi portal first, or cancel the reservation there.

> **Notifications need HTTPS**
> 
> On a site without HTTPS, Nexi sends no notifications. A payment is then confirmed only when the client returns to the site.

## Required Privileges

Settings require **Payment Gateways** (`MODULES_PAYMENT_SETTINGS`). Invoice changes require **Billing → Edit** (`INVOICES_OPERATION`).

## Related Articles

- [Payment Configuration](https://docs.wisecp.com/en/payment-modules)
- [Invoice Detail](https://docs.wisecp.com/en/invoice-detail-overview)
- [Subscriptions](https://docs.wisecp.com/en/subscriptions)
