Merchant Balance Mutation API

Retrieve the balance mutation for a specific merchant over a specified period. This endpoint is useful for reconciling balances over a time period.

HTTP Request

Endpoints: /v1/balance/mutation

HTTP Method: GET


Request Headers

HeaderTypeRequiredDescription
Content-TypestringRequiredExpected format of the request body. e.g.: application/json.
AcceptstringRequiredExpected format of the response body. e.g.: application/json.
AuthorizationstringRequiredBasic Base64Encode(serverKey:)

Query Parameters

ParameterTypeRequiredDescription
currencystringRequiredThe currency code for the balance mutation. Example: IDR.
start_timestringRequiredThe start time of the mutation window in ISO 8601 format, URL encoded.
Example raw value: 2026-03-02T00:00:00+07:00.
URL Encoded: 2026-03-02T00%3A00%3A00%2B07%3A00
end_timestringRequiredThe end time of the mutation window in ISO 8601 format, URL encoded.
Example raw value: 2026-03-16T23:59:59+07:00.
URL Encoded: 2026-03-16T23%3A59%3A59%2B07%3A00

Sample Curl

curl --location 'https://api.sandbox.midtrans.com/v1/balance/mutation?currency=IDR&start_time=2026-03-02T00%3A00%3A00%2B07%3A00&end_time=2026-03-16T23%3A59%3A59%2B07%3A00' \
--header 'Content-Type: application/json' \
--header 'Accept: application/json' \
--header 'Authorization: Basic <redacted>'

Response Body

Success

{
    "currency": "IDR",
    "start_time": "2026-03-02T00:00:00+07:00",
    "end_time": "2026-03-16T23:59:59+07:00",
    "opening_balance_effective": 962000.01,
    "closing_balance_effective": 59312508.02,
    "opening_balance_pending": 0.01,
    "closing_balance_pending": 0.00,
    "opening_balance_overall": 962000.02,
    "closing_balance_overall": 59312508.02,
    "wallets": [
        {
            "source": "payin",
            "opening_balance_effective": 962000.00,
            "closing_balance_effective": 144.00,
            "opening_balance_pending": 0.01,
            "closing_balance_pending": 0.00,
            "opening_balance_overall": 962000.01,
            "closing_balance_overall": 144.00
        },
        {
            "source": "iris",
            "opening_balance_effective": 0.01,
            "closing_balance_effective": 59312514.01,
            "opening_balance_pending": 0.00,
            "closing_balance_pending": 0.00,
            "opening_balance_overall": 0.01,
            "closing_balance_overall": 59312514.01
        }
    ]
}
FieldTypeDescription
currencystringThe currency code for the balances returned (e.g., IDR).
start_timestringThe start time of the queried period.
end_timestringThe end time of the queried period.
opening_balance_effectivenumberThe available funds at the beginning of the period.
closing_balance_effectivenumberThe available funds at the end of the period.
opening_balance_pendingnumberThe pending funds at the beginning of the period.
closing_balance_pendingnumberThe pending funds at the end of the period.
opening_balance_overallnumberThe total funds (effective + pending) at the beginning of the period.
closing_balance_overallnumberThe total funds (effective + pending) at the end of the period.
walletsarray of objectsBreakdown of balances grouped by wallet source (e.g., payin for incoming payments, iris for disbursements). Contains the same balance metrics as above.

Failed

{
    "error_messages": [
        "currency must not be empty"
    ]
}
FieldTypeDescription
error_messagesarray of stringThe list of errors.