Last updated

Nexi Checkout Adapter

Overview Document: Payment Adapters Overview

Overview and Unique Capabilities

The Nexi Checkout Adapter integrates Nexi Group's payment platform (Nexi Paygate v2) with Norce Checkout. This page focuses on the unique technical details and configuration for Nexi.

The adapter uses Nexi's Hosted Forms integration (Nexi's integrationType=HOSTED): your storefront renders its own payment-method selector, and once the customer picks a method you create a Nexi payment for that specific method. The adapter returns a redirectUrl to Nexi's hosted form, where the customer enters their sensitive payment details. The customer is then redirected back to your storefront, and Nexi confirms the final payment state to the adapter asynchronously via a server-to-server webhook.

Hosted Forms, not Hosted Payment Page

This adapter implements Nexi's Hosted Forms flow, where your storefront controls the payment-method selection UI and Nexi hosts only the form that collects sensitive details. This is different from Nexi's Hosted Payment Page, where the customer selects the payment method and enters details entirely on a Nexi-hosted page. The Hosted Payment Page flow is not used by this adapter.

Supported payment methods and other features: Features Overview

Limitations

  • Redirect flow only. Building a frontend on top of the Nexi adapter uses the hosted redirect flow (see Building a Frontend). Unlike the Adyen adapter, there is no embedded drop-in component or client-side SDK.
  • Full capture, refund, and cancel only. Partial capture and partial refund are not supported. Each post-purchase operation always applies to the full payment amount.
  • No webhook signature verification. The webhook endpoint is anonymous; merchant and channel identity travel as query parameters (see Webhook Configuration).

Configuration in Norce Admin

The adapter configuration is stored per merchant and channel. It is grouped into apiSettings (Nexi credentials), adapter (adapter URLs), paymentSettings (optional behavior), and redirectUrls (customer redirect targets).

API Settings

The apiSettings section holds the credentials you obtain from Nexi. These are secrets.

FieldDescriptionExample Value
apiUrlNexi Paygate base URL (test or production). The adapter appends /api/v2.https://test.paygate.nexigroup.com
clientIdClient ID provided by Nexi. This is your Nexi merchant ID.100xxxxxx
clientSecretClient secret provided by Nexi. This is your API key.••••••••

The adapter authenticates every call to Nexi using HTTP Basic authentication with clientId and clientSecret.

Adapter URLs

The adapter section defines the base URLs the adapter uses when registering callback URLs with Nexi.

FieldDescriptionExample Value
internalUrlInternal base URL used for the server-to-server webhook and internal order hooks.https://{slug}.api-se.{env}.norce.tech/checkout/nexi-adapter
publicUrlPublic base URL used for the browser-facing return and cancel URLs.https://{slug}.api-se.{env}.norce.tech/checkout/nexi-adapter

Payment Settings (Optional)

The paymentSettings section is optional and controls payment behavior.

FieldDescriptionDefault Value
channelSales channel: ECOM, MOTO, APP, PAYBYLINK, or POS.ECOM
captureMethodCapture behavior: AUTOMATIC (capture immediately), MANUAL (capture on request), or DELAYED.AUTOMATIC
delayedHoursHours to delay automatic capture. Required when captureMethod is DELAYED (1–696).
dccEnabledEnable Dynamic Currency Conversion for card payments.false
simulationModeNexi test-outcome simulation string (test environment only).
cardTemplateNameName of the hosted card-form template.
cardTemplateFontSizeFont size for the hosted card form.
cardTemplateTextColorText color (hex) for the hosted card form.#FFFFFF
statementDescriptorText shown on the customer's bank statement.
externalIntegrationIdExternal integration ID passed through to Nexi.

Redirect URLs

The redirectUrls section defines where the customer is sent after leaving the Nexi hosted form. Both fields support the placeholders {order.merchant}, {order.channel}, and {order.id}; checkoutPage additionally supports {errorCode}.

FieldDescription
confirmationPageURL the customer is redirected to after a successful payment.
checkoutPageURL the customer is redirected to on failure, cancellation, or error.

Nexi API Environments

In addition to the generic Norce Adapter URLs (see Payment Adapters Overview), Nexi uses the following external API environments. The adapter appends /api/v2 to the configured apiUrl.

EnvironmentNexi Paygate Base URL
Productionhttps://paygate.nexigroup.com
Testhttps://test.paygate.nexigroup.com

Create Payment

To start a Nexi payment, create a payment on an existing Norce Checkout order:

POST /api/checkout/v1/orders/{order_id}/payments
Host: {slug}.api-se.stage.norce.tech
x-merchant: {merchant}
x-channel: {channel}
Authorization: Bearer {token}
Content-Type: application/json

{
  "paymentMethods": {
    "integrationType": "Hosted",
    "type": "Card"
  },
  "simulationMode": "0000"
}

The paymentMethods.type selects the Nexi payment method (for example Card, Ideal, Paypal, Swish, Vippsmobilepay). simulationMode is only used in the test environment. The optional browserInfo, device, and referencePayId fields may be supplied for card and 3D Secure scenarios.

For the hosted flow, the response contains the redirectUrl your frontend sends the customer to:

