A simple web-based simulator for Midtrans Core API payments. This application allows you to simulate various payment methods in the Midtrans Sandbox environment including Bank Transfers, QRIS, GoPay, and Convenience Store payments.
- Clone the repository (or download the source code).
- Install dependencies:
npm install
- Configure Environment Variables:
Create a
.envfile in the root directory and add your Server Key:Note: Use theMIDTRANS_SERVER_KEY=your_server_key_here PORT=3000
.env.exampleas a template.
- Start the server:
or using npm scripts:
node server.js
npm start
- Access the application:
Open your browser and go to
http://localhost:3000.
- Multi-Method Support: Supports BCA, BNI, BRI, Mandiri, Permata, CIMB, BSI, QRIS, GoPay, Alfamart, Indomaret, and Akulaku.
- Auto-Polling: The application automatically polls for transaction status and displays a success modal upon completion.
- Integrated Simulator: Includes direct links to the Midtrans Sandbox Simulator for each payment method.
- DeepLink Integration: GoPay simulator is pre-filled with the transaction deeplink for a seamless testing experience.
index.html: The main entry point for the application.server.js: Express server that acts as a proxy to Midtrans API to avoid CORS issues and handle server-side logic.assets/css/: Contains the application's stylesheets.assets/js/: Contains the configuration (config.js) and main application logic (script.js).assets/images/: Contains logo SVGs for payment methods.
