business

Midtrans Payment Gateway: Setup And Business Guide

Accepting payments online shouldn't require stitching together a dozen bank accounts and manual receipt checks. If you run a business in Indonesia, manual bank transfers drain operational hours and ki

Midtrans Payment Gateway: Setup And Business Guide
In this story

Accepting payments online shouldn't require stitching together a dozen bank accounts and manual receipt checks. If you run a business in Indonesia, manual bank transfers drain operational hours and kill conversion rates at checkout. Customers expect to pay via GoPay, QRIS, credit cards, or convenience stores within seconds.

Midtrans solves this fragmentation by consolidating multiple payment methods under a single API. Owned by GoTo Financial, it stands as one of the most prominent payment infrastructure providers in the region. Whether you're launching a Shopify storefront or building a custom web app, understanding how Midtrans works helps you optimize cash flow and reduce cart abandonment.

What is Midtrans and How Does It Work?

Midtrans acts as the financial bridge between your customers and your business bank account. When a buyer selects an item on your website and checks out, the transaction routes through the Midtrans infrastructure. The system verifies funds, processes the payment with the respective financial institution, and notifies your server instantly.

The architecture removes the need to negotiate separate merchant agreements with BCA, Mandiri, GoPay, and Visa individually. Instead, a single integration connects you to the entire ecosystem.

Behind the scenes, the workflow functions through a few distinct phases:

  • Checkout Trigger: The customer selects their preferred payment channel on your platform, such as a virtual account or e-wallet.
  • Authorization Request: Your server sends a transaction request to Midtrans containing order details and the gross amount.
  • Payment Processing: Midtrans generates the payment instructions or payment page, allowing the customer to complete the transaction.
  • Callback Notification: Once paid, Midtrans sends an asynchronous notification (HTTP notification or webhook) to your server, confirming the payment status so you can fulfill the order.

This asynchronous notification mechanism ensures your system updates reliably even if the customer closes their browser window immediately after paying.

Available Payment Methods on Midtrans

Offering a diverse mix of payment options directly impacts conversion rates. Indonesian consumers show distinct preferences based on demographics and convenience. Midtrans supports a wide array of channels, categorized into four primary groups.

Virtual Accounts

Virtual accounts remain a dominant payment method for Indonesian e-commerce. Customers receive a unique account number tied to a specific bank transaction. They can pay via mobile banking, internet banking, or ATM networks. Midtrans supports virtual accounts for major institutions including Bank Central Asia (BCA), Bank Mandiri, BNI, Bank Rakyat Indonesia (BRI), PermataBank, and CIMB Niaga.

E-Wallets and QRIS

Mobile-first buyers heavily favor digital wallets. Midtrans integrates natively with GoPay and other leading domestic e-wallets. Furthermore, it supports QRIS (Quick Response Code Indonesian Standard), which consolidates payments from virtually any QR-enabled banking app or e-wallet into a single scannable code.

Credit and Debit Cards

For higher-value purchases or subscription models, card processing is essential. Midtrans supports Visa, Mastercard, and JCB transactions. Built-in security features like 3D Secure 2.0 protect against fraudulent chargebacks, while tokenization allows returning customers to save their cards for frictionless one-click checkouts.

Retail Outlets

A significant segment of the population still prefers cash transactions or lacks banking access. Midtrans bridges this gap by enabling payments over the counter at convenience store chains like Indomaret and Alfamart. The buyer receives a payment code, walks to the nearest store, pays the cashier in cash, and the system updates your dashboard in real time.

Setting Up Your Midtrans Account

Getting started involves navigating registration, verification, and technical integration. The process is straightforward if you have your legal business documents ready.

1. Registration and Sandbox Testing

First, create an account on the Midtrans Official Website. You can sign up for a Sandbox account immediately without submitting legal documents. The sandbox environment provides simulated API keys so your development team can test transactions, handle webhooks, and ensure your checkout flow works seamlessly without moving real money.

2. Business Verification (KYC)

To transition from Sandbox to Production mode, you must complete the verification process. Midtrans requires different documentation depending on your business entity type:

  • Individual (Perorangan): KTP (Indonesian ID card), NPWP (tax ID), and a personal bank account matching the account holder's name.
  • Company (PT / CV): Akta pendirian (deed of establishment), SIUP or NIB (business license), company NPWP, company bank account, and director identification.

Verification typically takes a few business days. Once approved, you gain access to live production API keys.

3. Integration Options

Depending on your technical resources, Midtrans offers several ways to embed payments into your platform:

  • Plugins and Extensions: If you run your store on platforms like WooCommerce, Shopify, Magento, or PrestaShop, official plugins allow you to connect Midtrans with minimal configuration.
  • Snap API: A pre-built, customizable popup checkout interface that handles frontend payment selection securely. It requires minimal frontend coding while keeping PCI-DSS scope manageable.
  • Core API: A direct, flexible API for developers who want to build a completely custom, white-label checkout experience native to their mobile app or website design.

For more details on developer implementation, review the Midtrans Documentation.

Transaction Fees and Payouts

Payment gateways charge for convenience, security, and infrastructure maintenance. Midtrans operates on a per-transaction fee model rather than charging heavy monthly subscription fees.

Fees vary depending on the payment channel. For instance, credit card processing typically incurs a percentage fee (often around 2.2% to 2.9% plus a fixed rupiah amount), while virtual accounts or QRIS may carry fixed fees per transaction or lower percentage rates.

Payouts—the process of transferring settled funds from your Midtrans balance to your corporate bank account—occur automatically according to a defined settlement schedule (usually daily or weekly, depending on your agreement and banking partner). Keep in mind that settlement times can stretch slightly over weekends and national holidays.

Common Mistakes to Avoid

Integrating a payment gateway requires attention to detail. Avoiding these pitfalls saves your engineering and finance teams hours of troubleshooting.

  • Ignoring Webhook Configuration: Failing to set up or secure your notification URLs properly can lead to orders marked as unpaid even after the customer completes the transaction. Always verify notification signatures.
  • Hardcoding API Keys: Storing production server keys directly in frontend code or public repositories exposes your account to unauthorized use. Keep keys in secure environment variables.
  • Overlooking Refund Policies: Make sure your team understands how to process refunds through the Midtrans dashboard or API. Automated refunds save immense customer support overhead, but partial refunds require careful handling depending on the payment channel used.

Frequently Asked Questions

Can I use Midtrans if I only have an individual KTP and no registered company?

Yes. Midtrans allows individual registration (Perorangan). You can use your personal KTP, NPWP, and personal bank account to process payments, making it ideal for freelancers, side projects, and small online shops.

How long does it take for funds to reach my bank account?

Settlement usually occurs on the next business day (T+1) for most local payment methods, though credit card transactions might take slightly longer depending on the acquiring bank and risk assessment protocols.

What is the difference between Sandbox and Production mode?

Sandbox is a fully isolated testing environment where you can simulate successful and failed payments using dummy credentials. Production mode processes real money from actual customers. Always test thoroughly in Sandbox before launching live.

Does Midtrans support recurring billing for subscriptions?

Yes. Midtrans offers features for recurring payments and card tokenization, allowing you to charge customer cards automatically on a scheduled basis for SaaS subscriptions or membership models.

SB

Written by

Samuel Baker

Samuel Baker approaches each story with intellectual curiosity and a commitment to fairness, earning the trust of readers and sources alike.

More from business