BooDoo

Taking payments

Connect Midtrans to your app

What is Midtrans?

Midtrans is a payment service for Indonesia that lets a business take payments by QRIS, e-wallets such as GoPay, bank transfer and cards.

What it costs
Free to set up and to test; you pay only for successful payments. Listed fees include QRIS 0.7%, GoPay 2%, bank transfer IDR 4,000 and cards 2.9% + IDR 2,000. VAT may be added, and moving money to your bank can carry its own fee.
Time needed
About 15 minutes for a test key. Real payments need Midtrans to review your documents first; the pages we checked do not say how long that takes.
If you skip it
Your app still works. Only taking payments through Midtrans stays off until you connect it.

What you can build with Midtrans

How to get it, step by step

Create your account

  1. Go to dashboard.midtrans.com/register and create an account with your email address and phone number, or sign in.

Create your key

  1. To practise with pretend money first, use the Environment drop-down at the top left of the dashboard and choose Sandbox.
  2. Open Settings, then Access Keys, and stay on the Payment tab.
  3. Click Generate server key and type a Key name, for example BooDoo.
  4. Under Permissions, everything starts as None. Choose Write for Snap Checkout and Core API, and for any other payment product your app uses, such as Payment Link. If your app must cancel, expire or refund payments, choose Write for those too.
  5. Under Expiry date choose No expiry (or Custom date), then click Generate. If asked, enter the 6-digit code from your authenticator app.
  6. Click Download or the copy icon straight away, because the key is shown only once. Paste it into the Midtrans Server Key box (MIDTRANS_SERVER_KEY) in BooDoo.

Go live

  1. For real payments, switch Environment to Production and complete your registration by uploading the documents Midtrans asks for.
  2. To add a way to pay that is not active yet, click + Payment Methods, choose it, send the documents and signed agreement requested, and wait for Midtrans to review it. Using Core API for real payments also needs Midtrans approval.
  3. Once approved, while in Production, generate a new Server Key the same way and put it in the Midtrans Server Key box (MIDTRANS_SERVER_KEY) in place of the test key.

Which value goes in which box

Midtrans Server KeyMIDTRANS_SERVER_KEYKeep private
In the Midtrans Dashboard: Settings, then Access Keys, Payment tab, button Generate server key. It is shown only once; keep it private, like a password.

Watch out for

  • Test (Sandbox) and real (Production) keys are different. A test key never takes real money.
  • Midtrans prices are in rupiah. Check the document list before you start: a foreign individual is asked for a passport and an Indonesian stay permit (KITAS, KITAP or KIMS), and foreign companies have their own list.
  • Never share the Server Key or put it in a website or phone app. Keep it private, like a password.
  • If you set an expiry date, you will need to give BooDoo a new key before that date.