npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@yudhaputrama/n8n-nodes-midtrans

v0.1.3

Published

n8n Community Node Package for Midtrans to create payment links using Midtrans SNAP API.

Readme

n8n-nodes-midtrans

This is an n8n community node. It lets you use Midtrans SNAP API in your n8n workflows.

Midtrans is a leading payment gateway in Indonesia that provides comprehensive payment solutions for businesses. The SNAP API allows you to create secure payment links and process online transactions.

n8n is a fair-code licensed workflow automation platform.

Installation
Operations
Credentials
Compatibility
Usage
Resources

Installation

Follow the installation guide in the n8n community nodes documentation.

You can install this package using npm:

npm install @yudhaputrama/n8n-nodes-midtrans

Operations

The Midtrans SNAP node supports the following operations:

Transaction

  • Create SNAP Transaction: Create a new payment transaction using Midtrans SNAP API
    • Generate secure payment links
    • Support for multiple payment methods (credit cards, bank transfers, e-wallets, etc.)
    • Customizable transaction details including items, customer information, and payment options
    • Support for transaction expiry settings
    • Custom fields for additional data

Credentials

To use this node, you need to set up Midtrans API credentials:

Prerequisites

  1. Sign up for a Midtrans account at https://midtrans.com
  2. Complete the account verification process
  3. Access your Midtrans Dashboard

Setting up credentials

  1. In your Midtrans Dashboard, go to Settings → Access Keys
  2. Copy your Server Key (it starts with SB- for sandbox or VT-server- for production)
  3. In n8n, create new Midtrans API credentials with:
    • Environment: Choose "Sandbox" for testing or "Production" for live transactions
    • Server Key: Paste your Midtrans server key

Important: Always use sandbox credentials for testing. Only use production credentials when you're ready to process real payments.

Compatibility

  • Minimum n8n version: 1.0.0
  • Tested with n8n versions: 1.0.0+
  • Node.js version: 20.15+

Usage

Basic Transaction Creation

  1. Add the Midtrans SNAP node to your workflow
  2. Configure your Midtrans API credentials
  3. Set the required fields:
    • Order ID: Unique identifier for your transaction
    • Gross Amount: Transaction amount in Indonesian Rupiah (IDR)

Advanced Configuration

The node supports extensive customization:

  • Item Details: Add product information including name, price, quantity, brand, and category
  • Customer Details: Include customer information and billing/shipping addresses
  • Payment Methods: Specify which payment methods to enable
  • Credit Card Settings: Configure 3D Secure and other credit card options
  • Expiry Settings: Set transaction expiry time
  • Custom Fields: Add custom data to transactions

Example Response

Successful transactions return:

{
  "token": "d379aa71-99eb-4dd1-b9bb-eefe813746e9",
  "redirect_url": "https://app.sandbox.midtrans.com/snap/v3/redirection/071e0c3d-dade-4148-a1b5-296ee8735b79"
}

Use the redirect_url to redirect customers to the payment page, or embed the payment form using the token with Midtrans SNAP.js.

Resources