{
  "paymentId": "pmt_01HXXX...",
  "redirectUrl": "https://test.paygate.nexigroup.com/hostedpaymentpage/...",
  "status": "PENDING",
  "responseCode": null,
  "responseDescription": null
}

The adapter also stores the Nexi payment details on the Norce order and registers order hooks so that cart and shipping changes keep the Nexi payment amount in sync.

Hosted vs. Direct integration

The adapter supports both a Hosted (redirect) and a Direct (server-side) integration type. The Hosted flow described here is the recommended path and the one used when building a storefront frontend. In the Direct flow the response returns the payment result inline (payId, status, responseCode) instead of a redirectUrl, and no browser redirect or callback URLs are used.

Building a Frontend (Redirect Flow)

Building a frontend on top of the Nexi adapter has the most in common with the Adyen Checkout Adapter: the payment is initiated with the same POST .../orders/{order_id}/payments call. The difference is how the payment UI is rendered. Because Nexi uses the Hosted Forms flow, your storefront renders its own payment-method selector; when the customer picks a method, the adapter returns a redirectUrl and you send the customer to Nexi's hosted form to enter their details. There is no embedded drop-in component or client-side SDK.

The flow is:

  1. Render the method selector and create the payment. Present the available payment methods in your own UI. When the customer selects one, call POST /api/checkout/v1/orders/{order_id}/payments from your backend (or a backend-for-frontend layer) with paymentMethods.integrationType set to Hosted and paymentMethods.type set to the chosen method. The x-merchant and x-channel headers identify the configuration to use.
  2. Redirect the browser. Take the redirectUrl from the response and redirect the customer to it (for example window.location.href = redirectUrl). The customer enters their payment details on Nexi's hosted form.
  3. Handle the return. When the customer finishes (or cancels), Nexi redirects them back to the adapter's return or cancel endpoint. The adapter resolves the payment status and then redirects (HTTP 303) the customer to your configured redirectUrls.confirmationPage (success) or redirectUrls.checkoutPage (failure/cancel), substituting the {order.id}, {order.merchant}, {order.channel}, and {errorCode} placeholders.
  4. Rely on the webhook for the final state. The authoritative payment state is set asynchronously when Nexi calls the adapter's webhook. Read the order's payment state from the Norce order rather than trusting the redirect alone.
Difference from Adyen

The Adyen adapter renders an embedded drop-in via the @adyen/adyen-web SDK and exposes additional transaction and details endpoints for in-page state exchange. The Nexi adapter has no client-side SDK and no transaction/details endpoints — after creating the payment, the browser is redirected to Nexi's hosted form and returns via the configured redirect URLs. Note that with Nexi's Hosted Forms flow your storefront owns the payment-method selection UI, whereas Adyen's drop-in renders the method selection for you.

Webhook Configuration

Nexi notifies the adapter of payment status changes through a server-to-server webhook. The adapter registers the webhook URL with Nexi automatically when the payment is created (using the adapter.internalUrl base URL) — no manual configuration in a Nexi dashboard is required.

The webhook URL pattern is:

{internalUrl}/api/checkout/v1/callback/orders/{order_id}/payments/{payment_id}/webhook?m={merchant}&c={channel}

Because Nexi cannot send Norce's x-merchant and x-channel headers, merchant and channel are passed as query parameters. The webhook payload contains the Nexi payId; the adapter fetches the full payment details from Nexi and maps the Nexi status to a standardized Norce payment state:

Nexi StatusNorce Payment State
OK, SUCCESS, AUTHORIZEDreserved
CAPTURE_REQUEST, CAPTUREDcaptured
FAILED, DECLINED, ERRORdeclined
CANCELLED, REVERSEDcancelled
otherintent

Post-Purchase Operations

Capture, refund, and cancel follow the generic pattern described in the Payment Adapters Overview. For Nexi these operations always apply to the full payment amount — partial capture and partial refund are not supported.

OperationAllowed From StateResult State
Capturereservedcaptured
Refundcapturedrefunded
Cancel / reversalreservedcancelled
POST /api/order/v1/orders/{order_id}/payments/{payment_id}/capture
Host: {slug}.api-se.stage.norce.tech
x-merchant: {merchant}
x-channel: {channel}
Authorization: Bearer {token}

Use refund and cancel in place of capture for the corresponding operations. A refresh endpoint (POST .../payments/{payment_id}/refresh) rebuilds the list of available payment actions on the Norce order.

Troubleshooting (Nexi Specific)

In addition to the generic troubleshooting steps:

  • Payment creation fails (400/404): Verify the order exists and that the requested paymentMethods.type is enabled for your Nexi account and channel. A payment method that is not configured returns a PAYMETHOD INVALID error from Nexi.
  • Payment creation fails (409 Conflict): A Nexi payment already exists for this order. Remove the existing payment or use a different order.
  • Authentication errors: Confirm apiSettings.clientId and apiSettings.clientSecret are correct and that apiSettings.apiUrl points at the matching environment (test vs. production).
  • Customer not redirected back: Verify redirectUrls.confirmationPage and redirectUrls.checkoutPage are configured, and that adapter.publicUrl and adapter.internalUrl are reachable.
  • Final state not updating: The final payment state depends on the webhook. Confirm adapter.internalUrl is reachable from Nexi and check the adapter logs for incoming webhook calls.