{"id":373,"date":"2026-07-07T10:55:59","date_gmt":"2026-07-07T03:55:59","guid":{"rendered":"https:\/\/komunitech.com\/blog\/?p=373"},"modified":"2026-07-07T10:56:05","modified_gmt":"2026-07-07T03:56:05","slug":"n8n-workflow-pembayaran-qris-integrasi-wa-midtrans-untuk-bisnis-online","status":"publish","type":"post","link":"https:\/\/komunitech.com\/blog\/tutorial\/n8n-workflow-pembayaran-qris-integrasi-wa-midtrans-untuk-bisnis-online\/","title":{"rendered":"n8n Workflow Pembayaran QRIS: Integrasi WA + Midtrans untuk Bisnis Online"},"content":{"rendered":"<p>Panduan bikin workflow n8n untuk pembayaran QRIS \u2014 dari trigger WA order sampai konfirmasi pembayaran otomatis. Pelanggan pesan lewat WA \u2192 bot kirim link pembayaran QRIS \u2192 webhook Midtrans konfirmasi pembayaran \u2192 update status di Google Sheets \u2192 kirim notifikasi ke pelanggan. Total setup: 1\u20132 jam. Cocok buat UMKM yang pengen full auto dari order sampai bayar.<\/p>\n<p>Bayangin: pelanggan WA &#8220;mau beli 2 kaos hitam 150rb&#8221; \u2192 5 detik kemudian dapat balasan link QRIS \u2192 bayar scan \u2192 spreadsheet otomatis update status &#8220;LUNAS&#8221; \u2192 pelanggan dapat notifikasi &#8220;pembayaran diterima, pesanan diproses.&#8221; Semua tanpa admin sentuh.<\/p>\n<p>Ini bukan futuristik \u2014 bisa kamu buat dalam 1\u20132 jam dengan n8n, Midtrans, dan WhatsApp Gateway.<\/p>\n<p>Yang kamu butuhin:<br \/>\n&#8211; n8n (self-hosted atau cloud)<br \/>\n&#8211; Akun Midtrans (gratis daftar, fee per transaksi ~1.5\u20132.5%)<br \/>\n&#8211; WhatsApp Gateway (pakai Meta Cloud API atau Twilio)<br \/>\n&#8211; Google Sheets buat tracking order<\/p>\n<p>Biaya operasional: Rp200\u2013500rb\/bulan (server + API). Bandingin sama admin yang handle pembayaran manual Rp3\u20135jt\/bulan.<\/p>\n<h2>Cara Kerja Sistem<\/h2>\n<p>(Lihat diagram alur workflow di bawah)<\/p>\n<h2>Step-by-Step<\/h2>\n<h3>Step 1: Siapkan Infrastructure<\/h3>\n<p>&#8211; n8n self-hosted di VPS (min 1GB RAM, Rp100\u2013200rb\/bulan)<br \/>\n&#8211; Install PM2 biar auto-restart kalau crash<br \/>\n&#8211; Domain\/subdomain buat webhook callback (misal: <code>webhook.bisnis-kamu.com<\/code>)<\/p>\n<h3>Step 2: Setup Midtrans<\/h3>\n<p>1. Daftar di Midtrans (pilih &#8220;Irisan&#8221; buat umkm atau &#8220;Snap&#8221; buat kustom)<br \/>\n2. Dapatkan <strong>Server Key<\/strong> dan <strong>Client Key<\/strong> dari dashboard<br \/>\n3. Set webhook URL di setting Midtrans \u2192 Payment Notification \u2192 arahin ke n8n webhook<\/p>\n<h3>Step 3: Buat Workflow n8n \u2014 Order Masuk<\/h3>\n<p>1. <strong>Trigger Webhook<\/strong> \u2014 endpoint <code>\/order-masuk<\/code> (POST)<br \/>\n2. <strong>Parse order<\/strong> \u2014 pake Code node atau AI parsing (format: <code>nama, produk, jumlah, alamat<\/code>)<br \/>\n3. <strong>Validasi input<\/strong> \u2014 cek nama, produk, jumlah, alamat gak kosong<br \/>\n4. <strong>Buat invoice Midtrans<\/strong> \u2014 pake HTTP Request node:<br \/>\n   &#8211; Method: POST<br \/>\n   &#8211; URL: <code>https:\/\/app.sandbox.midtrans.com\/snap\/v1\/transactions<\/code><br \/>\n   &#8211; Auth: Basic auth (Server Key:)<br \/>\n   &#8211; Body: <code>{\"transaction_details\":{\"order_id\":\"ORDER-{timestamp}\",\"gross_amount\":{total}},\"customer_details\":{\"first_name\":\"{nama}\",\"phone\":\"{nowa}\"},\"item_details\":[{\"name\":\"{produk}\",\"quantity\":{jumlah},\"price\":{harga}}]}<\/code><\/p>\n<h3>Step 4: Kirim Link QRIS ke WA<\/h3>\n<p>Dari response Midtrans, ambil <code>redirect_url<\/code> \u2014 itu link pembayaran QRIS-nya.<\/p>\n<p>Tambahkan &#8220;WhatsApp&#8221; node (atau HTTP Request ke Meta Cloud API):<\/p>\n<pre><code>Halo {nama}, pesananmu udah masuk!\n\nDetail Pesanan:\n- Produk: {produk} x {jumlah}\n- Total: Rp{total}\n\n<em>Klik link berikut buat bayar:<\/em>\n{redirect_url}\n\nScan QRIS atau klik link di atas. Pembayaran otomatis terverifikasi.<\/code><\/pre>\n<h3>Step 5: Webhook Konfirmasi Pembayaran<\/h3>\n<p>Ini kunci sistemnya \u2014 Midtrans bakal kirim notifikasi POST ke URL yang udah di-set:<br \/>\n1. <strong>Webhook node<\/strong> \u2014 endpoint <code>\/midtrans-notif<\/code><br \/>\n2. <strong>Verify signature<\/strong> \u2014 Midtrans signature = <code>SHA512(order_id+status_code+gross_amount+ServerKey)<\/code><br \/>\n3. <strong>Cocokin<\/strong> \u2014 kalau <code>transaction_status = \"settlement\"<\/code> atau <code>\"capture\"<\/code>:<br \/>\n   &#8211; Update row di Google Sheets \u2192 status &#8220;LUNAS&#8221;<br \/>\n   &#8211; Kirim WA ke pelanggan: &#8220;Pembayaran diterima! Pesananmu segera diproses.&#8221;<br \/>\n4. <strong>Kalau gagal<\/strong> (<code>deny<\/code>, <code>expire<\/code>):<br \/>\n   &#8211; Update status &#8220;GAGAL&#8221;<br \/>\n   &#8211; Kirim WA: &#8220;Pembayaran belum diterima. Klik link berikut buat bayar ulang: {link}&#8221;<\/p>\n<h3>Step 6: Google Sheets Tracking<\/h3>\n<p>Buat spreadsheet dengan kolom:<br \/>\n&#8211; Timestamp | Nama | No. WA | Produk | Jumlah | Total | Status | Order ID | Invoice Link<\/p>\n<p>Setiap order baru \u2192 append row dengan status &#8220;MENUNGGU&#8221;<br \/>\nSetiap notif pembayaran \u2192 update status &#8220;LUNAS&#8221; atau &#8220;GAGAL&#8221;<\/p>\n<p>Kalau kamu belum familiar dengan integrasi dasar, <a href=\"https:\/\/komunitech.com\/blog\/whatsapp\/integrasi-whatsapp-google-sheets-untuk-order-management-panduan-lengkap-pakai-n8n\/\">tutorial integrasi WA + Google Sheets<\/a> ini bisa jadi pondasi sebelum nambah payment.<\/p>\n<h2>Cara Test Workflow<\/h2>\n<p>1. <strong>Mode Sandbox<\/strong> \u2014 Midtrans punya environment test. Kartu uji: <code>4811 1111 1111 1114<\/code>, CVV <code>123<\/code>, expired date bulan depan mana aja.<br \/>\n2. <strong>Manual trigger<\/strong> \u2014 kirim format order dari WA dummy ke webhook<br \/>\n3. <strong>Verifikasi<\/strong> \u2014 cek Google Sheets muncul row baru, WA kebales link, setelah bayar pake kartu uji status berubah jadi LUNAS<\/p>\n<p>Kalau semua lancar di sandbox, tinggal ganti endpoint Midtrans dari <code>app.sandbox.midtrans.com<\/code> \u2192 <code>app.midtrans.com<\/code><\/p>\n<h2>Estimasi Biaya<\/h2>\n<table>\n<thead>\n<tr>\n<th>Komponen<\/th>\n<th>Biaya\/bulan<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>VPS (self-hosted n8n)<\/td>\n<td>Rp100\u2013200rb<\/td>\n<\/tr>\n<tr>\n<td>WhatsApp API<\/td>\n<td>Rp0\u2013200rb<\/td>\n<\/tr>\n<tr>\n<td>Midtrans fee<\/td>\n<td>1.5\u20132.5%\/transaksi<\/td>\n<\/tr>\n<tr>\n<td>Total (tidak termasuk pajak)<\/td>\n<td>Rp300\u2013700rb<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Bandingkan dengan biaya admin Rp3\u20135jt\/bulan + human error cost.<\/p>\n<h2>Fitur Lanjutan (Kalau Udah Jalan)<\/h2>\n<p>&#8211; <strong>Reminder otomatis<\/strong> \u2014 kalau status masih &#8220;MENUNGGU&#8221; &gt;30 menit, kirim WA pengingat<br \/>\n&#8211; <strong>Diskon &amp; promo<\/strong> \u2014 tambah validasi kode promo di workflow<br \/>\n&#8211; <strong>Receipt otomatis<\/strong> \u2014 setelah LUNAS, kirim detail pesanan + estimasi pengiriman<br \/>\n&#8211; <strong>Dashboard realtime<\/strong> \u2014 Google Sheets + Data Studio buat laporan penjualan harian<\/p>\n<p>Ini tinggal nambah trigger Schedule + beberapa IF node. Modular.<\/p>\n<h2>Troubleshooting Umum<\/h2>\n<table>\n<thead>\n<tr>\n<th>Masalah<\/th>\n<th>Penyebab<\/th>\n<th>Solusi<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td>Midtrans callback gak masuk<\/td>\n<td>Webhook URL salah \/ firewall<\/td>\n<td>Cek setting Midtrans dashboard, pastikan n8n bisa diakses publik<\/td>\n<\/tr>\n<tr>\n<td>Signature verification fail<\/td>\n<td>Server Key beda \/ param salah<\/td>\n<td>Hash pakai SHA512 lowercase<\/td>\n<\/tr>\n<tr>\n<td>QRIS gak muncul<\/td>\n<td>Mode sandbox vs production<\/td>\n<td>Pastikan pake endpoint yang sesuai<\/td>\n<\/tr>\n<tr>\n<td>WA gak kebales<\/td>\n<td>Rate limit \/ token expired<\/td>\n<td>Rotate token, cek WhatsApp API dashboard<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Disclaimer<\/h3>\n<p>Informasi ini bersifat edukatif. Biaya dan fee Midtrans bisa berubah. Selalu uji coba di sandbox sebelum production. Integrasi pembayaran menyangkut data sensitif \u2014 pastikan server aman (HTTPS, environment variables, firewall).<\/p>\n<h3>Referensi<\/h3>\n<p>&#8211; <a target=\"_blank\" rel=\"noopener nofollow\" href=\"https:\/\/docs.midtrans.com\/\">Midtrans Documentation \u2014 Payment API Reference<\/a><br \/>\n&#8211; <a target=\"_blank\" rel=\"noopener nofollow\" href=\"https:\/\/docs.n8n.io\/\">n8n Documentation<\/a><br \/>\n&#8211; <a target=\"_blank\" rel=\"noopener nofollow\" href=\"https:\/\/developers.facebook.com\/docs\/whatsapp\/cloud-api\">Meta WhatsApp Cloud API Documentation<\/a><br \/>\n&#8211; <a target=\"_blank\" rel=\"noopener nofollow\" href=\"https:\/\/n8n.io\/integrations\/midtrans\/\">n8n x Midtrans Integration Example<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Panduan bikin workflow n8n untuk pembayaran QRIS \u2014 dari trigger WA order sampai konfirmasi pembayaran otomatis. Pelanggan pesan lewat WA \u2192 bot kirim link pembayaran QRIS \u2192 webhook Midtrans konfirmasi pembayaran \u2192 update status di Google Sheets \u2192 kirim notifikasi ke pelanggan. Total setup: 1\u20132 jam. Cocok buat UMKM yang pengen full auto dari order [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":374,"comment_status":"open","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[75],"tags":[80,18,72,82,81,43,70],"class_list":["post-373","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorial","tag-midtrans","tag-n8n","tag-otomatisasi","tag-pembayaran","tag-qris","tag-tutorial","tag-workflow"],"_links":{"self":[{"href":"https:\/\/komunitech.com\/blog\/wp-json\/wp\/v2\/posts\/373","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/komunitech.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/komunitech.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/komunitech.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/komunitech.com\/blog\/wp-json\/wp\/v2\/comments?post=373"}],"version-history":[{"count":1,"href":"https:\/\/komunitech.com\/blog\/wp-json\/wp\/v2\/posts\/373\/revisions"}],"predecessor-version":[{"id":377,"href":"https:\/\/komunitech.com\/blog\/wp-json\/wp\/v2\/posts\/373\/revisions\/377"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/komunitech.com\/blog\/wp-json\/wp\/v2\/media\/374"}],"wp:attachment":[{"href":"https:\/\/komunitech.com\/blog\/wp-json\/wp\/v2\/media?parent=373"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/komunitech.com\/blog\/wp-json\/wp\/v2\/categories?post=373"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/komunitech.com\/blog\/wp-json\/wp\/v2\/tags?post=373"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}