nicepay/magento-nicepay

Nicepay Magento 2 Payment Module

Installs: 1

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

Type:magento2-module

1.0.0 2025-06-30 07:26 UTC

This package is auto-updated.

Last update: 2025-06-30 08:34:30 UTC


README

NICEPAY ❀️ Magento 2!

Official NICEPAY payment gateway module for Magento 2. This extension enables merchants to accept a wide range of payments securely and efficiently through NICEPAY’s trusted payment APIs.

πŸš€ Features

  • Seamless integration with SNAP and V2 NICEPAY APIs
  • Secure transaction handling and logging
  • Full support for sandbox (test) and production environments
  • Modular payment method support (enable what you need)
  • Configuration directly from Magento Admin
  • Admin-side payout approval tools
  • Built-in support for both SNAP and Non-SNAP notifications

πŸ’³ Supported Payment Methods

SNAP API

  • Virtual Account (14+ Indonesian banks)
  • E-Wallet (Dana, OVO, ShopeePay, LinkAja)
  • QRIS
  • Payout / Disbursement

V2 API

  • Credit/Debit Card
  • Virtual Account (same as SNAP)
  • Convenience Store (Alfa Group, Indomaret)
  • E-Wallet (Dana, OVO, ShopeePay, LinkAja)
  • Payloan (Akulaku, Kredivo, Indodana)
  • Payout / Disbursement
  • QRIS
  • Redirect to NICEPAY Payment Page

βš™οΈ Installation

You can install this Magento 2 module using Composer (recommended) or manually by placing the module in your Magento project.

Method 1: Composer Installation (Recommended)

If your project uses Composer, install the module using:

composer require nicepay/magento-libs

Then run the Magento setup commands:

php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f

Method 2: Manual Installation

  1. Download the module from GitHub.
  2. Extract the contents to:
app/code/Nicepay/NicePayment
  1. Add the required Nicepay PHP SDK to your Magento root composer.json (if not already added):
"require": {
  "nicepay/php-nicepay": "^1.1"
}
  1. (Optional) If the SDK is not available on Packagist, add the repository definition:
"repositories": [
  {
    "type": "vcs",
    "url": "https://github.com/nicepay-dev/php-nicepay"
  }
]
  1. Then run the following commands:
composer update
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f

Notes

  • For production environments, make sure to clear cache after deployment:
php bin/magento cache:clean
php bin/magento cache:flush

πŸ”§ Configuration

After installing the module, configure it from:

Admin Panel > Stores > Configuration > Sales > Payment Methods > NICEPAY

General Configuration Options

  • Title: Display name of the payment method
  • Debug Mode: Enable request/response logs
  • Active: Enable or disable the method
  • Merchant ID: From NICEPAY
  • Environment: dev or prod
  • API Version: v2 or snap
  • Merchant Key / Client Secret: Stored securely
  • Minimum / Maximum Order Amount: Restrict availability by order value

Additional Method-Specific Options

  • Virtual Account: Select supported banks
  • QRIS: mitra_cd (partner code), store_id
  • Card Payments: Configure 3DS and secure fields
  • Convenience Store: Select retailer type (Alfa, Indomaret)

πŸ’Ό Admin Features

Payout Management Interface

A dedicated Payout Transaction menu is included in the Magento Admin Panel:

Admin Panel > NICEPAY MENU > Payout Transaction

This tool enables merchants to:

  • βœ… Approve payout requests
  • βœ… Reject payout requests
  • βœ… Cancel pending payouts

Useful for managing refunds, vendor payments, or custom disbursement logic.

🚚 Usage Flow

  1. Customer selects a NICEPAY payment method during checkout
  2. System routes to the appropriate payment experience:
    • Virtual Account: Bank transfer instructions shown
    • Convenience Store: Convenience store payment instructions shown
    • E-Wallet: Redirect to wallet app/web, for ovo you will receive notification on customer OVO app
    • QRIS: QR code displayed
    • Payloan: Redirect to payloan web/app
    • Card: Secure form handled via NICEPAY
  3. After the customer completes the payment, Magento receives a server-to-server notification from NICEPAY to update the transaction status automatically. The customer is then redirected back to the store for final confirmation.

πŸ”„ Notification & Callback Handling

The module supports both SNAP and Non-SNAP notifications. Each category of payment method has a dedicated endpoint.

Supported Routes

  • Virtual Account (SNAP): /notification/api/v1.0/transfer-va/payment
  • QRIS (SNAP): /notification/api/v1.0/qr/qr-mpm-notify
  • E-Wallet (SNAP): /notification/api/v1.0/debit/notify
  • Payout (SNAP): /notification/api/v1.0/debit/notify
  • All Non-Snap PayMethod: /nicepay/nicepayment/notification

These endpoints are automatically routed to their respective controller actions via a custom router class. No extra route configuration is needed on your end.

πŸ“‘ Resources

Built and maintained with ❀️ by the NICEPAY Team.