API Key Management
How to generate and revoke the API keys for Local Transfer that connect your systems to Midtrans and how to control exactly what each key is allowed to do.
Merchant Dashboard Guide
Applies to: Local Transfer (IRIS / Disbursement) keys, sandbox and production.
On this page
- What this covers
- Roles & who can do what
- Creating a key
- Your keys list
- Revoking a key
- Permissions & scope
- Expiry
- Two-factor confirmation
- Notifications
- Sandbox vs. production
- If you're locked out
- What's coming next
- FAQ
What this covers
API Key Management gives you self-service control over the credentials your integration uses, no more raising a ticket to generate or revoke a key.
Everything lives under Settings → Access Keys. From there, General Credentials covers your Payment and Local Transfer keys; BI Snap Credentials is separate and covers your BI-SNAP public key and IP registration.
Screen — Settings → Access Keys
Two cards: General Credentials ("Configure credentials for transfer and payment integrations in Midtrans") and BI Snap Credentials ("Integrate with Bank Indonesia SNAP by registering a merchant public key and IP address"). This guide covers General Credentials.
Inside General Credentials, a Payment tab and a Transfer tab sit side by side. This guide is about the Transfer tab, self-service API keys for Local Transfer (IRIS).
Screen — General Credentials → Payment tab
Banner: "Generate multiple payment API keys will be available soon."
Fields: Client Key (masked) and Server Key (masked), each with a reveal icon.
Not changing yet: Your Payment (PG) integration: cards, VA, e-wallet, QRIS, invoicing, payment links, keeps using your existing Server Key and Client Key exactly as it does today. Multiple, self-service payment keys are on the roadmap but not available yet.
| Task | Roles you need |
|---|---|
| See Access Keys and the Disbursement tab | Admin or Developer |
| Generate a key | Admin or Developer, plus Disbursement creator or Disbursement approver |
| Revoke a key (any key) | Admin or Developer |
| Create a disbursement in the dashboard | Disbursement creator |
| Approve a disbursement in the dashboard | Disbursement approver |
- A user cannot hold Disbursement creator and Disbursement approver at the same time.
- Admin can combine with one Disbursement role only (Admin + creator, or Admin + approver).
- Admin or Developer without a Disbursement role cannot generate a key. The Generate API key button does not show.
Production and sandbox are separate: a key created under a production Admin/Developer only works in production, and the same applies to sandbox, switch between them with the Environment selector at the top of the sidebar.
Creating a key
From General Credentials → Transfer, select Generate API key. You can hold up to 10 active keys per merchant account, and each one is generated with a secure random value and encrypted at rest. Midtrans never stores it in plain text.
Generate API Key
Key name* (required text field) — "Enter name for this API key"
Notes (optional textarea) — "Enter additional information to help you identify this key"
Permissions — "Select the access permissions allowed for this API key."
Permission Options Description Manage transfer receivers
- None
- Read
- Write
Get and manage the receiver list, and get the receiver bank list Create transfer request
- None
- Write
Transfers to local Indonesian bank accounts, e-wallets, and virtual accounts Access reports
- None
- Read
Get account statements and transfer details Check balance
- None
- Read
Get balance and top-up details for facilitator scheme Verify account
- None
- Write
Verify local Indonesian bank accounts, e-wallets, and virtual accounts All five default to None.
Expiry date "Set an expiry date for this API key. Once expired, it can no longer be used." Radio choice: No expiry (default) or Custom date.
Actions: Cancel / Generate.
Steps:
- Name the key and add a note. The name is required, make it something your team will recognize later, e.g.
settlement-bot. Notes are optional context for anyone who looks at this key afterward. - Set each permission to None, Read, or Write. Grant only what this key needs, see Permissions & scope for what each one unlocks.
- Choose No expiry or a Custom date. See Expiry for what happens as a key approaches its expiry date.
- Select Generate, and confirm with two-factor if it's enabled. If your Admin has turned on two-factor confirmation, you'll be asked for a one-time code before the key is issued.
- Copy the key now. The full key is shown once. After you leave this screen it's permanently masked, Midtrans can't retrieve it for you, so store it in your secrets manager immediately.
You only get one look. The full key value is shown exactly once, immediately after you select Generate. Save it to a password manager or secrets store before closing or navigating away — there's no "reveal key" option afterward, and Midtrans has no way to recover it for you. If you miss it, generate a new key and revoke the one you can't read.
Good to know: Every key you create sends an email to all Admins and Developers on the account, plus your registered merchant email, so nobody is surprised by a new credential.
At the limit. Once you have 10 keys, Generate API key is disabled. Revoke a key you no longer use to free up a slot.
Your keys list
Every key you've created is listed on the Transfer tab, so you always know what's active without exposing the key itself. A masked Merchant Key sits above the list, that's your account-level identifier, separate from the individual keys below it.
General Credentials → Transfer tab
Banner: "Protect your API integrations by enabling Two-Factor Authentication (2FA)" — "We recommend enabling 2FA in Account page to add an extra layer of security when generating and revoking API keys."
Field: Merchant Key (masked).
API Keys table, with an Active status filter and a Generate API key button:
Key name Created date Status Notes Action settlement-bot 8/4/2026 Active — ••• reporting-readonly 7/7/2026 Active — ••• warehouse-reconciliation 6/3/2026 Active — ••• (Sample key names shown here for illustration.)
Use the Active filter to switch views (e.g. to see revoked keys), and select the ••• menu on any row to revoke that key. Selecting a key's name opens its full detail.
Revoking a key
Revoking is immediate, a revoked key stops working in real time, with no waiting period. Use it the moment you suspect a key has leaked or is no longer needed. Revocation is permanent and can't be undone.
No rotation feature. There's no built-in "rotate" action that swaps a key in place. To refresh a credential, generate a new key with the permissions you need, switch your systems over to it, then revoke the old one yourself once you've confirmed the switch, the two keys work side by side in the meantime.
Permissions & scope
Instead of one key that can do everything, you assign each key only the capabilities it needs, the same principle you'd apply to any staff access. These are the five toggles on the Generate API Key screen:
| Permission | Options | What it unlocks |
|---|---|---|
| Manage transfer receivers |
| Get and manage the receiver (beneficiary) list, and get the receiver bank list. |
| Create transfer request |
| Submit transfers to local Indonesian bank accounts, e-wallets, and virtual accounts. |
| Access reports |
| Get account statements and transfer details. |
| Check balance |
| Get balance and top-up details. |
| Verify account |
| Verify a destination bank account, e-wallet, or virtual account before transferring. |
Where approval fits in: A key with Create transfer request can submit a transfer, but the transfer itself is still approved by a person with the Approver user role in the dashboard (see Roles & who can do what) approval is a dashboard action, not a key permission.
Expiry
When creating a key, you choose No expiry (the default) or Custom date. If you'd rather have a credential retire itself on a schedule, set a custom date instead, a common choice is 90 days out. An expired key stops working within about a minute of its expiry time, and Midtrans emails you 7 days beforehand so you have time to generate a replacement.
Two-factor confirmation
When enabled, sensitive actions, creating a key, viewing a full key a second time, editing, and revoking, require a one-time code from Google Authenticator or your email before they take effect. Only Admins can turn this setting on or off, and every confirmation is logged.
Notifications
You'll get an email whenever something changes on your keys, so a new or altered credential never comes as a surprise.
| Event | Who's notified |
|---|---|
| Key created | All Admins, all Developers, merchant email |
| Key revoked | All Admins, all Developers, merchant email |
| Key expiring in 7 days | All Admins, all Developers |
Sandbox vs. production
Sandbox works exactly like production, same limits, same permission model, same generate-and-revoke flow, so you can safely rehearse a credential change before doing it live. The two environments are fully separate: a sandbox key only ever authenticates against sandbox, and the roles that manage it (sandbox Admin/Developer) are distinct from your production roles.
If you're locked out
Key generation is entirely self-service and merchant-only. Midtrans Operations cannot generate or revoke a key on your behalf, even in an emergency. If every Admin and Developer has lost access to the dashboard itself, contact Midtrans support to restore your account access. Once you're back in, generate a new key and revoke any you no longer trust.
IP whitelist
Go to Settings → Access Keys → IP Whitelist for API, add your server IP (public IPv4, /24 to /32), and select Disbursement. Midtrans rejects Disbursement API requests from other IPs. Add at least one IP before the due date shown in the banner.
FAQ
I closed the screen without copying my key. Can I get it back?
No, the full key is only ever shown once, and Midtrans has no way to retrieve it afterward. Revoke it and create a new one.
Does this change how I authenticate for Payment (PG)?
No. Your Server Key and Client Key for Payment are untouched in this phase, this guide only covers Local Transfer (IRIS) keys.
Can a key approve the transfers it creates?
No. One user holds only one Disbursement role, so a key gets either the create or the approve permission. Use two keys.
Is my key encrypted?
Yes. Keys are generated with a secure random value and encrypted at rest. Midtrans systems never hold your key in plain text.
Is there a way to rotate a key without generating a new one?
No, there's no in-place "rotate" action. To refresh a credential, generate a new key, switch your systems over, then revoke the old one yourself.
Can Midtrans Operations generate or revoke a key for me?
No. Key generation and revocation are self-service only, performed by your own Admins and Developers. Operations has no ability to do either on your behalf, so make sure more than one person on your team can access the dashboard.
Questions about your integration? Reach out to your Midtrans account team or support, they can look up key status.
Updated 13 days ago