Skip to content

Releases

v0.1.1

Choose a tag to compare

@Reyhandhani Reyhandhani released this 28 Oct 11:29

Existing Midtrans code can now point at this simulator without a rewrite.

Highlights

  • Midtrans-compatible API at /v2/charge and /v2/{order_id}/status, with Basic auth and SHA512 signature_key webhooks. Request bodies match Midtrans Core API.
  • Idempotency-Key on both charge endpoints, so a retried CI job does not create a second transaction.
  • Configurable failure status through SIMULATED_FAILURE_STATUS, so you can force 504 or any other 4xx/5xx response.
  • CI guide with a GitHub Actions recipe, a two-container compose example, and recipes for retries, timeouts, and rejected signatures.
  • Dashboard pass: light and dark toggle, 44px tap targets, scrollable table, explicit empty, loading, and error states.
  • New documentation: why the project exists, a comparison table, a request sequence diagram, a state diagram, and a design direction document.

Upgrade notes

  • Nothing breaks on /v1. Existing requests keep working.
  • /v2 is new and optional. It uses SECRET_KEY as the Midtrans server key, and requires callback_url in the charge body because there is no dashboard to read it from.
  • Webhooks from /v2 transactions carry signature_key in the body. Transactions from /v1 keep the X-IDNPay-Signature header.

Fixed

  • Virtual Account prefixes are now described as illustrative, not real bank numbers.
  • dist/ is cleaned before build and test, so removed modules cannot run from stale output.

Run it

docker compose up -d --build
Or, once the image is published:
docker run -p 9000:9000 ghcr.io/reyhandhani/idnpay-sandbox:v0.1.1
Open http://localhost:9000.
Full changelog: https://github.com/Reyhandhani/idnpay-sandbox/blob/main/CHANGELOG.md

v0.1.0

Choose a tag to compare

@Reyhandhani Reyhandhani released this 28 Oct 07:49

A local payment gateway simulator for Indonesia. Test QRIS, Virtual Account, and e-Wallet flows without a third-party sandbox that goes down or rate limits you.

Features

  • QRIS with an EMVCo payload and CRC-16 checksum
  • Virtual Accounts for BCA, Mandiri, BRI, BNI, and Permata
  • e-Wallet deeplinks for GoPay, OVO, ShopeePay, and DANA
  • Simulation endpoints for PAID, FAILED, and EXPIRED, plus automatic expiry
  • Signed webhooks with HMAC-SHA256, retries, and exponential backoff
  • At-least-once delivery using leases, with crash recovery when Redis is used
  • Memory or Redis queue, with automatic fallback
  • Dashboard with a connection test and a three-step flow
  • Simulated latency and failures for resilience testing

Quick start

docker compose up -d --build

Open http://localhost:9000 for the dashboard.

First charge:

curl -X POST http://localhost:9000/v1/charge \
  -H "Content-Type: application/json" \
  -H "X-Client-Key: idnpay-dev-client-key" \
  -d '{"order_id":"ORDER-1","gross_amount":150000,"payment_type":"qris","callback_url":"http://host.docker.internal:8000/webhook"}'

Requirements

Node.js 22 or newer if you run it without Docker.

Notes

  • Transactions live in memory and are lost on restart. That is intentional for a test tool.
  • Change CLIENT_KEY and SECRET_KEY before exposing the simulator beyond your machine.
  • The webhook signature covers order_id, status_code, and gross_amount. Re-read the transaction before acting on transaction_status.

Documentation

Full changelog: https://github.com/Reyhandhani/idnpay-sandbox/blob/main/CHANGELOG.md