# Midtrans MCP connector

The Midtrans connector lets your team check transaction status, issue refunds, approve or deny payments, create payment links and manage subscriptions from Claude, ChatGPT, Cursor or any MCP client, with every action tied to the person who signed in.

Source: https://elaichi.ai/connectors/midtrans/

## Facts

| | |
| --- | --- |
| Application | Midtrans |
| Category | Payment Gateway |
| AI tools | 44 |
| Authentication | Connects with an API key |
| Needs your own OAuth app | No |
| MCP endpoint | https://api.elaichi.ai/mcp |
| Works with | Claude, ChatGPT, Cursor, any MCP client, and the Elaichi Agent |
| Tools advertised by name | No. 44 tools is past the 30-tool threshold, so clients use `search_tools` and `execute_tool` |

## What you can ask once Midtrans is connected

- Show all pending Midtrans transactions from this week.
- Which refunds were issued yesterday through Midtrans.
- List active Midtrans payment links by status.

## Connect Midtrans in Elaichi

This happens once for the organization, before any client is involved.

1. Open Connections, choose Add connection, and pick Midtrans.
2. Optionally set Share with, then press Connect.
3. Paste a Midtrans API key. One person generates a token in Midtrans and pastes it once. Everyone else works through Share with, and never sees it.

Credentials are vaulted and nobody, including the AI, reads them back. The connection becomes a toolbox immediately, so you can curate which Midtrans tools are exposed, rename them, or freeze arguments before anyone points a client at it.

## Connect Midtrans to Claude

Endpoint: https://api.elaichi.ai/mcp

1. Open Customize, then Connectors.
2. Press Add.
3. Name it, paste the MCP server URL, then Continue.
4. Sign in and approve.

On Team and Enterprise, an Owner adds it once. Everyone else turns it on for themselves.

## Connect Midtrans to ChatGPT

Endpoint: https://api.elaichi.ai/mcp

1. Open Plugins, then press the + button.
2. Name it and paste the endpoint into Server URL.
3. Leave Authentication on OAuth, then tick the risk acknowledgement.
4. Press Create, then sign in and approve.

Works on the web today. The plugin directory lives at chatgpt.com/plugins.

## Connect Midtrans to Cursor

Endpoint: https://api.elaichi.ai/mcp

1. Open `~/.cursor/mcp.json`.
2. Add the endpoint under `mcpServers`.
3. Reload Cursor, then sign in and approve.

Set up per machine, so repeat it on each computer you work from.

## Connect Midtrans to any MCP client

Endpoint: https://api.elaichi.ai/mcp

1. Add the endpoint as a remote MCP server.
2. Sign in and approve.

The Elaichi Agent already has these tools, with nothing to set up.

## What the consent screen decides

Only Read is granted by default, which is not enough to call a Midtrans tool. Over MCP there is no trusted place to confirm a write in the moment, so the consent screen is the standing approval rather than a formality. Grant Read and Run tools. Think hard before granting Delete, which reaches into connected apps and cannot be undone.

## What teams do with Midtrans through Elaichi

### Refund a customer without leaving the chat

Support. When a customer writes in about a duplicate charge, find the Midtrans transaction by its order ID, issue a full or partial refund, and confirm the new status back to them.

### Reconcile the day's transactions

Finance. List the Midtrans transactions for a date range, see which settled, which are still pending and which expired, and summarize them for the ledger.

### Approve or deny flagged payments

Risk. Review a card payment held by fraud checks, look at its current status, and either approve it so it settles or deny it before goods ship.

### Send a payment link to close a deal

Sales. Create a Midtrans payment link for the agreed amount, share it with the customer, and check later whether it has been paid.

### Pause or update a recurring subscription

Billing. Look up a customer's Midtrans subscription, change the amount or schedule, disable it while they are away, or cancel it when they churn.

### Expire abandoned orders and release stock

Operations. Find pending transactions that were never paid and expire or cancel them, then capture authorized card payments once an order is ready to ship.

## Frequently asked questions

### How do I connect Midtrans to Claude?

