• Documentation
  • API Reference
  • Documentation
  • API Reference
Expand All Collapse All
  • Payment Overview
    • Introduction
    • Choosing an Integration Method
  • Accept Payment
    • Payment Page
      • Quick Start
      • Input Parameters
      • Output Parameters
    • Web SDK
      • Quick Start
      • Nuvei Fields
        • Styling
      • Additional Functions
      • APM Payments
      • Tokenization-Only Flow
      • Scenarios
      • Using ReactJS
        • Full Samples
        • Sandbox Examples
      • FAQs
    • Checkout
      • Quick Start
        • UI Customization
        • Payment Customization
        • Advanced Controls
        • Checkout Examples
      • Server-to-Server
      • Payment Scenarios
      • Mobile SDKs (Beta Release)
        • Android Mobile SDK (Beta Release)
        • iOS Mobile SDK (Beta Release)
      • Flow Diagrams
      • Plugins
        • Magento
          • Rebilling with Magento
        • WooCommerce
          • Rebilling with WooCommerce
        • PrestaShop
          • PrestaShop with Web SDK
          • PrestaShop with Checkout
        • OpenCart
        • Shopify (via AsiaBill)
        • Mirakl
        • Salesforce
        • SAP
        • WIX
      • Marketplaces
    • Features
      • Authentication
      • Financial Operations
        • Refund
        • Void
        • Auth and Settle
        • Partial Approval
        • Currency Conversion (DCC and MCP)
        • Payout
      • Card Operations
        • Card-on-File
        • PCI and Tokenization
        • Zero-Authorization
        • Merchant-Initiated Transactions (MIT)
        • Blocking Cards
      • Subscription (Rebilling)
      • 3D-Secure
        • 3D-Secure Explained
        • 3DS Implementations
          • 3DS MPI-Only Web SDK
          • 3DS MPI-Only REST
          • 3DS External MPI
          • 3DS Responses
        • 3DS Functions
          • 3D-Secure Fingerprinting
          • 3D-Secure Authentication Challenge
      • Webhooks (DMNs)
        • Payment Transaction Requests
        • Control Panel Events API
    • Guides
      • Testing Cards, APIs and APMs
        • Testing Cards
        • Testing APIs with Postman
        • Testing APMs
      • Response Handling
      • Alternative Payment Guides (APMs)
      • Airline Ticket Guides
        • Airline Addendum
        • External Authorization Addendum
      • Payment Facilitators (PayFac)
      • Cashier
        • Cashier Events Guide
        • Cashier Features
      • Withdrawal Guide
      • Risk Guide
        • Nuvei Services
        • Transaction Types
        • Credits and Payouts
        • Fraud to Sale Programs
        • Compliance Programs
        • Chargebacks
      • eKYC Guide
      • Server SDKs
        • Java SDK
        • .NET SDK
        • PHP SDK
        • Node.JS SDK
      • Fast Track Onboarding Developer Guide
      • Currency Conversion Guides
        • Multiple Currency Pricing (MCP)
        • Dynamic Currency Conversion (DCC)
          • DCC in Cashier or Payment Page
          • DCC in REST API Workflows
          • DCC in Web SDK Workflows
      • Website Compliance Guides
    • Additional Links
      • FAQs
      • API Reference
      • Release Notes
      • Country and Currency Codes

    Server SDKs

    On this page:
    • Introduction
      • Why Use Nuvei Server SDKs?
      • SDK Methods
    • Prerequisites for Initialization
    • Initialize the Nuvei SDK

    Introduction

    Nuvei SDKs (Software Development Kits) are easy-to-use code libraries, which provide user-friendly wrappers for REST API.

    • SDKs are provided for:
      • “Strong language systems”: (Java, .NET)
      • “Latent language systems”: (PHP, Node.JS).
    • All the parameter names are the same as the REST API parameters making it easy to reference the Nuvei Developers Portal for guidance.

    Why Use Nuvei Server SDKs?

    Nuvei SDKs have many advantages:

    • Fast integration:
      • Seamless integration of the SDK library into your development environment.
      • Optimized code re-use to minimize integration time.
    • Ease of use:
      • Appropriate use of API communication protocols.
      • Seamless error handling.
      • Automatic checksum calculation for easier initialization.
      • Documentation hints embedded in the code.
    • Built-in unit testing:
      • Contain pre-filled data for fast testing examples.

    SDK Methods

    • /getSessionToken
    • /openOrder
    • /payment
    • /settleTransaction
    • /refundTransaction
    • /voidTransaction
    • /getPaymentStatus
    • /getCardDetails
    • /initPayment
    • /authorize3d
    • /verify3d
    • /accountCapture
    • /payout

    For details of all the Nuvei Methods, parameters, example requests and responses, see the Nuvei API Reference Guide.

    Prerequisites for Initialization

    Before initializing the SDK, use the links provided in the following table to import the latest version of the relevant SDK into your code environment.

    SDKGitHub LinkExternal Libraries
    PHPPHP GitHub---
    JavaJava GitHubJava Maven
    C#.NET GitHub.NET NuGet
    Nodes.JS---Node.JS NPM

    Initialize the Nuvei SDK

    Initializing the Nuvei SDK authenticates you as a merchant.

    Include this script before sending any requests to the API server:

    $safecharge = new SafeChargeApiRestClient([
      'environment' => SafeChargeApiEnvironment::INT,
      'merchantId' => '<your merchantId>',
      'merchantSiteId' => '<your merchantSiteId>',
      'merchantSecretKey' => '<your merchantSecretKey>',
    ]);
    public class Main {
      public static void main(String[] args) {
        String merchantId = "<your merchantId>";
        String merchantSiteId = "<your merchantSiteId>";
        String merchantKey = "<your merchantKey>";
        safecharge.initialize(merchantId, merchantSiteId, merchantKey, Constants.HashAlgorithm.SHA256);
      }
    }
    var safecharge = new Safecharge(
      "<your merchantKey>",
      "<your merchantId>",
      "<your merchantSiteId>",
      "<your server host value>",
      HashAlgorithmType.SHA256
    );
    const safecharge = require('safecharge');
    safecharge.initiate(<merchantId>, <merchantSiteId>, <merchantSecretKey>, <env>);

    Possible values for the environment parameter:

    • prod – (default) Nuvei live production environment.
    • int – Nuvei sandbox environment
    SDK GitHub Link External Libraries
    SDK
    GitHub Link
    External Libraries
    PHP PHP GitHub —
    Java Java GitHub Java Maven
    C# .NET GitHub .NET NuGet
    Nodes.JS — Node.JS NPM

     

    2022 Nuvei. All rights reserved.