n8nbankingtechnicalpayments

Building Custom n8n Nodes for Vietnamese Banking APIs

HECIGO Team3 min read

Why Custom n8n Nodes?

n8n is a powerful workflow automation platform with 400+ built-in integrations. But when it comes to Vietnamese banking systems, the coverage is minimal. VNPay, Napas, and most Vietnamese bank APIs have no native n8n support.

This means Vietnamese businesses using n8n for automation hit a dead end whenever a workflow touches local financial systems. They're forced to write custom code, maintain fragile API integrations, or — more often — give up on automation entirely.

We set out to fix this by building purpose-built n8n nodes for Vietnamese banking.

Architecture Decisions

API Translation Layer

Vietnamese bank APIs are... unique. Many use SOAP instead of REST. Some require XML payloads with specific encoding. Others have authentication flows that don't follow OAuth standards.

Our n8n nodes abstract this complexity behind a clean interface:

// n8n node definition for VNPay
export class VNPayNode implements INodeType {
  description: INodeTypeDescription = {
    displayName: 'VNPay',
    name: 'vnpay',
    group: ['transform'],
    version: 1,
    description: 'Interact with VNPay payment gateway',
    inputs: ['main'],
    outputs: ['main'],
    credentials: [
      {
        name: 'vnpayApi',
        required: true,
      },
    ],
    properties: [
      {
        displayName: 'Operation',
        name: 'operation',
        type: 'options',
        options: [
          { name: 'Create Payment', value: 'createPayment' },
          { name: 'Query Transaction', value: 'queryTransaction' },
          { name: 'Refund', value: 'refund' },
        ],
        default: 'createPayment',
      },
      // ... additional properties
    ],
  }
}

Handling VND Currency

Vietnamese Dong (VND) doesn't use decimal places — 50,000 VND is written as 50000, not 500.00. This seems trivial, but it breaks international payment systems that expect two-decimal currencies.

Our middleware handles currency normalization automatically:

function normalizeAmount(
  amount: number,
  fromCurrency: string,
  toCurrency: string
): number {
  const decimalMap: Record<string, number> = {
    VND: 0,
    USD: 2,
    EUR: 2,
    JPY: 0,
  }
 
  const fromDecimals = decimalMap[fromCurrency] ?? 2
  const toDecimals = decimalMap[toCurrency] ?? 2
 
  // Convert to base units, then to target format
  const baseUnits = amount * Math.pow(10, -fromDecimals)
  return Math.round(baseUnits * Math.pow(10, toDecimals))
}

Real-World Workflow Example

Here's a complete n8n workflow that processes an international order:

  1. Webhook trigger: Order received from Shopify
  2. VNPay Node: Create payment request in VND
  3. Currency conversion: Convert to USD for Stripe settlement
  4. Stripe Node: Process international payment
  5. Tax calculation: Generate Vietnamese tax invoice
  6. Notification: Send confirmation in Vietnamese and English

What previously required 500+ lines of custom code is now a visual workflow that any team member can understand and modify.

Lessons Learned

  1. Bank API documentation is often wrong — always test against sandbox environments, not just docs
  2. Timeout handling is critical — Vietnamese bank APIs can be slow (5-10 second responses are normal)
  3. Error messages need translation — bank error codes must be mapped to human-readable messages in both Vietnamese and English

What's Next

We're expanding our n8n node library to cover:

  • Napas (National Payment Corporation of Vietnam)
  • MoMo and ZaloPay e-wallets
  • Vietnamese tax authority (eTax) integration
  • Logistics providers (GHN, GHTK, Viettel Post)

Each node follows the same philosophy: abstract the complexity, expose a clean interface, let businesses automate without worrying about API quirks.


Interested in using our n8n nodes for your workflows? Get in touch — we're building in public and welcome early adopters.

Related Articles