Connecting Midtrans to Claude takes two steps. First, open Elaichi, choose Midtrans, and paste the server key from your Midtrans dashboard; there is no OAuth application to register and no client ID or secret to generate. Then in Claude go to Customize, then Connectors, then Add, and paste the endpoint https://api.elaichi.ai/mcp. Sign in with your Elaichi account and Midtrans is ready to use.

### Does Midtrans work with ChatGPT and Cursor as well as Claude?

Yes. Once Midtrans is connected in Elaichi, the same endpoint, https://api.elaichi.ai/mcp, works in Claude, ChatGPT, Cursor, any other MCP client and the Elaichi Agent. You connect Midtrans once and every client you use picks it up.

### What can an AI agent actually do with my Midtrans data?

With Midtrans connected, an agent can look up a transaction and tell you whether it settled, is pending or expired, issue a refund, approve, deny or capture a payment, cancel or expire an unpaid order, and create a payment link for a customer. It can also create, update, pause, resume or cancel a subscription. Because Midtrans exposes many actions, short concrete asks such as 'refund order 4521' work better than long paragraphs.

### Does connecting Midtrans give the AI access to my whole merchant account?

No. Everything an agent does in Midtrans runs inside the access of the person who signed in, using the Midtrans key their organization connected. Elaichi can narrow that access further, for example to read-only status checks, but it can never widen it beyond what the connected Midtrans account allows.

### Can my team share one Midtrans connection?

Yes. One person connects Midtrans in Elaichi and shares the connection with a team, and nobody else ever sees or handles the Midtrans server key. Each teammate still signs in to Elaichi as themselves, so the audit log records exactly who issued a refund or created a payment link.

### Can I stop an agent from refunding or canceling things in Midtrans?

Yes. In Elaichi, restrictions on the Midtrans connector work per action, so you can allow status checks and listing transactions while blocking refunds, cancellations, approvals or subscription changes. A blocked action is never advertised to Claude, ChatGPT or any other client, so no prompt can reach it.

### What happens to a Midtrans connection when someone leaves?

When you offboard someone in Elaichi, their access to Midtrans through every client ends at once, and nothing needs to be rotated because they never held the Midtrans key themselves. A shared Midtrans connection keeps working for everyone else on the team. If you ever want to remove Midtrans entirely, disconnecting it once in Elaichi removes it from Claude, ChatGPT, Cursor and every other client at the same time.

## All 44 Midtrans tools

Every tool below is callable through https://api.elaichi.ai/mcp once Midtrans is connected, subject to the toolbox it is in and the restrictions on the caller.

