Skip to content

VNPAY Smart POS Provider

The VNPAY Smart POS provider integrates with VNPAY's Smart POS terminals - Android-based payment terminals with built-in card readers, printers, and connectivity.

Overview

AttributeValue
Provider KeyVNPAY_SMART_POS
Payment Method400_CARD
SettlementT+1
HardwareVNPAY Smart Terminal

Features

  • All-in-one device - Card reader, printer, scanner
  • Multiple card types - Chip, contactless, magnetic stripe
  • Offline transactions - Store-and-forward capability
  • Receipt printing - Built-in thermal printer

Terminal Models

ModelDisplayConnectivityCard Support
SP6005.5" Touch4G/WiFi/BTChip, NFC, MSR
SP8008" Touch4G/WiFi/BT/EthernetChip, NFC, MSR
SP2002.4"4G/WiFiChip, NFC

Configuration

Application Configuration

typescript
import { MQPayComponent, MQPayBindingKeys, IMQPayOptions } from '@nx-3rd/mq-pay';

class MyApplication extends BaseApplication {
  preConfigure() {
    this.bind<IMQPayOptions>({ key: MQPayBindingKeys.MQ_PAY_CLIENT_OPTIONS })
      .toValue({
        vnpaySmartPos: {
          enable: true,
          isDefault: false,
          enableController: true,

          // Required: VNPAY merchant code
          merchantCode: 'your-merchant-code',

          // Required: Terminal code
          terminalCode: 'your-terminal-code',

          // Required: Secret keys for checksum
          secretKey: {
            api: 'secret-for-api-requests',    // For merchantorder, getorderdetail, cancelorder
            ipn: 'secret-for-ipn-verification', // For IPN signature verification
          },

          // Environment flag
          isProduction: process.env.NODE_ENV === 'production',

          // Optional: Request timeout in ms (default: 90000)
          timeout: 90000,

          // Optional: Custom notification handler
          onPaymentNotification: async (ipnData) => {
            console.log('SmartPOS payment:', ipnData);
          },
        },
      });

    this.component(MQPayComponent);
  }
}

Configuration Options

OptionTypeRequiredDescription
enablebooleanYesEnable this provider
isDefaultbooleanYesUse as default provider
enableControllerbooleanYesAuto-register IPN endpoint
merchantCodestringYesVNPAY merchant code
terminalCodestringYesVNPAY terminal code
secretKey.apistringYesSecret for API requests
secretKey.ipnstringYesSecret for IPN verification
isProductionbooleanYestrue for production environment
timeoutnumberNoRequest timeout in ms (default: 90000)
onPaymentNotificationfunctionNoCustom IPN handler callback

Payment Flow

API Usage

typescript
const response = await paymentService.checkout({
  source: { type: 'Order', id: 'order-uuid' },
  payment: {
    provider: 'VNPAY_SMART_POS',
    method: '400_CARD',
    total: 250000,
    currency: 'VND',
  },
});

Card Networks

NetworkChipNFCMSR
VisaYesYesYes
MastercardYesYesYes
JCBYesYesYes
UnionPayYesYesYes
NapasYesYesYes

Proprietary and Confidential. Unauthorized copying, distribution, or use of this software is strictly prohibited.