EnglishSetup GuidesMidtrans (Admin)

Set Up Midtrans (Danum Admin)

For: Danum super-admin only. These credentials belong to Danum. They receive tenant subscription payments. Time: 15-30 minutes plus Midtrans verification lead time.

Overview

When payment mode is GATEWAY_MIDTRANS, tenants click “Pay” in the dashboard and are redirected to Midtrans Snap.js checkout (cards, VA, GoPay, OVO, etc). Midtrans notifies Danum via webhook, and the subscription is activated automatically.

Prerequisites

  • PT / CV / Sole proprietorship with complete KYC
  • NPWP (tax ID)
  • Bank account in the legal entity’s name
  • Merchant profile (store name, address, official phone number)

Steps

1. Register Midtrans

  • Go to https://dashboard.midtrans.com/register
  • Click Sign Up. Choose Business account (not Personal).
  • Fill in the business profile. Upload director’s KTP + NPWP + company deed.
  • Wait 1-3 business days for verification.

2. Test in sandbox first

Before production, test in sandbox:

  • Midtrans dashboard > toggle Sandbox (top left).
  • Menu Settings > Access Keys > copy Server Key and Client Key.

3. Enter sandbox keys into Danum Admin

4. Configure webhook

  • Midtrans > Settings > Configuration > Payment Notification URL = https://ai.numintek.com/webhooks/midtrans/notification
  • Click Save.

5. Test a transaction

  • Switch payment mode to GATEWAY_MIDTRANS in /admin/settings/payment-mode.
  • Sign in as a demo tenant, open /app/billing, click upgrade plan, and check out.
  • Use sandbox card 4811 1111 1111 1114 (Midtrans test card). Transaction succeeds.
  • Check /admin/tenants/[id] - subscription should be PAID.

6. Switch to production

Once testing is OK:

  • Toggle Midtrans dashboard to Production (top right).
  • Settings > Access Keys (Production) > copy production keys.
  • Update in Danum Admin:
    • payment.midtrans.server_key = Mid-server-XXXXX (no SB- prefix)
    • payment.midtrans.client_key = Mid-client-XXXXX
    • payment.midtrans.is_production = true
  • Update the webhook URL in the production dashboard to the same URL.

Midtrans fees

  • Credit card: 2.9% + Rp 2,000 per transaction.
  • Virtual account: Rp 4,000 per transaction.
  • GoPay / OVO / DANA / ShopeePay: 1.5-2% per transaction.
  • QRIS: 0.7% per transaction (cheapest).

Latest pricing at midtrans.com/pricing.

While waiting for Midtrans verification

Use payment mode MANUAL (default). Tenants transfer to a Danum bank account, upload proof, and admin approves. See the manual payment guide.

Troubleshooting

Q: Webhook signature mismatch. Check payment.midtrans.server_key matches the value in the Midtrans dashboard. Copy again if unsure.

Q: Snap page does not appear. Check payment.midtrans.client_key is correct and CORS settings in Midtrans.

Q: Transaction status not refreshing in Danum dashboard. Check webhook logs in Midtrans dashboard (Settings > Configuration > Notification History). If the webhook fails, Danum’s worker cron retries.