- **Midtrans transactions cancel** (Cancel). Cancel a Midtrans transaction to void it. Use refund instead if the transaction is already settled. Returns: status_code, status_message, transaction_id, masked_card, order_id, payment_type, transaction_time, transaction_status, fraud_status, bank, gross_amount. Required: order_id_or_transaction_id.
- **Midtrans transactions refund** (Action). Refund a settled Midtrans transaction to reverse money back to the customer. Supported for credit_card, gopay, shopeepay, dana, ovo, QRIS, kredivo, and akulaku. Returns: status_code, status_message, transaction_id, order_id, payment_type, transaction_time, transaction_status, gross_amount, refund_chargeback_id, refund_amount, refund_key, amount, reason. Required: order_id_or_transaction_id.
- **Midtrans transactions direct refund** (Action). Send a direct refund request to the bank or payment provider for a settled Midtrans transaction for faster processing than standard refund. Supported for GoPay, QRIS, ShopeePay, Credit Card, Akulaku, and Kredivo. Returns: status_code, status_message, transaction_id, order_id, gross_amount, payment_type, transaction_time, transaction_status, refund_chargeback_id, refund_amount, refund_key.…
- **Midtrans transactions expire** (Action). Expire a Midtrans transaction by order ID or transaction ID, updating transaction_status to expire when the customer fails to complete payment. The expired order_id can be reused for the same or different payment methods. Returns: status_code, status_message, transaction_id, order_id, payment_type, transaction_time, transaction_status, signature_key, bank, gross_amount, permata_va_number.…
- **Midtrans transactions approve** (Approve). Approve a challenged Midtrans transaction by order ID or transaction ID, accepting a transaction flagged by the Fraud Detection System so it proceeds to settlement instead of being automatically canceled. Returns: status_code, status_message, transaction_id, masked_card, order_id, payment_type, transaction_time, transaction_status, fraud_status, bank, gross_amount, approval_code, signature_key,…
- **Midtrans transactions get status b 2 b** (Get). Get the B2B transaction status for a specific order or transaction in Midtrans. Returns: status_code, status_message, transaction_id, masked_card, order_id, payment_type, transaction_time, transaction_status, fraud_status, approval_code, signature_key, bank, gross_amount, channel_response_code, channel_response_message, card_type, payment_option_type, shopeepay_reference_number, reference_id,…
- **Midtrans transactions capture** (Action). Capture an authorized Midtrans card transaction to settle the transaction balance. Only applicable when transaction_status is 'authorize' (pre-authorized credit card or GoPay). Returns: status_code, status_message, transaction_id, masked_card, order_id, payment_type, transaction_time, transaction_status, fraud_status, bank, gross_amount. Required: transaction_id.
- **Midtrans transactions deny** (Action). Deny a challenged card payment transaction in Midtrans. The transaction must have fraud_status challenge. Returns: transaction_id, order_id, gross_amount, payment_type, transaction_time, transaction_status, fraud_status, masked_card, status_code, bank, status_message. Required: order_id_or_transaction_id.
- **Create a Midtrans transaction** (Create). Create a new Midtrans transaction charge with a specified payment type and transaction details. Returns: status_code, status_message, transaction_id, order_id, gross_amount, payment_type, transaction_time, transaction_status, fraud_status, masked_card, approval_code, bank, custom_field1, custom_field2, custom_field3, metadata, bank_transfer, transaction_details. Required: payment_type,…
- **List all Midtrans transactions** (List). Get the status and details of a Midtrans transaction by order ID or transaction ID. For BI SNAP and DANA payment methods, only transaction ID works. Returns: status_code, status_message, transaction_id, order_id, gross_amount, payment_type, transaction_time, transaction_status, fraud_status, masked_card, approval_code, bank, signature_key, channel_response_code, channel_response_message,…
- **Midtrans card get token** (Get). Get a card token in Midtrans by securely sending credit card details to obtain a Token ID for card payment transactions. Returns: status_code, status_message, validation_messages, token_id, hash, id, name, amount, currency, created_at, schedule, status, token, payment_type, metadata, customer_details, gopay. Required: card_number, card_cvv, card_exp_month, card_exp_year. Applicable only for card…
- **Midtrans card register** (Action). Register a card in Midtrans for future one-click and two-click transactions by submitting card number and expiry. Returns: status_code, saved_token_id, transaction_id, masked_card. Required: card_number, card_exp_month, card_exp_year.
- **Create a Midtrans payment link** (Create). Create a Midtrans payment link with desired transaction details. Returns: order_id, payment_url. Required: transaction_details containing order_id (and gross_amount for FIXED_AMOUNT links, omitted when payment_link_type is DYNAMIC_AMOUNT).
- **Midtrans snap create token** (Create). Create a Snap payment token in Midtrans by submitting transaction details and optional payment configuration. Returns: token, redirect_url. Required: transaction_details (including order_id and gross_amount).
- **Create a Midtrans subscription** (Create). Create a Midtrans subscription or recurring transaction. Returns: id, name, amount, currency, created_at, schedule, status, token, payment_type, metadata, customer_details, gopay. Required: name, amount, currency, payment_type, token, schedule. Only IDR currency and credit_card or gopay payment types are supported.
- **Get single Midtrans subscription by ID** (Get). Get a single Midtrans subscription by id. Returns: id, name, amount, currency, created_at, schedule, status, token, payment_type, metadata, customer_details, gopay. Required: id.
- **Midtrans subscriptions disable** (Disable). Disable a Midtrans subscription so the customer is not charged in the future. Returns: status_message. Required: subscription_id. Pending retries from previous failed payments will still execute after disabling.
- **Midtrans subscriptions enable** (Enable). Enable a Midtrans subscription so the customer can start paying for the subscription immediately. Returns: status_message. Required: subscription_id.
- **Update a Midtrans subscription by ID** (Update). Update a Midtrans subscription's details or reactivate an expired subscription by updating its schedule. Returns: status_message. Required: id, name, amount, currency, token. Only schedule.interval can be updated; interval_unit and max_interval cannot be changed, and the payment method cannot be changed mid-subscription.
- **Midtrans subscriptions cancel** (Cancel). Cancel a Midtrans subscription by subscription_id, stopping future charges and any pending retries from previous failed charge attempts. Returns: status_message. Required: subscription_id.
- **Midtrans access token get access token** (Get). Get a B2B access token from Midtrans using the OAuth 2.0 client_credentials grant. Returns: responseCode, responseMessage, accessToken, tokenType, expiresIn, id, name, amount, currency, created_at, schedule, status, token, payment_type, metadata, customer_details, gopay. Required: grantType.
- **Midtrans account linking get auth code** (Get). Get an auth code to initiate GoPay account linking in Midtrans, redirecting the user to the GoPay PIN/OTP page. Returns: responseCode, responseMessage, referenceNo. Required: redirectURL, scopes, state, merchantId, lang, seamlessData, seamlessSign.
- **Midtrans account linking bind account** (Action). Bind a GoPay account in Midtrans using an authCode to obtain a customer access token. Returns: responseCode, responseMessage, referenceNo, accessTokenInfo. Required: merchantId, authCode, grantType.
- **Midtrans account linking inquiry binding** (Action). Inquire about a GoPay account binding in Midtrans to fetch account status, balance, payment options, and the current payment option token. Returns: responseCode, responseMessage, referenceNo, additionalInfo.
- **Midtrans account linking unbind account** (Action). Unbind a linked GoPay account from a merchant in Midtrans. Returns: responseCode, responseMessage, referenceNo, id, name, amount, currency, created_at, schedule, status, token, payment_type, metadata, customer_details, gopay. Required: merchantId.
- **Midtrans direct debit direct debit payment** (Action). Initiate a GoPay Tokenization direct debit payment in Midtrans. Returns: responseCode, responseMessage, referenceNo, partnerReferenceNo, paidTime, webRedirectUrl, appRedirectUrl, additionalInfo, originalReferenceNo, originalPartnerReferenceNo, captureNo, partnerCaptureNo, captureAmount, captureTime. Required: partnerReferenceNo, chargeToken, urlParams, payOptionDetails. The GoPay account must be…
- **Midtrans direct debit auth payment** (Action). Reserve a customer's GoPay balance without deducting it by initiating a GoPay Tokenization Pre-Auth transaction in Midtrans. Returns: responseCode, responseMessage, referenceNo, partnerReferenceNo, paidTime, additionalInfo, originalReferenceNo, originalPartnerReferenceNo, captureNo, partnerCaptureNo, captureAmount, captureTime. Required: partnerReferenceNo, merchantId, title, and additionalInfo.
- **Midtrans direct debit capture payment** (Action). Capture an authorized GoPay Tokenization transaction in Midtrans to deduct the user's previously reserved balance. Returns: responseCode, responseMessage, originalReferenceNo, originalPartnerReferenceNo, captureNo, partnerCaptureNo, captureAmount, captureTime. Required: originalPartnerReferenceNo, partnerCaptureNo, merchantId, title. Either originalReferenceNo or additionalInfo.originalExternalId…
- **Midtrans direct debit refund** (Action). Refund a settled Midtrans GoPay or GoPay Tokenization (non pre-auth) transaction over the BI-SNAP Direct Debit API, returning money to the customer. Supports partial refunds via refundAmount; omit it for a full refund. Returns: responseCode, responseMessage, originalReferenceNo, refundNo, partnerRefundNo, refundAmount, refundTime. Required: originalPartnerReferenceNo, partnerRefundNo, and either originalReferenceNo or originalExternalId.
- **Midtrans direct debit get status** (Get). Get the transaction status of a GoPay Tokenization direct debit transaction in Midtrans. Returns: responseCode, responseMessage, partnerReferenceNo, referenceNo, additionalInfo containing payment status, transaction time, expiry time, and fraud status details.
- **Midtrans virtual account create va** (Create). Create a Virtual Account in Midtrans using the SNAP-based BI-SNAP Core API. Returns the generated virtual account number, virtual account name, total amount, and expiry time. Required: partnerServiceId, customerNo, virtualAccountName, totalAmount, and partnerReferenceNo.
- **Midtrans virtual account get va status** (Get). Get the status of a Virtual Account transaction in Midtrans via the BI-SNAP Core API. Returns: masked_card, approval_code, bank, eci, channel_response_code, channel_response_message, transaction_time, gross_amount, currency, order_id, payment_type, signature_key, status_code, transaction_id, transaction_status, fraud_status, settlement_time, status_message, merchant_id, card_type,…
- **Midtrans qris create qr** (Create). Generate a QRIS MPM (Merchant Presented Mode) QR code in Midtrans. Returns the created QRIS transaction including transaction_id, order_id, transaction_status, gross_amount, currency, acquirer, and actions with QR code generation URLs. Required: payment_type, transaction_details.
- **Midtrans qris get qr status** (Get). Get the status of a QRIS MPM (Merchant Presented Mode) transaction in Midtrans via the BI-SNAP protocol. Returns: transaction_status, transaction_id, order_id, gross_amount, status_code, status_message, payment_type, currency.
- **Midtrans qris refund qr** (Action). Refund a settled Midtrans QRIS MPM transaction over the BI-SNAP API, returning money to the customer. Supports partial refunds via refundAmount; omit it for a full refund. Returns: responseCode, responseMessage, referenceNo, originalPartnerReferenceNo, originalReferenceNo, partnerRefundNo, refundAmount, refundTime, additionalInfo. Required: merchantId, originalPartnerReferenceNo, partnerRefundNo.
- **Midtrans qris cancel qr** (Cancel). Cancel a pending QRIS MPM (Merchant Presented Mode) transaction in Midtrans via the BI-SNAP API. Returns: status_code, status_message, transaction_id, order_id, merchant_id, gross_amount, currency, payment_type, transaction_time, transaction_status, fraud_status, acquirer, actions, signature_key, transaction_type, settlement_time, issuer, shopeepay_reference_number, reference_id.
- **Midtrans qris generate qr code** (Generate). Generate a QR code image for a Midtrans QRIS transaction by transaction_id. Returns a PNG image of the QR code that customers can scan to pay from any QRIS-registered payment provider. Required: transaction_id. The QR code URL expires after 30 days.
- **Midtrans transaction history get transaction history** (Get). List Midtrans merchant transaction history with optional date-range, type, and status filters. Returns each transaction's dateTime, amount, status, type, remark, and additionalInfo (including referenceNo, partnerReferenceNo, channel, customerEmail, accountNo, and fee). Date range limited to the latest 6 months; max 50 per page.
- **Midtrans gopay account get pay account** (Get). Get a GoPay account's linked status and payment options in Midtrans. Returns: status_code, payment_type, account_id, account_status, metadata. Required: account_id. Only applicable for GoPay Tokenizations.
- **Midtrans gopay account unbind pay account** (Action). Unbind a linked GoPay customer account in Midtrans. Returns: status_code, payment_type, account_id, account_status, channel_response_code, channel_response_message. Required: account_id.
- **Midtrans gopay account get gopay account info** (Get). Get GoPay account info for Snap tokenization in Midtrans. Returns: status_code, payment_type, account_id, account_status, metadata. Required: user_id.
- **Midtrans gopay account unlink gopay account** (Action). Unlink a GoPay account from Snap tokenization in Midtrans. Returns: status_code, payment_type, account_id, account_status, channel_response_code, channel_response_message. Required: user_id.
- **Midtrans gopay account create pay account** (Create). Link a customer's GoPay account for GoPay Tokenization in Midtrans. Returns: status_code, payment_type, account_id, account_status, actions, channel_response_code, channel_response_message, gopay_partner. Required: payment_type, gopay_partner.phone_number, gopay_partner.country_code.
- **Midtrans bin get bin** (Get). Get metadata for a specific BIN (Bank Identification Number) in Midtrans, such as card type, brand, issuing bank, and country. Returns: country_name, country_code, brand, bin_type, bin_class, bin, bank_code, bank. Required: bin_number. Rate-limited to 100 requests per minute; excess requests receive a 409 status code.
